# Modular Equations and Approximations to π(PI): Part 3

### Series Based on Alternative Theories

In the previous post we established certain series for $1/\pi$ following Ramanujan's technique. These were based on formulas in the classical theory of elliptic functions and integrals. In the field of elliptic functions, Ramanujan surpassed all his predecessors and developed alternative theories which bore striking resemblance to the classical theory and thus provided a grand generalization of the theory of elliptic functions.

In this post we will not develop these alternative theories in detail, but rather try to relate them to the classical theory and thereby provide further series for $1/\pi$.

In the paper "Modular equations and approximations to $\pi$" Ramanujan states that:
"The ordinary modular equations express the relations which hold between $k$ and $l$ when $nK'/K = L'/L$, or $q^{n} = Q$, where
\begin{align} q &= e^{-\pi K'/K}, Q = e^{-\pi L'/L}\notag\\ K &= 1 + \left(\frac{1}{2}\right)^{2}k^{2} + \left(\frac{1\cdot 3}{2\cdot 4}\right)^{2}k^{4} + \cdots\notag\end{align} There are corresponding theories in which $q$ is replaced by one or the other of the functions
$$q_{1} = e^{-\pi K'_{1}\sqrt{2}/K_{1}},\,\, q_{2} = e^{-2\pi K'_{2}/(K_{2}\sqrt{3})},\,\, q_{3} = e^{-2\pi K'_{3}/K_{3}}$$ where \begin{align}K_{1} &= 1 + \frac{1\cdot 3}{4^{2}}k^{2} + \frac{1\cdot 3\cdot 5\cdot 7}{4^{2}\cdot 8^{2}}k^{4} + \frac{1\cdot 3\cdot 5\cdot 7\cdot 9\cdot 11}{4^{2}\cdot 8^{2}\cdot 12^{2}}k^{6} + \cdots\notag\\ K_{2} &= 1 + \frac{1\cdot 2}{3^{2}}k^{2} + \frac{1\cdot 2\cdot 4\cdot 5}{3^{2}\cdot 6^{2}}k^{4} + \frac{1\cdot 2\cdot 4\cdot 5\cdot 7\cdot 8}{3^{2}\cdot 6^{2}\cdot 9^{2}}k^{6} + \cdots\notag\\ K_{3} &= 1 + \frac{1\cdot 5}{6^{2}}k^{2} + \frac{1\cdot 5\cdot 7\cdot 11}{6^{2}\cdot 12^{2}}k^{4} + \frac{1\cdot 5\cdot 7\cdot 11\cdot 13\cdot 17}{6^{2}\cdot 12^{2}\cdot 18^{2}}k^{6} + \cdots\notag\end{align} From these theories we can deduce further series for $1/\pi$."

And then Ramanujan gives a list of 14 series for $1/\pi$ without any proof.

If we take a look closely at the definitions above we see that we are talking here about the hypergeometric function $$K_{s} =\,_{2}F_{1}(s, 1 - s; 1; k^{2})$$ for $s = 1/3, 1/4, 1/6$ so that Ramanujan's $K_{1}, K_{2}, K_{3}$ correspond to $s = 1/4, 1/3, 1/6$ respectively. Also the value of the nome $q$ is given as $$q_{s} = \exp\left(-\frac{\pi}{\sin(\pi s)}\frac{K'_{s}}{K_{s}}\right)$$ The traditional theory which is the simplest case corresponds to $s = 1/2$.

Some further results on these alternative theories were found in Ramanujan's Notebooks and using these Bruce C. Berndt and others developed these theories in detail. We will not discuss any further about these theories. However we will focus on the series for $1/\pi$ given by Ramanujan on the basis of these theories.

The last series offered by him is $$\boxed{\displaystyle \frac{1}{2\pi\sqrt{2}} = \frac{1103}{99^{2}} + \frac{27493}{99^{6}}\frac{1}{2}\frac{1\cdot 3}{4^{2}} + \frac{53883}{99^{10}}\frac{1\cdot 3}{2\cdot 4}\frac{1\cdot 3\cdot 5\cdot 7}{4^{2}\cdot 8^{2}} + \cdots}\tag{1}$$ By looking at the series it is clear that it belongs to the theory based on $s = 1/4$. The series is very fast converging and each term roughly gives 8 decimal digits. The first term for example gives the approximation $$\pi \approx \frac{9801}{1103\sqrt{8}} = 3.14159273\ldots$$ correct to 6 places of decimals.

### Development by Borwein Brothers

This series was used by Bill Gosper in 1985 to compute the value of $\pi$ to about 17 million digits. Only problem with this calculation was that there was no proof that the series was correct. A comparison with the value of $\pi$ obtained from other sources gave a clear indication that the series had to be correct. The series was finally proved shortly after in 1987 by Borwein brothers. Borwein brothers did not develop the alternative theories in detail, but rather showed how these alternative theories could be obtained from the classical theory by suitable transformation of the hypergeometric series involved. Thus they were able to choose different functions $c(k)$ to express $(2K/\pi)^{2}$ in various ways as series of powers of $c(k)$.

We will first illustrate Borweins' ideas for the case $s = 1/4$. Borweins start by defining the alternative $K$ as follows: $$\boxed{\displaystyle K_{s}(k) = \frac{\pi}{2}\,_{2}F_{1}\left(\frac{1}{2} - s, \frac{1}{2} + s; 1; k^{2}\right)}\tag{2}$$ and using a transformation of hypergeometric series (see this post) they derive: $$\boxed{\displaystyle \frac{2K_{s}(k)}{\pi} =\,_{2}F_{1}\left(\frac{1}{4} - \frac{s}{2}, \frac{1}{4} + \frac{s}{2}; 1; (2kk')^{2}\right)}\tag{3}$$ and then the Clausen's formula is used to obtain $$\boxed{\displaystyle \left(\frac{2K_{s}(k)}{\pi}\right)^{2} =\,_{3}F_{2}\left(\frac{1}{2} - s, \frac{1}{2} + s, \frac{1}{2}; 1, 1; (2kk')^{2}\right)}\tag{4}$$ Next Borweins use some hypergeometric transformations to connect $K_{1/4}$ with the classical $K$. The transformation formula used here is \begin{align}&{}_{2}F_{1}(a, b; a - b + 1; z)\notag\\ &= (1 - z)^{1 - 2b}(1 + z)^{2b - a - 1}\,_{2}F_{1}\left[\frac{a - 2b + 1}{2}, \frac{a - 2b + 2}{2}; a - b + 1; \frac{4z}{(1 + z)^{2}}\right]\tag{5}\end{align} This formula can be proved (with somewhat cumbersome calculation) by showing that both sides satisfy same differential equation and agree at $z = 0$. Putting $a = 1/2, b = 1/2, z = k^{2}$ we see that $$K(k) = (1 + k^{2})^{-1/2}K_{1/4}\left(\frac{2k}{1 + k^{2}}\right)\tag{6}$$ If $h = 2k/(1 + k^{2})$ then $h' = \sqrt{1 - h^{2}} = k'^{2}/(1 + k^{2})$ and hence \begin{align} 2hh' &= \frac{4kk'^{2}}{(1 + k^{2})^{2}} = \frac{4kk'^{2}}{(1 - k^{2})^{2} + 4k^{2}}\notag\\ &= \frac{4kk'^{2}}{k'^{4} + (2k)^{2}}\notag\\ &= \dfrac{2}{\dfrac{k'^{4} + (2k)^{2}}{2kk'^{2}}}\notag\\ &= \dfrac{2}{\dfrac{k'^{2}}{2k} + \dfrac{2k}{k'^{2}}} = \frac{2}{g^{12} + g^{-12}}\tag{7}\end{align} where $g = g(k) = (2k/k'^{2})^{-1/12}$ represents the Ramanujan's class invariant function.

Using equations $(6)$ and $(7)$ in equations $(3)$ and $(4)$ (with $s = 1/4$) we get $$\boxed{\displaystyle \frac{2K}{\pi} = (1 + k^{2})^{-1/2}\,_{2}F_{1}\left(\frac{1}{8}, \frac{3}{8}; 1; \left(\frac{g^{12} + g^{-12}}{2}\right)^{-2}\right)}$$ and $$\boxed{\displaystyle \left(\frac{2K}{\pi}\right)^{2} = (1 + k^{2})^{-1}\,_{3}F_{2}\left(\frac{1}{4},\frac{3}{4},\frac{1}{2}; 1, 1; \left(\frac{g^{12} + g^{-12}}{2}\right)^{-2}\right)}\tag{8}$$ The range of values of $k$ for which the above formulas are valid is $0 \leq k \leq \sqrt{2} - 1$. This limitation comes from the fact that in the formulas $(3)$ and $(4)$ we must have $k \leq k'$ and accordingly we must have $h \leq h'$. We now have an expression for $(2K/\pi)^{2}$ in the form desired and we can apply Ramanujan's technique to find a series for $1/\pi$. After some reasonable amount of calculation the general formula can be written as: $$\boxed{\displaystyle \frac{1}{\pi} = \sum_{m = 0}^{\infty}\frac{(1/4)_{m}(3/4)_{m}(1/2)_{m}}{(m!)^{3}}(a + mb)x_{n}^{2m + 1}}\tag{9}$$ where \begin{align}x_{n} &= \frac{4kk'^{2}}{(1 + k^{2})^{2}} = \frac{2}{g_{n}^{12} + g_{n}^{-12}}\notag\\ (c)_{m} &= c(c + 1)(c + 2)\cdots (c + m - 1)\notag\\ a &= \frac{\sqrt{n}(2g_{n}^{12} - g_{n}^{-12})}{12} - \frac{R_{n}(k, k')}{12}\cdot\frac{g_{n}^{12} + g_{n}^{-12}}{1 + k^{2}}\notag\\ b &= \frac{\sqrt{n}(g_{n}^{12} - g_{n}^{-12})}{2}\notag\end{align} If $n = 2$ then $k = \sqrt{2} - 1$ so that this is the boundary case and it turns out that both $a$ and $b$ are zero in this case. Hence in the above general formula we must have $n > 2$.

The formula $(8)$ can be transformed into a formula containing invariant $G_{n}$ by expressing $K, k, k'$ in terms of $q$ and then replacing $q$ by $(-q)$. When this is done we get the left side as $$\left(\frac{2K}{\pi}\right)^{2} = \theta_{3}^{4}(q) \rightarrow \theta_{3}^{4}(-q) = \theta_{4}^{4}(q) = \frac{\theta_{4}^{4}(q)}{\theta_{3}^{4}(q)}\cdot \theta_{3}^{4}(q) = k'^{2}\left(\frac{2K}{\pi}\right)^{2}$$ and we have \begin{align}\frac{1}{1 + k^{2}} &= \frac{\theta_{3}^{4}(q)}{\theta_{2}^{4}(q) + \theta_{3}^{4}(q)}\notag\\ &= \frac{\theta_{3}^{4}(q)}{16q\psi^{4}(q^{2}) + \theta_{3}^{4}(q)}\notag\\ &\rightarrow \frac{\theta_{3}^{4}(-q)}{-16q\psi^{4}(q^{2}) + \theta_{3}^{4}(-q)}\notag\\ &= \frac{\theta_{4}^{4}(q)}{\theta_{4}^{4}(q) - 16q\psi^{4}(q^{2})}\notag\\ &= \frac{\theta_{4}^{4}(q)}{\theta_{4}^{4}(q) - \theta_{2}^{4}(q)}\notag\\ &= \dfrac{1}{1 - \dfrac{\theta_{2}^{4}(q)}{\theta_{3}^{4}(q)}\dfrac{\theta_{3}^{4}(q)}{\theta_{4}^{4}(q)}}\notag\\ &= \dfrac{1}{1 - \dfrac{k^{2}}{k'^{2}}} = \frac{k'^{2}}{1 - 2k^{2}}\notag\end{align} Also \begin{align}\left(\frac{2}{g^{12} + g^{-12}}\right)^{2} &= \left(\frac{2g^{12}}{g^{24} + 1}\right)^{2}\notag\\ &= \frac{4g^{24}}{(g^{24} + 1)^{2}}\notag\\ &= \frac{4\cdot 2^{-6}q^{-1}\chi^{24}(-q)}{(2^{-6}q^{-1}\chi^{24}(-q) + 1)^{2}}\notag\\ &\rightarrow \frac{-4\cdot 2^{-6}q^{-1}\chi^{24}(q)}{(1 - 2^{-6}q^{-1}\chi^{24}(q))^{2}}\notag\\ &= \frac{-4G^{24}}{(G^{24} - 1)^{2}} = -\left(\frac{2}{G^{12} - G^{-12}}\right)^{2}\notag\end{align} and therefore the formula $(8)$ is transformed into $$\boxed{\displaystyle \left(\frac{2K}{\pi}\right)^{2} = (1 - 2k^{2})^{-1}\,_{3}F_{2}\left(\frac{1}{4},\frac{3}{4},\frac{1}{2}; 1, 1; -\left(\frac{G^{12} - G^{-12}}{2}\right)^{-2}\right)}\tag{10}$$ Using this relation we can derive the following series for $1/\pi$: $$\boxed{\displaystyle \frac{1}{\pi} = \sum_{m = 0}^{\infty}(-1)^{m}\cdot\frac{(1/4)_{m}(3/4)_{m}(1/2)_{m}}{(m!)^{3}}(c + md)y_{n}^{2m + 1}}\tag{11}$$ where \begin{align}y_{n} &= \frac{2}{G_{n}^{12} - G_{n}^{-12}}\notag\\ c &= \frac{G_{n}^{12} - G_{n}^{-12}}{2(1 - 2k^{2})}\left\{\frac{\sqrt{n}}{3}(1 + k^{2}) - \frac{R_{n}(k, k')}{6}\right\} + \frac{\sqrt{n}}{2}k^{2}G_{n}^{12}\notag\\ d &= \frac{\sqrt{n}(G_{n}^{12} + G_{n}^{-12})}{2}\notag\\ n &\geq 4\notag\end{align} Ramanujan's series $(1)$ is based on formula $(9)$ for $n = 58, q = e^{-\pi\sqrt{58}}$. Needless to say the calculations are formidable especially for finding the value of $R_{58}(k,k')$. But the final result is as appealing as it can be, devoid of almost all irrationalities except the bare $\sqrt{2}$.

Next we consider the case when $s = 1/3$. This time we make use of the following identities from the theory of hypergeometric series: $${}_{2}F_{1}\left(a, b; a + b + \frac{1}{2}; z\right) =\,_{2}F_{1}\left(2a, 2b; a + b + \frac{1}{2};\frac{1 - \sqrt{1 - z}}{2}\right)\tag{12}$$ \begin{align}&{}_{2}F_{1}\left(3a, a + \frac{1}{6}; 4a + \frac{2}{3}; z\right)\notag\\ &\,\,\,\,= \left(1 - \frac{z}{4}\right)^{-3a}\,_{2}F_{1}\left(a, a + \frac{1}{3}; 2a + \frac{5}{6}; \frac{27z^{2}}{(4 - z)^{3}}\right)\tag{13}\end{align} \begin{align}&{}_{2}F_{1}\left(3a, \frac{1}{3} - a; 2a + \frac{5}{6}; z\right)\notag\\ &\,\,\,\,= (1 - 4z)^{-3a}\,_{2}F_{1}\left(a, a + \frac{1}{3}; 2a + \frac{5}{6}; \frac{27z}{(4z - 1)^{3}}\right)\tag{14}\end{align} Using these identities we can connect $K_{1/3}$ with classical $K$. First we put $a = 1/12$ in $(13)$ to get $${}_{2}F_{1}\left(\frac{1}{4}, \frac{1}{4};1; z\right) = \left(1 - \frac{z}{4}\right)^{-1/4}\,_{2}F_{1}\left(\frac{1}{12},\frac{5}{12};1; \frac{27z^{2}}{(4 - z)^{3}}\right)$$ Applying $(12)$ on both sides we get $${}_{2}F_{1}\left(\frac{1}{2}, \frac{1}{2};1; \frac{1 - \sqrt{1 - z}}{2}\right) = \left(1 - \frac{z}{4}\right)^{-1/4}\,_{2}F_{1}\left(\frac{1}{6},\frac{5}{6};1; \dfrac{1 - \sqrt{1 - \dfrac{27z^{2}}{(4 - z)^{3}}}}{2}\right)$$ If we set $(1 - \sqrt{1 - z})/2 = k^{2}$ i.e. $z = (2kk')^{2} = G^{-24}$ then we get $$K_{1/3}(h) = \{1 - (kk')^{2}\}^{1/4}K(k)\tag{15}$$ where $$h^{2} = \dfrac{1 - \sqrt{1 - \dfrac{27G^{-48}}{(4 - G^{-24})^{3}}}}{2}$$ so that $$h'^{2} = 1 - h^{2} = \dfrac{1 + \sqrt{1 - \dfrac{27G^{-48}}{(4 - G^{-24})^{3}}}}{2}$$ and therefore $$(2hh')^{2} = \frac{27G^{-48}}{(4 - G^{-24})^{3}} = \frac{27G^{24}}{(4G^{24} - 1)^{3}}\tag{16}$$ Using the relations $(15)$, $(16)$ in $(3)$ and $(4)$ (with $s = 1/3$) we get $$\boxed{\displaystyle \frac{2K}{\pi} = \{1 - (kk')^{2}\}^{-1/4}\,_{2}F_{1}\left(\frac{1}{12}, \frac{5}{12}; 1; \frac{27G^{24}}{(4G^{24} - 1)^{3}}\right)}$$ and $$\boxed{\displaystyle \left(\frac{2K}{\pi}\right)^{2} = \{1 - (kk')^{2}\}^{-1/2}\,_{3}F_{2}\left(\frac{1}{6},\frac{5}{6}, \frac{1}{2};1;1; \frac{27G^{24}}{(4G^{24} - 1)^{3}}\right)}\tag{17}$$ We can now apply Ramanujan's technique and get the following series for $1/\pi$: $$\boxed{\displaystyle \frac{1}{\pi} = \sum_{m = 0}^{\infty}\frac{(1/6)_{m}(5/6)_{m}(1/2)_{m}}{(m!)^{3}}(A + mB)X_{n}^{m}}\tag{18}$$ where \begin{align}X_{n} &= \frac{27G_{n}^{24}}{(4G_{n}^{24} - 1)^{3}}\notag\\ A &= \sqrt{n}\cdot\sqrt{\frac{G_{n}^{24} - 1}{(4G_{n}^{24} - 1)^{3}}} + \frac{2G_{n}^{12}}{\sqrt{4G_{n}^{24} - 1}}\left\{\frac{\sqrt{n}}{3}(1 - 2k^{2}) - \frac{R_{n}(k, k')}{6}\right\}\notag\\ B &= 2\sqrt{n}\sqrt{1 - X_{n}}\notag\end{align} If we put $n = 3$ and note that $R_{3}(k, k') = 1 + 2kk'$ and $G_{3}^{-12} = 2kk' = 1/2$ and $(1 - 2k^{2}) = \sqrt{1 - G_{n}^{-24}}$ then we obtain one of the 14 series given by Ramanujan: $$\boxed{\displaystyle \frac{5\sqrt{5}}{2\pi\sqrt{3}} = 1 + 12\cdot\frac{1}{2}\cdot\frac{1}{6}\cdot\frac{5}{6}\left(\frac{4}{125}\right) + 23\cdot\frac{1\cdot 3}{2\cdot 4}\cdot\frac{1\cdot 7}{6\cdot 12}\cdot\frac{5\cdot 11}{6\cdot 12}\left(\frac{4}{125}\right)^{2} + \cdots }$$ Note that in the formula $(17)$ if we replace $q$ by $(-q)$ the formula remains unchanged (readers are requested to verify this statement) and hence there is no counterpart to it like in the case of formulas obtained for $s = 1/2, 1/4$. However if, instead of hypergeometric identity $(13)$, we make of use of $(14)$ then we arrive at the following formula: $$\boxed{\displaystyle \left(\frac{2K}{\pi}\right)^{2} = \{1 - 4G^{-24}\}^{-1/2}\,_{3}F_{2}\left(\frac{1}{6},\frac{5}{6}, \frac{1}{2};1;1; \frac{-27G^{48}}{(G^{24} - 4)^{3}}\right)}\tag{19}$$ and this has a counterpart which we obtain by changing $q$ into $(-q)$: $$\boxed{\displaystyle \left(\frac{2K}{\pi}\right)^{2} = \{k'^{4} + 16k^{2}\}^{-1/2}\,_{3}F_{2}\left(\frac{1}{6},\frac{5}{6}, \frac{1}{2};1;1; \frac{27g^{48}}{(g^{24} + 4)^{3}}\right)}\tag{20}$$ For $(19)$ we have the following series for $1/\pi$: $$\boxed{\displaystyle \frac{1}{\pi} = \sum_{m = 0}^{\infty}\frac{(1/6)_{m}(5/6)_{m}(1/2)_{m}}{(m!)^{3}}(A + mB)J_{n}^{m}}\tag{21}$$ where \begin{align}J_{n} &= \frac{-27G_{n}^{48}}{(G_{n}^{24} - 4)^{3}}\notag\\ A &= 2\sqrt{n}\cdot\sqrt{\frac{G_{n}^{24} - 1}{(G_{n}^{24} - 4)^{3}}} + \frac{G_{n}^{12}}{\sqrt{G_{n}^{24} - 4}}\left\{\frac{\sqrt{n}}{3}(1 - 2k^{2}) - \frac{R_{n}(k, k')}{6}\right\}\notag\\ B &= \sqrt{n}\sqrt{1 - J_{n}}\notag\end{align} The general family of series for $1/\pi$ based on equation $(20)$ is as follows: $$\boxed{\displaystyle \frac{1}{\pi} = \sum_{m = 0}^{\infty}\frac{(1/6)_{m}(5/6)_{m}(1/2)_{m}}{(m!)^{3}}(A + mB)j_{n}^{m}}\tag{22}$$ where \begin{align} j_{n} &= \frac{27g_{n}^{48}}{(g_{n}^{24} + 4)^{3}}\notag\\ A &= \frac{1}{2k\sqrt{g_{n}^{24} + 4}}\left(\frac{\sqrt{n}}{3}(1 - 2k^{2}) - \frac{R_{n}(k, k')}{6}\right) - \sqrt{n}\cdot\frac{g_{n}^{12}(k^{2} + 7)}{4(g_{n}^{24} + 4)^{3/2}}\notag\\ B &= \sqrt{n}(g_{n}^{12} + k)\cdot\frac{g_{n}^{24} - 8}{(g_{n}^{24} + 4)^{3/2}}\notag\\ n &> 4\notag \end{align} It is rather surprising that Ramanujan does not use the formulas $(21), (22)$ to derive any series for $1/\pi$. The series $(21)$ was finally used by D. V. Chudnovsky and G. V. Chudnovsky in 1989 and for $n = 163$ they obtained $$\boxed{{\displaystyle \frac{1}{\pi} = \frac{1}{426880 \sqrt{10005}} \sum_{m = 0}^\infty \frac{(-1)^m (6m)! (13591409 + 545140134m)}{(3m)!(m!)^3 640320^{3m}}}}\tag{23}$$ which gives around 14 decimal digits per term and the first term itself gives the value correct to 13 places of decimals. As far as I am aware the series $(22)$ has not been used so far in literature.

Note that the Chudnovsky series given above has not been calculated by directly putting $n = 163$ in the formula $(21)$ (the main difficulty being the calculation of $R_{n}(k, k')$ for $n = 163$), but rather the formula $(21)$ is derived using a different approach through which it is possible to show that the ratio $A/B$ is rational for $n = 163$ and then a numerical calculation of $A/B$ is done and using computer algorithms we find a rational number which matches the numerical value of $A/B$. This alternative approach has been described in a paper by Dr. Bruce C. Berndt and Dr. H. H. Chan.