# Elementary Approach to Modular Equations: Ramanujan's Theory 1

Ramanujan developed his theory of modular equations using the theory of theta functions independently of Jacobi. A complete understanding of his approach is unfortunately not possible till now because he did not publish something like Fundamenta Nova containing detailed explanations of his approach. What we have today is his Notebooks edited by Bruce C. Berndt and his Collected Papers. His Notebooks are just statements of various mathematical formulas without any proof. A large part of these notebooks is concerned with modular equations and modern authors have not been able to discern his methods fully. Hence I will not be able to present a true picture of his approach. Rather I will try to present whatever I understand from his Collected Papers and his Notebooks and only focus on the elementary aspects.

### Ramanujan's Theta Functions

Ramanujan started his theory of modular equations from the relation $L'/L = nK'/K$ and worked with the parameter $q = e^{-\pi K'/K}$. The modulus $k$ can be expressed in form of theta functions of parameter $q$. Thus we have $k = k(q) = \theta_{2}^{2}(q)/\theta_{3}^{2}(q)$. From the equation $L'/L = nK'/K$ we immediately see that $l = \theta_{2}^{2}(q^{n})/\theta_{3}^{2}(q^{n})$. Thus an algebraic relation between $k$ and $l$ is actually a relation between theta functions of parameter $q$ and $q^{n}$. Ramanujan was such an expert in formal manipulations of series, products and continued fractions that he readily obtained many relations between theta functions of $q$ and $q^{n}$ and then transformed them into the traditional relation between $k, l$. Thus his modular equations are quite diverse in nature and sometimes they also contain more than 2 moduli.

Following Ramanujan we define the Ramanujan Theta Function $f(a, b)$ by $$f(a, b) = \sum_{n = -\infty}^{\infty}a^{n(n + 1)/2}b^{n(n - 1)/2} = 1 + \sum_{n = 1}^{\infty}(ab)^{n(n - 1)/2}(a^{n} + b^{n})$$ for all complex numbers $a, b$ with $|ab| < 1$. This function has the following elementary properties
• $f(a, b) = f(b, a)$
• $f(-1, a) = 0$
• $f(1, a) = 2f(a, a^{3})$
• $f(a, b) = a^{n(n + 1)/2}b^{n(n - 1)/2}f(a(ab)^{n}, b(ab)^{-n})$ where $n$ is an integer
The first property is quite obvious and follows from the observation that changing the index of summation in definition of $f(a, b)$ from $n$ to $-n$ leads to exchange of $a$ and $b$.

For the second property we have \begin{align} f(-1, a) &= f(a, -1) = \sum_{n = -\infty}^{\infty}a^{n(n + 1)/2}(-1)^{n(n - 1)/2}\notag\\ &= \sum_{n = -\infty}^{n = 0}a^{n(n + 1)/2}(-1)^{n(n - 1)/2} + \sum_{n = 1}^{\infty}a^{n(n + 1)/2}(-1)^{n(n - 1)/2}\notag\\ &= \sum_{n = 0}^{\infty}(-1)^{n(n + 1)/2}a^{n(n - 1)/2} + \sum_{n = 1}^{\infty}(-1)^{n(n - 1)/2}a^{n(n + 1)/2}\notag\\ &= 1 - 1 + \sum_{n = 2}^{\infty}(-1)^{n(n + 1)/2}a^{n(n - 1)/2} + \sum_{n = 1}^{\infty}(-1)^{n(n - 1)/2}a^{n(n + 1)/2}\notag\\ &= \sum_{n = 1}^{\infty}(-1)^{(n + 1)(n + 2)/2}a^{n(n + 1)/2} + \sum_{n = 1}^{\infty}(-1)^{n(n - 1)/2}a^{n(n + 1)/2}\notag\end{align} Now $$\frac{(n + 1)(n + 2)}{2} - \frac{n(n - 1)}{2} = \frac{n^{2} + 3n + 2 - n^{2} + n}{2} = 2n + 1$$ so that $(-1)^{(n + 1)(n + 2)/2}$ and $(-1)^{n(n - 1)/2}$ are of opposite signs and hence the sum cancels to zero.

To handle $f(1, a)$ we have \begin{align} f(1, a) &= \sum_{n = -\infty}^{\infty}a^{n(n + 1)/2}\notag\\ &= 1 + 1 + \sum_{n = -\infty}^{-2}a^{n(n + 1)/2} + \sum_{n = 1}^{\infty}a^{n(n + 1)/2}\notag\\ &= 2 + \sum_{n = 1}^{\infty}a^{n(n + 1)/2} + \sum_{n = 2}^{\infty}a^{n(n - 1)/2}\notag\\ &= 2 + \sum_{n = 1}^{\infty}a^{n(n + 1)/2} + \sum_{n = 1}^{\infty}a^{n(n + 1)/2}\notag\\ &= 2\left(1 + \sum_{n = 1}^{\infty}a^{n(n + 1)/2}\right)\notag\end{align} Splitting the sum on right into even and odd indices we get \begin{align} f(1, a) &= 2\left(1 + \sum_{n = 1}^{\infty}a^{n(2n + 1)} + \sum_{n = 1}^{\infty}a^{n(2n - 1)}\right)\notag\\ &= 2\left(1 + \sum_{n = 1}^{\infty}a^{n(n - 1)/2}(a^{3})^{n(n + 1)/2} + \sum_{n = 1}^{\infty}a^{n(n + 1)/2}(a^{3})^{n(n - 1)/2}\right) = 2f(a, a^{3})\notag\end{align} The last equation can be handled as follows: \begin{align} f(a, b) &= \sum_{k = -\infty}^{\infty}a^{k(k + 1)/2}b^{k(k - 1)/2}\notag\\ &= \sum_{k = -\infty}^{\infty}a^{(k + n)(k + n + 1)/2}b^{(k + n)(k + n - 1)/2}\notag\\ &= a^{n(n + 1)/2}b^{n(n - 1)/2}\sum_{k = -\infty}^{\infty}a^{k(k + 2n + 1)/2}b^{k(k + 2n - 1)/2}\notag\\ &= a^{n(n + 1)/2}b^{n(n - 1)/2}\sum_{k = -\infty}^{\infty}\{a(ab)^{n}\}^{k(k + 1)/2}\{b(ab)^{-n}\}^{k(k - 1)/2}\notag\\ &= a^{n(n + 1)/2}b^{n(n - 1)/2}f(a(ab)^{n}, b(ab)^{-n})\notag\end{align} If we put $a = qe^{2iz}, b = qe^{-2iz}$ we obtain $f(a, b) = \sum_{n = -\infty}^{\infty}q^{n^{2}}e^{2inz} = \theta_{3}(z, q)$ which gives the link between Ramanujan's theta function and the classical Jacobi's theta function.

The Jacobi's Triple Product identity is given by $$\theta_{3}(z, q) = \sum_{n = -\infty}^{\infty}q^{n^{2}}e^{2inz} = \prod_{n = 1}^{\infty}(1 - q^{2n})(1 + q^{2n - 1}e^{2iz})(1 + q^{2n - 1}e^{-2iz})$$ and this transforms to the following when we put $a = qe^{2iz}, b = qe^{-2iz}, q^{2} = ab$ \begin{align}f(a, b) &= \prod_{n = 1}^{\infty}(1 - (ab)^{n})(1 + q^{2n - 2}a)(1 + q^{2n - 2}b)\notag\\ &= \prod_{n = 1}^{\infty}(1 - (ab)^{n})(1 + a(ab)^{n - 1})(1 + b(ab)^{n - 1})\notag\\ &= (-a;ab)_{\infty}(-b;ab)_{\infty}(ab;ab)_{\infty}\notag\end{align} where we have the notation \begin{align}(a; q)_{n} &= \prod_{k = 1}^{n}(1 - aq^{k - 1})\notag\\ (a; q)_{\infty} &= \prod_{k = 1}^{\infty}(1 - aq^{k - 1})\notag\end{align} Next Ramanujan defines his other theta functions in terms of $f(a, b)$:
• $\displaystyle \phi(q) = f(q, q) = \sum_{n = -\infty}^{\infty}q^{n^{2}} = \theta_{3}(q) = \frac{(-q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}}{(q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty}}$
• $\displaystyle \psi(q) = f(q, q^{3}) = \sum_{n = 0}^{\infty}q^{n(n + 1)/2} = \frac{(q^{2};q^{2})_{\infty}}{(q;q^{2})_{\infty}}$
• $\displaystyle f(-q) = f(-q, -q^{2}) = \sum_{n = -\infty}^{\infty}(-1)^{n}q^{n(3n + 1)/2} = (q;q)_{\infty}$
• $\displaystyle \chi(q) = (-q;q^{2})_{\infty} = \prod_{n = 1}^{\infty}(1 + q^{2n - 1})$
Clearly from the definitions of $f(a, b)$ and Jacobi's Triple Product identity we can see that $$\phi(q) = ((-q;q^{2})_{\infty})^{2}(q^{2};q^{2})_{\infty}$$ Ramanujan changes one of the factors $(-q;q^{2})_{\infty}$ in a form so that the product formula for $\phi(q)$ looks more symmetrical. Thus \begin{align}(-q;q^{2})_{\infty} &= \prod_{n = 1}^{\infty}(1 + q^{2n - 1}) = \prod_{n = 1}^{\infty}\frac{(1 + q^{n})}{(1 + q^{2n})} = \prod_{n = 1}^{\infty}\frac{(1 - q^{2n})}{(1 - q^{n})(1 + q^{2n})}\notag\\ &= \prod_{n = 1}^{\infty}\frac{1}{(1 - q^{2n - 1})(1 + q^{2n})} = \frac{1}{(q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty}}\notag\end{align} Again we have $$\phi(-q) = \theta_{3}(-q) = \theta_{4}(q) = \frac{(q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}}{(-q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty}} = \frac{(q;q)_{\infty}}{(-q;q)_{\infty}}$$ Again the series expansion for $\psi(q)$ is obvious and by the triple product identity \begin{align}\psi(q) &= f(q, q^{3}) = (-q;q^{4})_{\infty}(-q^{3};q^{4})_{\infty}(q^{4};q^{4})_{\infty}\notag\\ &= \prod_{n = 1}^{\infty}(1 + q^{4n - 3})(1 + q^{4n - 1})(1 - q^{4n})\notag\\ &= \prod_{n = 1}^{\infty}(1 + q^{4n - 3})(1 + q^{4n - 1})(1 - q^{2n})(1 + q^{2n})\notag\\ &= \prod_{n = 1}^{\infty}(1 + q^{2(2n -1) - 1})(1 + q^{2(2n) - 1})(1 - q^{2n})(1 + q^{2n})\notag\\ &= \prod_{n = 1}^{\infty}(1 + q^{2n - 1})(1 - q^{2n})(1 + q^{2n})\notag\\ &= \prod_{n = 1}^{\infty}(1 - q^{2n})(1 + q^{n}) = \prod_{n = 1}^{\infty}\frac{(1 - q^{2n})(1 - q^{2n})}{1 - q^{n}}\notag\\ &= \prod_{n = 1}^{\infty}\frac{1 - q^{2n}}{1 - q^{2n - 1}} = \frac{(q^{2};q^{2})_{\infty}}{(q;q^{2})_{\infty}}\notag\end{align} Finally $f(-q) = f(-q, -q^{2}) = (q;q^{3})_{\infty}(q^{2};q^{3})_{\infty}(q^{3};q^{3})_{\infty} = (q;q)_{\infty}$

Also it should be noted that the function $\psi(q)$ is the equivalent of classical $\theta_{2}(q)$ and we have $\theta_{2}(q) = 2q^{1/4}\psi(q^{2})$. The functions $\chi(q)$ and $\chi(-q)$ will be used later in the definitions Ramanujan's invariants.

### Theta Function Identities

Theformulas presented above provide the series as well as product expansions of these functions and it turns out that their product expansions are quite helpful in deriving an amazing number of results. Ramanujan uses this idea to the fullest extent as is shown by the following results:
• $\displaystyle \frac{f(q)}{f(-q)} = \frac{\psi(q)}{\psi(-q)} = \frac{\chi(q)}{\chi(-q)} = \sqrt{\frac{\phi(q)}{\phi(-q)}}$
• $\displaystyle f^{3}(-q) = \phi^{2}(-q)\psi(q) = \sum_{n = 0}^{\infty}(-1)^{n}(2n + 1)q^{n(n + 1)/2}$
• $\displaystyle \chi(q) = \frac{f(q)}{f(-q^{2})} = \sqrt[3]{\frac{\phi(q)}{\psi(-q)}} = \frac{\phi(q)}{f(q)} = \frac{f(-q^{2})}{\psi(-q)}$
• $\displaystyle f^{3}(-q^{2}) = \phi(-q)\psi^{2}(q),\,\,\, \chi(q)\chi(-q) = \chi(-q^{2})$
To establish the first of these we can start with $f(q) = (-q;-q)_{\infty} = (-q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}$ and therefore $$\frac{f(q)}{f(-q)} = \frac{(-q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}}{(q;q)_{\infty}} = \frac{(-q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}}{(q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}} = \frac{(-q;q^{2})_{\infty}}{(q;q^{2})_{\infty}}$$ and $$\frac{\psi(q)}{\psi(-q)} = \frac{(q^{2};q^{2})_{\infty}}{(q;q^{2})_{\infty}}\frac{(-q;q^{2})_{\infty}}{(q^{2};q^{2})_{\infty}} = \frac{(-q;q^{2})_{\infty}}{(q;q^{2})_{\infty}}$$ Similarly we can establish that $\sqrt{\phi(q)/\phi(-q)}$ is also equal to $(-q;q^{2})_{\infty}/(q;q^{2})_{\infty}$ and thereby the first result is established. The second set of identities is established in the following fashion $$\phi^{2}(-q)\psi(q) = \frac{(q;q^{2})_{\infty}^{2}(q^{2};q^{2})_{\infty}^{2}}{(-q;q^{2})_{\infty}^{2}(-q^{2};q^{2})_{\infty}^{2}}\frac{(q^{2};q^{2})_{\infty}}{(q;q^{2})_{\infty}} = \frac{(q^{2};q^{2})_{\infty}^{3}(q;q^{2})_{\infty}}{(-q;q)_{\infty}^{2}}$$ Since $$(-q;q)_{\infty} = \prod_{n = 1}^{\infty}(1 + q^{n}) = \prod_{n = 1}^{\infty}\frac{1 - q^{2n}}{1 - q^{n}} = \prod_{n = 1}^{\infty}\frac{1}{1 - q^{2n - 1}} = \frac{1}{(q;q^{2})_{\infty}}$$ it follows that $$\phi^{2}(-q)\psi(q) = (q^{2};q^{2})_{\infty}^{3}(q;q^{2})_{\infty}^{3} = (q;q)_{\infty}^{3} = f^{3}(-q)$$ To get the series expansion requires some effort. We note the series and product expansions of $\theta_{1}(z, q)$ given by \begin{align} \theta_{1}(z, q) &= 2q^{1/4}\sum_{n = 0}^{\infty}(-1)^{n}q^{n(n + 1)}\sin(2n + 1)z\notag\\ &= 2q^{1/4}\sin z\prod_{n = 1}^{\infty}(1 - q^{2n})(1 - 2q^{2n}\cos 2z + q^{4n})\notag\end{align} Dividing by $2q^{1/4}\sin z$ and taking limits when $z \to 0$ we get $$\prod_{n = 1}^{\infty}(1 - q^{2n})^{3} = \sum_{n = 0}^{\infty}(-1)^{n}(2n + 1)q^{n(n + 1)}$$ Replacing $q$ by $\sqrt{q}$ we get $$(q;q)_{\infty}^{3} = \sum_{n = 0}^{\infty}(-1)^{n}(2n + 1)q^{n(n + 1)/2}$$ For the 3rd result we can see that \begin{align}\frac{f(q)}{f(-q^{2})} &= \frac{(-q;-q)_{\infty}}{(q^{2};q^{2})_{\infty}} = \frac{(-q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}}{(q^{2};q^{2})_{\infty}} = (-q;q^{2})_{\infty} = \chi(q)\notag\\ \frac{\phi(q)}{f(q)} &= \frac{1}{(q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty}} = \frac{(-q;q)_{\infty}}{(-q^{2};q^{2})_{\infty}} = (-q;q^{2})_{\infty} = \chi(q)\notag\\ \frac{f(-q^{2})}{\psi(-q)} &= \frac{(q^{2};q^{2})_{\infty}(-q;q^{2})_{\infty}}{(q^{2};q^{2})_{\infty}} = (-q;q^{2})_{\infty} = \chi(q)\notag\\ \frac{\phi(q)}{\psi(-q)} &= \frac{(-q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}}{(q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty}}\frac{(-q;q^{2})_{\infty}}{(q^{2};q^{2})_{\infty}} = \frac{(-q;q^{2})_{\infty}^{2}}{(q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty}}\notag\end{align} Since we have $(q;q^{2})_{\infty}(-q;q)_{\infty} = 1$ it follows that $$(q^{2};q^{4})_{\infty}(-q^{2};q^{2})_{\infty} = 1$$ and therefore $$(q;q^{2})_{\infty}(-q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty} = 1$$ Putting pieces together we get $$\phi(q)/\psi(-q) = (-q;q^{2})_{\infty}^{3} = \chi^{3}(q)$$ Also note that the relation $(q^{2};q^{4})_{\infty} = (q;q^{2})_{\infty}(-q;q^{2})_{\infty}$ used above can be expressed as $\chi(q)\chi(-q) = \chi(-q^{2})$.

Finally \begin{align} \phi(-q)\psi^{2}(q) &= \frac{(q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}}{(-q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty}}\frac{(q^{2};q^{2})_{\infty}^{2}}{(q;q^{2})_{\infty}^{2}}\notag\\ &= \frac{(q^{2};q^{2})_{\infty}^{3}}{(-q;q)_{\infty}(q;q^{2})_{\infty}} = (q^{2};q^{2})_{\infty}^{3} = f^{3}(-q^{2})\notag\end{align} What we see in the proofs of the above results is that they are really elementary and depend upon formal manipulation of series and products. The only non-trivial identity we have used till now is the Jacobi's Triple product which forms the basis of all the above product expansions and the relations between these Ramanujan theta functions.

Next we establish some identities connecting theta functions of $q, q^{2}$ and $q^{4}$. These can be seen as equivalents of the classical theta function identities established here.
• $\displaystyle \phi(q) + \phi(-q) = 2\phi(q^{4})$
• $\displaystyle \phi(q) - \phi(-q) = 4q\psi(q^{8})$
• $\displaystyle \phi(q)\phi(-q) = \phi^{2}(-q^{2})$
• $\displaystyle \psi(q)\psi(-q) = \psi(q^{2})\phi(-q^{2})$
• $\displaystyle \phi(q)\psi(q^{2}) = \psi^{2}(q)$
• $\displaystyle \phi^{2}(q) - \phi^{2}(-q) = 8q\psi^{2}(q^{4})$
• $\displaystyle \phi^{2}(q) + \phi^{2}(-q) = 2\phi^{2}(q^{2})$
• $\displaystyle \phi^{4}(q) - \phi^{4}(-q) = 16q\psi^{4}(q^{2})$
The first two identities follow by using the series expansions of $\phi(q)$ and $\psi(q)$. The next one is handled as follows: \begin{align}\phi(q)\phi(-q) &= \frac{(-q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}}{(q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty}}\frac{(q;q^{2})_{\infty}(q^{2};q^{2})_{\infty}}{(-q;q^{2})_{\infty}(-q^{2};q^{2})_{\infty}} = \left(\frac{(q^{2};q^{2})_{\infty}}{(-q^{2};q^{2})_{\infty}}\right)^{2}\notag\\ \phi(-q^{2}) &= \frac{(q^{2};q^{4})_{\infty}(q^{4};q^{4})_{\infty}}{(-q^{2};q^{4})_{\infty}(-q^{4};q^{4})_{\infty}} = \frac{(q^{2};q^{2})_{\infty}}{(-q^{2};q^{2})_{\infty}}\notag\end{align} Similarly we can prove the next two identities. Next one follows from the application of the first and second: $$\phi^{2}(q) - \phi^{2}(-q) = (\phi(q) + \phi(-q))(\phi(q) - \phi(-q)) = 8q\phi(q^{4})\psi(q^{8}) = 8q\psi^{2}(q^{4})$$ The second last identity requires us to analyze the series expansions: $$\phi^{2}(q) + \phi^{2}(-q) = \sum_{m, n = -\infty}^{\infty}q^{m^{2} + n^{2}} + \sum_{m, n = -\infty}^{\infty}(-1)^{m + n}q^{m^{2} + n^{2}}$$ Clearly the terms in both sums cancel if $(m + n)$ is odd and add up when $(m + n)$ is even. Again if $(m + n)$ is even i.e $m + n = 2j$ then $m, n$ must be of same parity and hence $m - n = 2k$. In that case $m^{2} + n^{2} = 2(j^{2} + k^{2})$. Thus we have finally $$\phi^{2}(q) + \phi^{2}(-q) = 2\sum_{j, k = -\infty}^{\infty}q^{2(j^{2} + k^{2})} = 2\sum_{j, k = -\infty}^{\infty}(q^{2})^{j^{2} + k^{2}} = 2\phi^{2}(q^{2})$$ The last identity is obtained from the earlier ones as follows: \begin{align} \phi^{4}(q) - \phi^{4}(-q) &= (\phi^{2}(q) + \phi^{2}(-q))(\phi^{2}(q) - \phi^{2}(-q))\notag\\ &= 16q\phi^{2}(q^{2})\psi^{2}(q^{4}) = 16q\psi^{4}(q^{2})\notag\end{align} After these preliminary identities on theta functions it is time to relate them to the elliptic integral $K$ and the modulus $k$. Ramanujan did this in a very ingenious way by studying the properties of hypergeometric function $_{2}F_{1}$. This will be presented in the next post.