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

In this post we will discuss Ramanujan's classic paper "Modular Equations and Approximations to $\pi$" where Ramanujan offered many amazing formulas and approximations for $\pi$ and showed us the way to create new theories of elliptic and theta functions. However the paper as written in his classic style is devoid of proofs of the most important results. The post would try to elaborate on some of the results mentioned therein.

### Class Invariants and Approximations to $\pi$

First and foremost Ramanujan uses his class invariants to find many approximations to $\pi$. From the definitions \begin{align}G_{n} &= 2^{-1/4}e^{\pi\sqrt{n}/24}(1 + e^{-\pi\sqrt{n}})(1 + e^{-3\pi\sqrt{n}})(1 + e^{-5\pi\sqrt{n}})\cdots\notag\\ g_{n} &= 2^{-1/4}e^{\pi\sqrt{n}/24}(1 - e^{-\pi\sqrt{n}})(1 - e^{-3\pi\sqrt{n}})(1 - e^{-5\pi\sqrt{n}})\cdots\notag\end{align} it is clear that if $n$ is large we can write: \begin{align}\pi &\approx \frac{24}{\sqrt{n}}\log(2^{1/4}G_{n})\notag\\ \pi &\approx \frac{24}{\sqrt{n}}\log(2^{1/4}g_{n})\notag\end{align} and clearly the error would be of the order of $e^{-\pi\sqrt{n}}$. Since both $G_{n}$ and $g_{n}$ are algebraic numbers often expressible as surds, the above formulas give approximations to $\pi$ as logarithms of certain surds. Since a modular equation of degree $n$ allows us to calculate $G_{n}$ and $g_{2n}$ (see previous post), it is better to use the formula involving $g_{n}$.

Thus for example if $n = 10$ we have $g_{n} = g_{10} = \sqrt{(1 + \sqrt{5})/2}$ and hence we have the approximation
$$\pi \approx \frac{12}{\sqrt{10}}\log\left(\frac{1 + \sqrt{5}}{\sqrt{2}}\right) = \frac{6}{\sqrt{10}}\log(3 + \sqrt{5}) = 3.14122\cdots$$ so that the approximation is good upto 3 places of decimals and from $g_{18} = (5 + 2\sqrt{6})^{1/6}$ we get $$\pi \approx 4\sqrt{2}\log\{2^{1/4}(5 + 2\sqrt{6})^{1/6}\} = 3.141583\cdots$$ If we use the value of $g_{100}$ we get \begin{align}\pi &\approx \frac{24}{\sqrt{100}}\log(2^{1/4}g_{100})\notag\\ &= \frac{12}{5}\log\{2^{-7/8}(1 + \sqrt{5})^{5/4}(3 + 2\sqrt{5})^{1/4}\}\notag\\ &= 3.14159265358973873\ldots\notag\end{align} which is correct to 13 places of decimals.

Ramanujan gives very good approximations using the values of $G_{n}, g_{n}$. Since we have not established the values of these class invariants in our posts we can't do any better than just displaying an approximation of $\pi$ correct to $31$ places of decimals (this is based on the value of $g_{522}$): $$\pi \approx \frac{4}{\sqrt{522}}\log\left[\left(\frac{5 + \sqrt{29}}{\sqrt{2}}\right)^{3}(5\sqrt{29} + 11\sqrt{6})\left\{\sqrt{\frac{9 + 3\sqrt{6}}{4}} + \sqrt{\frac{5 + 3\sqrt{6}}{4}}\right\}^{6}\right]$$ To get to this formula Ramanujan first obtained the value of $g_{58}$ from a modular equation of degree $29$ (that's why we see $\sqrt{29}$ in the above formula) and then used the relation between $g_{9n}$ and $g_{n}$ to calculate $g_{522} = g_{9 \times 58}$.

### Ramanujan's function $P(q)$

Next Ramanujan studies a very peculiar function $P(q)$ defined by $$P(q) = 1 - 24\sum_{n = 1}^{\infty}\frac{nq^{2n}}{1 - q^{2n}}$$ The origin of this function is from the logarithmic derivative of the Dedekind's Eta function $$\eta(q) = q^{1/12}(1 - q^{2})(1 - q^{4})(1 - q^{6})\cdots = q^{1/12}(q^{2};q^{2})_{\infty} = q^{1/12}f(-q^{2})$$ Since $q = e^{-\pi K'/K}$ it follows that $$\frac{dq}{dk} = e^{-\pi K'/K}(-\pi)\frac{d}{dk}\left(\frac{K'}{K}\right) = \frac{\pi^{2}q}{2kk'^{2}K^{2}}$$ (see this post).

And then \begin{align}\frac{d}{dk}\{\log(\eta(q))\} &= \frac{dq}{dk}\cdot\frac{d}{dq}\{\log(\eta(q))\}= \frac{dq}{dk}\cdot\frac{d}{dq}\left\{\frac{\log q}{12} + \sum_{n = 1}^{\infty}\log(1 - q^{2n})\right\}\notag\\ &= \frac{dq}{dk}\left\{\frac{1}{12q} - 2\sum_{n = 1}^{\infty}\frac{nq^{2n - 1}}{1 - q^{2n}}\right\}\notag\\ &= \frac{1}{12q}\cdot\frac{dq}{dk}\cdot P(q)\notag\\ &= \frac{\pi^{2}P(q)}{24kk'^{2}K^{2}}\notag\end{align} Now we have \begin{align} \eta(q) &= q^{1/12}(q^{2};q^{2})_{\infty} = q^{1/12}f(-q^{2})\notag\\ &= q^{1/12}\sqrt{\phi^{2}(-q^{2})\psi(q^{2})} = q^{1/12}\sqrt{\phi(q)\phi(-q)\psi(q^{2})}\notag\\ &= q^{1/12}\sqrt{2^{-1}q^{-1/4}\theta_{2}(q)\theta_{3}(q)\theta_{4}(q)}\notag\\ &= 2^{-1/3}\theta_{3}(q)\sqrt{\frac{\theta_{2}(q)}{\theta_{3}(q)}\frac{\theta_{4}(q)}{\theta_{3}(q)}}\notag\\ &= 2^{-1/3}\sqrt{\frac{2K}{\pi}}(kk')^{1/6}\notag\end{align} Let's now suppose that the complete elliptic integrals $L, L'$ for modulus $l$ corresponds to $q^{n}$ so that $$\frac{L'}{L} = n\frac{K'}{K}$$ and $$\frac{dl}{dk} = n\frac{ll'^{2}L^{2}}{kk'^{2}K^{2}}$$ If $n$ is a positive rational then the relation between $k, l$ is an algebraic one and hence $dl/dk$ and $K/L$ are algebraic functions of $k, l$.

Next we can see that $$\frac{\eta(q^{n})}{\eta(q)} = \left(\frac{ll'}{kk'}\right)^{1/6}\sqrt{\frac{L}{K}}\tag{1}$$ and $$\frac{d}{dk}\{\log(\eta(q^{n}))\} = n\frac{\pi^{2}P(q^{n})}{24kk'^{2}K^{2}}$$ so that logarithmic differentiation of the relation betweenn $\eta(q)$ and $\eta(q^{n})$ above yields $$\frac{\pi^{2}}{24kk'^{2}K^{2}}\{nP(q^{n}) - P(q)\} = \frac{1}{6}\frac{d}{dk}\left\{\log\left(\frac{ll'}{kk'}\right)\right\} + \frac{1}{2}\frac{d}{dk}\left\{\log\left(\frac{L}{K}\right)\right\}\tag{2}$$ Since $dl/dk$ and $L/K$ are algebraic functions of $k, l$ it turns out that we can write the above equation in the form $$nP(q^{n}) - P(q) = \frac{KL}{\pi^{2}}\cdot A(k)$$ where $A(k)$ is an algebraic function of $k$ with algebraic numbers as coefficients. If we put $l = k'$ in the above relation we get $q = e^{-\pi/\sqrt{n}}$ and $q^{n} = e^{-\pi\sqrt{n}}$ so that $$nP(e^{-\pi\sqrt{n}}) - P(e^{-\pi/\sqrt{n}}) = \frac{K^{2}}{\pi^{2}}\cdot A\tag{3}$$ where $A$ is an algebraic number dependent on $n$.

Putting $l = k'$ in equation $(1)$ we get $$\frac{\eta(e^{-\pi\sqrt{n}})}{\eta(e^{-\pi/\sqrt{n}})} = n^{-1/4}$$ i.e. $$n^{1/4}e^{-\pi\sqrt{n}/12}(1 - e^{-2\pi\sqrt{n}})(1 - e^{-4\pi\sqrt{n}})\cdots =e^{-\pi/(12\sqrt{n})}(1 - e^{-2\pi/\sqrt{n}})(1 - e^{-4\pi/\sqrt{n}})\cdots$$ Note that this relation is valid for any $n > 0$ and not just for the rational $n$. And hence we can do a logarithmic differentiation with respect to $n$ to get $$nP(e^{-\pi\sqrt{n}}) + P(e^{-\pi/\sqrt{n}}) = \frac{6\sqrt{n}}{\pi}\tag{4}$$ If we put $n = 1$ above we get the beautiful formula $$1 - 24\left(\frac{1}{e^{2\pi} - 1} + \frac{2}{e^{4\pi} - 1}+ \frac{3}{e^{6\pi} - 1} + \cdots\right) = \frac{3}{\pi}$$ Adding equations $(3)$ and $(4)$ we get $$P(e^{-\pi\sqrt{n}}) = \frac{K^{2}}{\pi^{2}}\cdot A + \frac{3}{\pi\sqrt{n}}\tag{5}$$ where $A$ is some algebraic number. Equation $(4)$ is valid for all real numbers $n > 0$, but equations $(3), (5)$ are valid only for rational values of $n$.

### Values of $nP(q^{n}) - P(q)$

Ramanujan calculated the values of $nP(q^{n}) - P(q)$ in the form $(4KL/\pi^{2})A(k)$ for many values of $n$ and from his results it is clear that he was interested in the function $$\frac{nP(q^{n}) - P(q)}{\phi^{2}(q^{n})\phi^{2}(q)} = R_{n}(l, k)$$ Here we will do the calculations for $n = 2, 3$. For $n = 2$ we have $l = (1 - k')/(1 + k')$ and hence $$\frac{L}{K} = \frac{1}{1 + l} = \frac{1 + k'}{2}$$ Again \begin{align}\left(\frac{ll'}{kk'}\right)^{2} &= \left(\frac{2\sqrt{k'}}{1 + k'}\cdot\frac{1 - k'}{1 + k'}\cdot\frac{1}{kk'}\right)^{2}\notag\\ &= \frac{4(1 - k')^{2}}{k'(1 + k')^{4}(1 - k'^{2})} = \frac{4(1 - k')}{k'(1 + k')^{5}}\notag\end{align} Therefore \begin{align}&\frac{1}{6}\frac{d}{dk}\left\{\log\left(\frac{ll'}{kk'}\right)\right\} + \frac{1}{2}\frac{d}{dk}\left\{\log\left(\frac{L}{K}\right)\right\}\notag\\ &\,\,\,\,\,\,\,\,= \frac{1}{12}\frac{d}{dk}\left\{\log\left(\frac{ll'}{kk'}\right)^{2}\right\} + \frac{1}{2}\frac{d}{dk}\left\{\log\left(\frac{L}{K}\right)\right\}\notag\\ &\,\,\,\,\,\,\,\,= \frac{1}{12}\frac{dk'}{dk}\frac{d}{dk'}\left\{\log\left(\frac{4(1 - k')}{k'(1 + k')^{5}}\right)\right\} + \frac{1}{2}\frac{dk'}{dk}\frac{d}{dk'}\left\{\log\left(\frac{1 + k'}{2}\right)\right\}\notag\\ &\,\,\,\,\,\,\,\,= \frac{1}{12}\frac{dk'}{dk}\left(-\frac{1}{k'} - \frac{1}{1 - k'} - \frac{5}{1 + k'} + \frac{6}{1 +k'}\right)\notag\\ &\,\,\,\,\,\,\,\,= \frac{1}{12}\frac{-k}{k'}\left(-\frac{1}{k'} - \frac{1}{1 - k'} + \frac{1}{1 + k'}\right)\notag\\ &\,\,\,\,\,\,\,\,= \frac{1}{12}\cdot\frac{1 + k'^{2}}{kk'^{2}}\notag\end{align} and thus \begin{align}2P(q^{2}) - P(q) &= \frac{2K^{2}}{\pi^{2}}(1 + k'^{2})\notag\\ &= \frac{4KL}{\pi^{2}}\cdot\frac{1 + k'^{2}}{1 + k'}\notag\\ &= \frac{4KL}{\pi^{2}}\cdot\frac{1 + l^{2}}{1 + l}\notag\\ &= \frac{4KL}{\pi^{2}}\cdot\frac{1 + l^{2} + k'(1 + l) - 1 + l}{1 + l}\notag\\ &= \frac{4KL}{\pi^{2}}\{k' + l\}\notag\end{align} For $n = 3$ and above it is best to recast the equation $(2)$ in a simpler form. Let us also use the notation $m = K/L$ for Ramanujan's multiplier. Then we have $$\frac{dl}{dk} = \frac{nll'^{2}}{m^{2}kk'^{2}}$$ and \begin{align}nP(q^{n}) - P(q) &= \frac{4K^{2}}{\pi^{2}}(kk'^{2})\frac{d}{dk}\left\{\log\left(\frac{ll'}{kk'}\right)\right\} - \frac{12K^{2}}{\pi^{2}}(kk'^{2})\frac{d}{dk}(\log m)\notag\\ &= \frac{4KL}{\pi^{2}}\left(\frac{mkk'^{2}}{ll'}\frac{d}{dk}(ll') - \frac{mkk'^{2}}{kk'}\frac{d}{dk}(kk') - 3kk'^{2}\frac{dm}{dk}\right)\notag\\ &= \frac{4KL}{\pi^{2}}\left(\frac{mkk'^{2}}{ll'}\frac{dl}{dk}\frac{1 - 2l^{2}}{l'} - m(1 - 2k^{2}) - 3kk'^{2}\frac{dm}{dk}\right)\notag\\ \Rightarrow nP(q^{n}) - P(q) &= \frac{4KL}{\pi^{2}}\left((1 - 2l^{2})\frac{n}{m} - (1 - 2k^{2})m - 3kk'^{2}\frac{dm}{dk}\right)\tag{6}\end{align} If $n = 3$ then we have \begin{align}l^{2} &= \beta = \frac{(m - 1)^{3}(m + 3)}{16m}\notag\\ k^{2} &= \alpha = \frac{(m - 1)(m + 3)^{3}}{16m^{3}}\notag\\ l'^{2} &= 1 - \beta = \frac{(m + 1)^{3}(3 - m)}{16m}\notag\\ k'^{2} &= 1 - \alpha = \frac{(m + 1)(3 - m)^{3}}{16m^{3}}\notag\end{align} Differentiation yields \begin{align} 2k\cdot\frac{dk}{dm} &= \frac{16m^{3}\{(m + 3)^{3} + 3(m - 1)(m + 3)^{2}\} - 48m^{2}(m - 1)(m + 3)^{3}}{256m^{6}}\notag\\ &= \frac{(m + 3)^{2}\{m(m + 3 + 3m - 3) - 3(m - 1)(m + 3)\}}{16m^{4}}\notag\\ &= \frac{(m + 3)^{2}(m - 3)^{2}}{16m^{4}}\notag\end{align} Its time to do some tedious algebra. We have \begin{align} \frac{nP(q^{n}) - P(q)}{4KL/\pi^{2}} &= (1 - 2l^{2})\frac{n}{m} - (1 - 2k^{2})m - 3kk'^{2}\frac{dm}{dk}\notag\\ &= \left(1 - \frac{(m - 1)^{3}(m + 3)}{8m}\right)\frac{3}{m} - \left(m - \frac{(m - 1)(m + 3)^{3}}{8m^{2}}\right)\notag\\ &\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, - \frac{96m^{4}}{(m + 3)^{2}(m - 3)^{2}}\cdot k^{2}k'^{2}\notag\\ &= \frac{3 - m^{2}}{m} + \frac{(m - 1)(m + 3)}{8m^{2}}\{(m + 3)^{2} - 3(m - 1)^{2}\}\notag\\ &\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, + \frac{3(m^{2} - 1)(m^{2} - 9)}{8m^{2}}\notag\\ &= \frac{3 - m^{2}}{m} + \frac{(m - 1)(m + 3)}{8m^{2}}\{m^{2} + 6m - 3\}\notag\\ &= \frac{48m - 16m^{3} + (m - 1)(m + 3)(2m^{2} + 12m - 6)}{16m^{2}}\notag\\ &= \frac{48m - 16m^{3}}{16m^{2}}\notag\\ &\,\,\,\,\,\,\,\,\,\, + \frac{(m - 1)(m + 3)(m^{2} + 2m - 3 + m^{2} + 10m - 3)}{16m^{2}}\notag\\ &= \frac{48m - 16m^{3} + (m - 1)^{2}(m + 3)^{2}}{16m^{2}}\notag\\ &\,\,\,\,\,\,\,\,\,\, + \frac{(m^{2} + 2m - 3)(m^{2} + 10m - 3)}{16m^{2}}\notag\\ &= \frac{48m - 16m^{3} + (m - 1)^{2}(m + 3)^{2}}{16m^{2}}\notag\\ &\,\,\,\,\,\,\,\,\,\, + \frac{\{(m + 1)^{2} - 4\}\{(m - 3)^{2} + 16m - 12\}}{16m^{2}}\notag\\ &= \frac{48m - 16m^{3} + (m - 1)^{2}(m + 3)^{2}}{16m^{2}}\notag\\ &\,\,\,\,\,\,\,\,\,\, + \frac{(m + 1)^{2}(m - 3)^{2} + 4(4m^{3} + 4m^{2}- 12m)}{16m^{2}}\notag\\ &= 1 + \frac{(m - 1)^{2}(m + 3)^{2}}{16m^{2}} + \frac{(m + 1)^{2}(m - 3)^{2}}{16m^{2}}\notag\\ &= 1 + kl + k'l'\notag\end{align} So we have $$3P(q^{3}) - P(q) = \frac{4KL}{\pi^{2}}\{1 + kl + k'l'\}$$ From the above it is clear that even if we know the modular equation for some degree $n$, it is very time consuming and tedious to find an expression for $nP(q^{n}) - P(q)$. No one has any idea how Ramanujan calculated the values for $nP(q^{n}) - P(q)$ for large values of $n$. The values of $R_{n}(l, k)$ for $n = 2, 3, 4, 5, 7, 9, 11, 15, 17, 19, 23, 31, 35$ were provided by Ramanujan and we tabulate it below: $$\begin{array}{|r|l|} \hline\\ n & R_{n}(l, k)\\ \hline\\ 2 & k' + l\\ \hline\\ 3 & 1 + kl + k'l'\\ \hline\\ 4 & \dfrac{3(1 + k')(1 + l)}{2}\\ \hline\\ 5 & (3 + kl + k'l')\sqrt{\dfrac{1 + kl + k'l'}{2}}\\ \hline\\ 7 & 3(1 + kl + k'l')\\ \hline\\ 9 & \sqrt{14(1 + k^{2}l^{2} + k'^{2}l'^{2}) + 36(kl + k'l' - kk'll') + \dfrac{96kk'll'}{1 - kl - k'l'}}\\ \hline\\ 11 & 2\left\{2(1 + kl + k'l') + \sqrt{kl} + \sqrt{k'l'} - \sqrt{kk'll'}\right\}\\ \hline\\ 15 & \left\{1 + (kl)^{1/4} + (k'l')^{1/4}\right\}^{4} - (1 + kl + k'l')\\ \hline\\ 17 & \sqrt{A}\\ \hline\\ 19 & 6\left\{(1 + kl + k'l') + \sqrt{kl} + \sqrt{k'l'} - \sqrt{kk'll'}\right\}\\ \hline\\ 23 & 11(1 + kl + k'l') - 20(4kk'll')^{1/3} - 16(4kk'll')^{1/6}\left(1 + \sqrt{kl} + \sqrt{k'l'}\right)\\ \hline\\ 31 & 3B\\ \hline\\ 35 & 2\left(\sqrt{kl} + \sqrt{k'l'} - \sqrt{kk'll'}\right) + (4kk'll')^{-1/6}\left(1 - \sqrt{kl} - \sqrt{k'l'}\right)^{3}\\ \hline\end{array}$$ where \begin{align} A &= 44(1 + k^{2}l^{2} + k'^{2}l'^{2})\notag\\ &\,\,\,\,\,\, + 168(kl + k'l' - kk'll')\notag\\ &\,\,\,\,\,\, - 102(1 - kl - k'l')(4kk'll')^{1/3}\notag\\ &\,\,\,\,\,\, - 192(4kk'll')^{2/3}\notag\end{align} and \begin{align} B &= 3(1 + kl + k'l')\notag\\ &\,\,\,\,\,\, + 4\left(\sqrt{kl} + \sqrt{k'l'} + \sqrt{kk'll'}\right)\notag\\ &\,\,\,\,\,\, - 4(kk'll')^{1/4}\left(1 + (kl)^{1/4} + (k'l')^{1/4}\right)\notag\end{align} The only way these relations have been verified is by using the modular form approach where both the sides are expanded as a series in powers of $q$ and then comparing coefficients upto a certain power of $q$. Under certain conditions if the coefficients in the series of a modular form are zero upto a certain number of terms then the entire modular form is identically zero. However the calculation of the coefficients is performed using some computer algebra packages. So even after almost a century many of the formulas of Ramanujan have not been proved using elementary techniques.

In the same paper Ramanujan says that using the expressions for $nP(q^{n}) - P(q)$ the values of $P(e^{-\pi\sqrt{n}})$ can be calculated through equation $(5)$. And then he just hints that using the values of $rP(q^{r}) - P(q)$ and $sP(q^{s}) - P(q)$ one can calculate $P(e^{-\pi\sqrt{rs}})$. Let $p = rs$ and $k, \gamma, l$ correspond to $q, q^{r} = q', q^{rs} = q^{p} = q'^{s}$ and similarly for the complete elliptic integrals $K, \Gamma, L$. Then we have \begin{align}\frac{pP(q^{p}) - P(q)}{\phi^{2}(q^{p})\phi^{2}(q)} &= \frac{pP(q^{p}) - rP(q^{r}) + rP(q^{r}) - P(q)}{\phi^{2}(q^{p})\phi^{2}(q)}\notag\\ &= \frac{r\{sP(q'^{s}) - P(q')\}}{\phi^{2}(q^{p})\phi^{2}(q)} + \frac{rP(q^{r}) - P(q)}{\phi^{2}(q^{p})\phi^{2}(q)}\notag\\ &= \frac{r\{sP(q'^{s}) - P(q')\}}{\phi^{2}(q'^{s})\phi^{2}(q')}\frac{\phi^{2}(q^{r})}{\phi^{2}(q)} + \frac{rP(q^{r}) - P(q)}{\phi^{2}(q^{r})\phi^{2}(q)}\frac{\phi^{2}(q')}{\phi^{2}(q'^{s})}\notag\\ &= rR_{s}(l, \gamma)\frac{\Gamma}{K} + R_{r}(\gamma, k)\frac{\Gamma}{L}\notag\end{align} and therefore $$R_{rs}(l, k) = rR_{s}(l, \gamma)\frac{\Gamma}{K} + R_{r}(\gamma, k)\frac{\Gamma}{L}$$ i.e. $$R_{rs}(l, k) = R_{s}(l, \gamma)\cdot\frac{r}{m_{r}} + R_{r}(\gamma, k)m_{s}\tag{7}$$ where $m_{r} = m_{r}(\gamma, k)$ is multiplier of degree $r$ and $m_{s} = m_{s}(l, \gamma)$ is multiplier of degree $s$.

Again if we put $q = e^{-\pi/\sqrt{n}}$ in equation $(6)$ so that $q^{n} = e^{-\pi\sqrt{n}}$ then we have $l = k', m = \sqrt{n}$ and \begin{align} R_{n}(l, k) &= \sqrt{n}(1 - 2l^{2}) - \sqrt{n}(1 - 2k^{2}) - 3kk'^{2}\frac{dm}{dl}\frac{dl}{dk}\notag\\ &= 2\sqrt{n}(k^{2} - l^{2}) - 3ll'^{2}\frac{dm}{dl}\notag\end{align} Changing the notation such that $k$ corresponds to $q = e^{-\pi\sqrt{n}}$ we get $$R_{n}(k, k') = 2\sqrt{n}(1 - 2k^{2}) - 3kk'^{2}\frac{d}{dk}m(k, k')\tag{8}$$ and then clearly the value of $P(e^{-\pi\sqrt{n}})$ is given by $$P(e^{-\pi\sqrt{n}}) = \frac{R_{n}(k, k')}{2\sqrt{n}}\left(\frac{2K}{\pi}\right)^{2} + \frac{3}{\pi\sqrt{n}}\tag{9}$$ Ramanujan used the above value of $P(e^{-\pi\sqrt{n}})$ to give beautiful series for $\pi$. In the next post we will see his ingenuity in deriving these series.

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

1. Here is a similar infinite product series which I found by chance:

phi = e^pi/6 * [PI (1+e^-5(2k-1)pi)] / [PI (1+e^-(2k-1)pi)]

Of note: The infinite product series (which adjusts the logarithmic spiral at 30 degrees) has as its repeating term: (1 + e^-k(pi)), with k representing the sequence of all odd integers excluding those which are divisible by five (1,3,7,9,11,13,17,19,21,23,27,....).

Further, as you show above with the formula for Gn, the same repeating term with k representing all odd integers adjusts the logarithmic spiral at 7.5 degrees to the fourth root of 2.

And further, the same repeating term with k representing only the odd integers that are divisible by 5, adjusts the logarithmic spiral at 37.5 degrees to the value of the product of the golden ratio with the fourth root of 2. In this case, the first term of the series is so small that it is easy to see the close relation (at e^5pi/24) with a calculator.

I asked the following question on "mathematics.stack.exchange" question: Would this formula fit within, or be obtainable by, the theory of modular units (by Kubert and Lang)? I am entirely unfamiliar with that level of math, but I was told that the theory produces algebraic values for special infinite series products at CM-points. There was no response to the question.

2. @Anonymous
In your formula for $\phi$ the product runs from $k = 1$ to $k = \infty$?

3. @Anonymous
Your formula can be expressed as $$\phi = e^{\pi/6}\prod_{k = 1}^{\infty}\frac{1 + e^{-5(2k - 1)\pi}}{1 + e^{-(2k - 1)\pi}} = \frac{2^{-1/4}e^{5\pi/24}}{2^{-1/4}e^{\pi/24}}\prod_{k = 1}^{\infty}\frac{1 + e^{-5(2k - 1)\pi}}{1 + e^{-(2k - 1)\pi}}$$ Clearly we can see that the rightmost expression is $G_{25}/G_{1}$. Noting that $G_{25} = \phi$ and $G_{1} = 1$ we establish your formula.

For the proof of values of $G_{1}, G_{25}$ read my previous post http://paramanands.blogspot.com/2012/03/ramanujans-class-invariants.html