# π(PI) and the AGM: Introduction to Elliptic Integrals

### Introduction

In my last post I had described the adventures of Gauss with AGM (in this post AGM means Arithmetic-Geometric Mean, see the linked post). Gauss had established the deep connection between Elliptic Integrals and AGM and used his results in this field to ultimately derive a formula for calculating $\pi$ using AGM, but since it involved extraction of square roots it was not considered of much value in pre-computer era.

Instead formulas based on the power series expansion of $\tan^{-1}(x)$ given by $$\tan^{-1}(x) = x - \frac{x^{3}}{3} + \frac{x^{5}}{5} - \frac{x^{7}}{7} + \cdots$$ were used because these involved the basic operations of arithmetic namely addition, subtraction, multiplication and division. An example of such a formula is $$\frac{\pi}{4} = 4\tan^{-1}\left(\frac{1}{5}\right) - \tan^{-1}\left(\frac{1}{239}\right)$$ Gauss' AGM formula for $\pi$ was rediscovered in 1976 independently by Richard P. Brent and Eugene Salamin and forms the topic of this series of posts.

The formula combines many interesting results from the theory of elliptic integrals namely
1. Elliptic Integrals of first and second kind
2. Legendre's Identity: relation of elliptic integrals with $\pi$
3. Calculation of elliptic integrals using AGM
These topics will be discussed one by one in this series of posts starting with basics of theory of elliptic integrals.

### Elliptic Integrals

The theory of elliptic integrals was developed to handle certain integrals which were not expressible in terms of elementary functions. These integrals were obtained while calculating arc-lengths of curves like ellipses (that's why the name elliptic is used) and lemniscate. Since they were not expressible in terms of elementary functions, mathematicians started studying the integrals directly and later Abel inverted them to obtain the elliptic functions.

To begin with the elliptic integral of first kind is defined by $$F(\phi, k) = \int_{0}^{\phi}\frac{d\theta}{\sqrt{1 - k^{2}\sin^{2}\theta}}$$ where $\phi$ is called the amplitude and $k$ is called the modulus. In some texts the quantity $m = k^{2}$ , called the parameter (or even modulus), is used and then the integral is denoted by $F(\phi | m)$. Using the substitution $t = \sin\theta$ and $x = \sin\phi$ the integral can be expressed in the algebraic form as follows $$F(x; k) = \int_{0}^{x}\frac{dt}{\sqrt{(1 - t^{2})(1 - k^{2}t^{2})}}$$ Defined as above these integrals are called incomplete because of the variable $\phi$ or $x$ being used. By setting $\phi = \pi / 2$ or equivalently $x = 1$ one obtains the the complete elliptic integral of first kind denoted by $K(k)$ $$K(k) = \int_{0}^{\pi / 2}\frac{d\theta}{\sqrt{1 - k^{2}\sin^{2}\theta}} = \int_{0}^{1}\frac{dt}{\sqrt{(1 - t^{2})(1 - k^{2}t^{2})}}$$ A slightly symmetrical form of the elliptic integral of first kind is also used extensively. This is defined as $$I(\phi, a, b) = \int_{0}^{\phi}\frac{d\theta}{\sqrt{a^{2}\cos^{2}\theta + b^{2}\sin^{2}\theta}}$$ and the complete integral is defined by $$I(a, b) = \int_{0}^{\pi / 2}\frac{d\theta}{\sqrt{a^{2}\cos^{2}\theta + b^{2}\sin^{2}\theta}}$$ The relation between the symmetric and non-symmetric forms is immediately obvious $$I(\phi, a, b) = \frac{1}{a}F(\phi, k),\,\, k^{2} = 1 - \frac{b^{2}}{a^{2}}$$ In the theory of elliptic integrals the complementary modulus $k^{\prime}$ is used frequently and is related to the modulus $k$ as follows $$k^{2} + k'^{2} = 1$$ The elliptic integral of second kind is defined by $$E(\phi, k) = \int_{0}^{\phi}\sqrt{1 - k^{2}\sin^{2}\theta}\,d\theta$$ with the algebraic form being given by $$E(x; k) = \int_{0}^{x}\frac{\sqrt{1 - k^{2}t^{2}}}{\sqrt{1 - t^{2}}}\,dt$$ The complete elliptic integral of second kind is defined by $$E(k) = \int_{0}^{\pi / 2}\sqrt{1 - k^{2}\sin^{2}\theta}\,d\theta = \int_{0}^{1}\frac{\sqrt{1 - k^{2}t^{2}}}{\sqrt{1 - t^{2}}}\,dt$$ The symmetric forms are defined in a similar fashion as $$J(\phi, a, b) = \int_{0}^{\phi}\sqrt{a^{2}\cos^{2}\theta + b^{2}\sin^{2}\theta}\,d\theta$$ $$J(a, b) = \int_{0}^{\pi / 2}\sqrt{a^{2}\cos^{2}\theta + b^{2}\sin^{2}\theta}\,d\theta$$ The relation with non-symmetric forms is as follows $$J(\phi, a, b) = aE(\phi, k),\,\, k^{2} = 1 - \frac{b^{2}}{a^{2}}$$ This preliminary discussion involving the definition of elliptic integrals concludes the first post in this series. The next post discusses the Legendre's Identity connecting these integrals with $\pi$.