Introduction

Pi is a long-standing mathematical constant, known for representing the ratio between the circumference and the diameter of a circle.

Throughout history, calculating it accurately and representing it has been one of the oldest and most fascinating challenges in mathematics. Beyond its numerical value, Pi has influenced geometry, physics, engineering, and computer science, being essential in formulas and complex calculations.

In this section, we will explore simpler and practical ways to represent it and use modern computers to perform precise calculations and explore its applications in the modern world.

History of Pi

The study of Pi has evolved over the centuries:

  • 17th Century: European mathematicians like Ludolph van Ceulen calculated Pi to 35 decimal places.
  • 18th-19th Century: development of infinite series and continued fractions, such as those by Leibniz and Euler, allowing faster approximations.
  • 20th-21st Century: the computer era enabled calculating billions of decimals of Pi, demonstrating both technological capability and human fascination with this constant.

Representations and Approximations

Pi can be represented in several ways:

  1. Fractions and approximate square roots: such as 22/7 or √10.
  2. Infinite series: for example, the Leibniz series: π = 4 * (1 - 1/3 + 1/5 - 1/7 + ... )
  3. Geometric methods: using inscribed and circumscribed polygons to approximate the circumference.

Each representation has advantages and limitations depending on the required precision and context of use.

Pi from a Mathematical Perspective

Mathematically, Pi is an irrational and transcendental number:

  • Irrational: it cannot be expressed as an exact fraction of integers.
  • Transcendental: it is not a root of any polynomial with integer coefficients.

This means its decimals never repeat or terminate, and certain geometric constructions, like squaring the circle, are impossible to perform exactly.

Pi in Modern Computing

Today, computers can calculate Pi to billions of decimal places using advanced algorithms:

  • Machin-type algorithms and formulas based on arctangents.
  • Gauss-Legendre algorithms for fast calculation and efficient convergence.

For example, in Python, we can approximate Pi using the Leibniz series:

def pi_leibniz(n):
    pi_est = 0
    for k in range(n):
        pi_est += ((-1)**k)/(2*k+1)
    return 4 * pi_est

print(pi_leibniz(1000000))

These calculations are not only of mathematical interest but also useful in physical simulations, engineering, and cryptography.

A Didactic Approach: Experimenting with Pi

To better understand Pi and its applications, practical exercises can be performed:

  1. Polygon approximation: draw a circle and inscribe and circumscribe polygons to estimate Pi.
  2. Infinite series: implement the Leibniz or Nilakantha series in a program and observe the convergence.
  3. Monte Carlo simulations: estimate Pi by generating random points inside a square that contains a quarter circle.

These experiments show how Pi combines geometric intuition, mathematical analysis, and computational power.

Conclusion

Pi is history, mathematics, and applied technology. From manual calculations to modern algorithms, this constant has fascinated generations of mathematicians and scientists.

Its magic lies in the fact that, despite being a finite number in definition, its decimals are infinite, allowing endless exploration and applications in virtually every field of knowledge.

Pi reminds us that mathematics not only measures the world but also awakens human curiosity and creativity.