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

### Lambert Series

In this post we will focus our attention on series of the form: $$\sum_{n = 0}^{\infty}a_{n}\cdot\frac{q^{b_n}}{1 \pm q^{c_n}}$$ which are more popularly known as Lambert Series. We will not deal with the general theorems concerning such series but will restrict ourselves to the Lambert series for the theta functions and study some identities involving these series.

To understand their origin let's start with the following infinite product: \begin{align}\prod_{n = 1}^{\infty}(1 - q^{n}) &= \prod_{n = 1}^{\infty}(1 - q^{2n})(1 - q^{2n - 1})\notag\\ &= \prod_{n = 1}^{\infty}(1 - q^{n})(1 + q^{n})(1 - q^{2n - 1})\notag\end{align} so that we arrive at $$\prod_{n = 1}^{\infty}(1 + q^{n})(1 - q^{2n - 1}) = 1$$ Taking logarithms we get $$\sum_{n = 1}^{\infty}\log(1 + q^{n}) + \sum_{n = 1}^{\infty}\log(1 - q^{2n - 1}) = 0$$ and a differentiation with respect to $q$ yields $$\sum_{n = 1}^{\infty}\frac{nq^{n - 1}}{1 + q^{n}} = \sum_{n = 1}^{\infty}\frac{(2n - 1)q^{2n - 2}}{1 - q^{2n - 1}}$$ Multiplying by $q$ we get $$\sum_{n = 1}^{\infty}\frac{nq^{n}}{1 + q^{n}} = \sum_{n = 1}^{\infty}\frac{(2n - 1)q^{2n - 1}}{1 - q^{2n - 1}}\tag{1}$$ This represents a non-obvious identity between two Lambert series.

### Theta Functions and Their Lambert series

Let's recall the Fourier series for the elliptic functions: \begin{align}\text{sn}(u, k) &= \frac{2\pi}{Kk}\sum_{n = 0}^{\infty}\frac{q^{n + 1 / 2}\sin(2n + 1)z}{1 - q^{2n + 1}}\notag\\ \text{cn}(u, k) &= \frac{2\pi}{Kk}\sum_{n = 0}^{\infty}\frac{q^{n + 1 / 2}\cos(2n + 1)z}{1 + q^{2n + 1}}\notag\\ \text{dn}(u, k) &= \frac{\pi}{2K} + \frac{2\pi}{K}\sum_{n = 1}^{\infty}\frac{q^{n}\cos(2nz)}{1 + q^{2n}}\notag\end{align} where $z = \pi u / 2K$. As we shall see in this post these Fourier series become the basis of many identities involving Lambert series for theta functions.

Putting $u = 0$ in the last equation we see that $$\frac{2K}{\pi} = 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}}{1 + q^{2n}}$$ or $$\theta_{3}^{2}(q) = 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}}{1 + q^{2n}}$$ Putting $u = 0$ in the series for $\text{cn}\, u$ we get $$\frac{2K}{\pi} = \frac{4}{k}\sum_{n = 0}^{\infty}\frac{q^{n + 1/2}}{1 + q^{2n + 1}}$$ or $$\theta_{3}^{2}(q) = \frac{\theta_{3}^{2}(q)}{\theta_{2}^{2}(q)}\,4\sqrt{q}\sum_{n = 0}^{\infty}\frac{q^{n}}{1 + q^{2n + 1}}$$ or $$\theta_{2}^{2}(q) = 4\sqrt{q}\sum_{n = 0}^{\infty}\frac{q^{n}}{1 + q^{2n + 1}}$$ The series for $\text{sn}\,u$ is bit complicated. We divide both sides by $u = 2Kz / \pi$ and take limits as $u \to 0$ to get $$1 = \left(\frac{\pi}{2K}\right)^{2}\frac{4}{k}\sum_{n = 0}^{\infty}\frac{(2n + 1)q^{n + 1/2}}{1 - q^{2n + 1}}$$ or \begin{align}\theta_{3}^{4}(q) &= \frac{\theta_{3}^{2}(q)}{\theta_{2}^{2}(q)}\,4\sqrt{q}\sum_{n = 0}^{\infty}\frac{(2n + 1)q^{n}}{1 - q^{2n + 1}}\notag\\ \Rightarrow \theta_{2}^{2}(q)\theta_{3}^{2}(q) &= 4\sqrt{q}\sum_{n = 0}^{\infty}\frac{(2n + 1)q^{n}}{1 - q^{2n + 1}}\notag\end{align} To summarize \begin{align}\theta_{3}^{2}(q) &= \phi^{2}(q) = 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}}{1 + q^{2n}}\tag{2}\\ \theta_{2}^{2}(q) &= 4\sqrt{q}\,\psi^{2}(q^{2}) = 4\sqrt{q}\sum_{n = 0}^{\infty}\frac{q^{n}}{1 + q^{2n + 1}}\tag{3}\\ \Rightarrow \psi^{2}(q^{2}) &= \sum_{n = 0}^{\infty}\frac{q^{n}}{1 + q^{2n + 1}}\tag{4}\\ \theta_{2}^{2}(q)\theta_{3}^{2}(q) &= 4\sqrt{q}\sum_{n = 0}^{\infty}\frac{(2n + 1)q^{n}}{1 - q^{2n + 1}}\tag{5}\end{align} From equations $(2), (3)$ and $(5)$ we get $$\left(1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}}{1 + q^{2n}}\right)\left(\sum_{n = 0}^{\infty}\frac{q^{n}}{1 + q^{2n + 1}}\right) = \sum_{n = 0}^{\infty}\frac{(2n + 1)q^{n}}{1 - q^{2n + 1}}\tag{6}$$ From the last equation we obtain $$\phi^{2}(q)\psi^{2}(q^{2}) = \sum_{n = 0}^{\infty}\frac{(2n + 1)q^{n}}{1 - q^{2n + 1}}$$ or $$\psi^{4}(q) = \sum_{n = 0}^{\infty}\frac{(2n + 1)q^{n}}{1 - q^{2n + 1}}\tag{7}$$ Again from equation $(4)$ we get \begin{align}\psi^{2}(q) &= \sum_{n = 0}^{\infty}\frac{q^{n/2}}{1 + q^{n + 1/2}}\notag\\ &= \sum_{n = 0}^{\infty}q^{n/2}\sum_{k = 0}^{\infty}(-1)^{k}q^{k(n + 1/2)}\notag\\ &= \sum_{n = 0}^{\infty}\sum_{k = 0}^{\infty}(-1)^{k}q^{nk + k/2 + n/2}\notag\\ &= \sum_{k = 0}^{\infty}(-1)^{k}q^{k/2}\sum_{n = 0}^{\infty}q^{nk + n/2}\notag\\ &= \sum_{k = 0}^{\infty}(-1)^{k}q^{k/2}\sum_{n = 0}^{\infty}q^{(k + 1/2)n}\notag\\ &= \sum_{k = 0}^{\infty}\frac{(-1)^{k}q^{k/2}}{1 - q^{k + 1/2}}\notag\end{align} Hence we get \begin{align}2\psi^{2}(q) &= \sum_{n = 0}^{\infty}\frac{q^{n/2}}{1 + q^{n + 1/2}} + \frac{(-1)^{n}q^{n/2}}{1 - q^{n + 1/2}}\notag\\ &= \sum_{n = 0}^{\infty}\frac{2q^{n}}{1 - q^{4n + 1}} - \sum_{n = 0}^{\infty}\frac{2q^{3n + 2}}{1 - q^{4n + 3}}\notag\end{align} so that $$\psi^{2}(q) = \sum_{n = 0}^{\infty}\frac{q^{n}}{1 - q^{4n + 1}} - \sum_{n = 0}^{\infty}\frac{q^{3n + 2}}{1 - q^{4n + 3}}\tag{8}$$ Again starting with the Lambert series for $\phi^{2}(q)$ we get \begin{align}\phi^{2}(q) &= 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}}{1 + q^{2n}}\notag\\ &= 1 + 4\sum_{n = 1}^{\infty}q^{n}\sum_{k = 0}^{\infty}(-1)^{k}q^{2nk}\notag\\ &= 1 + 4\sum_{k = 0}^{\infty}(-1)^{k}\sum_{n = 1}^{\infty}q^{(2k + 1)n}\notag\\ \Rightarrow \phi^{2}(q) &= 1 + 4\sum_{k = 0}^{\infty}\frac{(-1)^{k}q^{2k + 1}}{1 - q^{2k + 1}}\tag{9}\end{align} In the above manipulations of the Lambert series we were expressing the series as a double series and interchanging the order of summation. There are other general procedures to rearrange a double series one of which is called the Clausen's procedure. This is given by the following formula: $$\sum_{m = 0}^{\infty}\sum_{n = 0}^{\infty}a_{mn} = \sum_{m = 0}^{\infty}\left(a_{mm} + \sum_{n > m}^{\infty}(a_{mn} + a_{nm})\right)\tag{10}$$ Applying this technique to the series for $\psi^{2}(q)$ we get \begin{align}\psi^{2}(q) &= \sum_{n = 0}^{\infty}\frac{q^{n}}{1 - q^{4n + 1}} - \sum_{n = 0}^{\infty}\frac{q^{3n + 2}}{1 - q^{4n + 3}}\notag\\ &= \sum_{n = 0}^{\infty}q^{n}\sum_{m = 0}^{\infty}q^{m(4n + 1)} - \sum_{n = 0}^{\infty}q^{3n + 2}\sum_{m = 0}^{\infty}q^{m(4n + 3)}\notag\\ &= \sum_{n = 0}^{\infty}\sum_{m = 0}^{\infty}q^{n + m(4n + 1)} - \sum_{n = 0}^{\infty}\sum_{m = 0}^{\infty}q^{3n + 2 + m(4n + 3)}\notag\\ &= \sum_{n = 0}^{\infty}\left(q^{2n(2n + 1)} + 2q^{n}\sum_{m > n}^{\infty}q^{m(4n + 1)}\right)\notag\\ &\,\,\,\, -\, \sum_{n = 0}^{\infty}\left(q^{(2n + 1)(2n + 2)} + 2q^{3n + 2}\sum_{m > n}^{\infty}q^{m(4n + 3)}\right)\notag\\ &= \sum_{n = 0}^{\infty}\left(q^{2n(2n + 1)} + 2q^{n}\cdot\frac{q^{(n + 1)(4n + 1)}}{1 - q^{4n + 1}}\right)\notag\\ &\,\,\,\, -\, \sum_{n = 0}^{\infty}\left(q^{(2n + 1)(2n + 2)} + 2q^{3n + 2}\cdot\frac{q^{(n + 1)(4n + 3)}}{1 - q^{4n + 3}}\right)\notag\\ &= \sum_{n = 0}^{\infty}q^{2n(2n + 1)}\cdot\frac{1 + q^{4n + 1}}{1 - q^{4n + 1}} - \sum_{n = 0}^{\infty}q^{(2n + 1)(2n + 2)}\cdot\frac{1 + q^{4n + 3}}{1 - q^{4n + 3}}\notag\\ \Rightarrow \psi^{2}(q) &= \sum_{n = 0}^{\infty}(-1)^{n}q^{n(n + 1)}\cdot\frac{1 + q^{2n + 1}}{1 - q^{2n + 1}}\tag{11}\end{align} We can look back at the Fourier series of $\text{dn}(u, k)$ to derive further identities: \begin{align}\frac{2K}{\pi}\,\text{dn}(u, k) &= 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}\cos(2nz)}{1 + q^{2n}}\notag\\ \Rightarrow \theta_{3}^{2}(q)\,\frac{\theta_{4}(q)}{\theta_{3}(q)}\,\frac{\theta_{3}(z, q)}{\theta_{4}(z, q)} &= 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}\cos(2nz)}{1 + q^{2n}}\notag\\ \Rightarrow \theta_{3}(q)\theta_{4}(q)\,\dfrac{{\displaystyle 1 + 2\sum_{n = 1}^{\infty}q^{n^{2}}\cos(2nz)}}{{\displaystyle 1 + 2\sum_{n = 1}^{\infty}(-1)^{n}q^{n^{2}}\cos(2nz)}} &= 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}\cos(2nz)}{1 + q^{2n}}\notag\\ \Rightarrow \theta_{4}^{2}(q^{2})\,\dfrac{{\displaystyle 1 + 2\sum_{n = 1}^{\infty}q^{n^{2}}\cos(2nz)}}{{\displaystyle 1 + 2\sum_{n = 1}^{\infty}(-1)^{n}q^{n^{2}}\cos(2nz)}} &= 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}\cos(2nz)}{1 + q^{2n}}\notag\end{align} Replacing $z$ by $z/2$ and switching to Ramanujan's $\phi$ function we get $$\phi^{2}(-q^{2})\dfrac{{\displaystyle 1 + 2\sum_{n = 1}^{\infty}q^{n^{2}}\cos(nz)}}{{\displaystyle 1 + 2\sum_{n = 1}^{\infty}(-1)^{n}q^{n^{2}}\cos(nz)}} = 1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}\cos(nz)}{1 + q^{2n}}\tag{12}$$ Replacing $z$ with $\pi - z$ we get $$\phi^{2}(-q^{2})\dfrac{{\displaystyle 1 + 2\sum_{n = 1}^{\infty}(-1)^{n}q^{n^{2}}\cos(nz)}}{{\displaystyle 1 + 2\sum_{n = 1}^{\infty}q^{n^{2}}\cos(nz)}} = 1 + 4\sum_{n = 1}^{\infty}\frac{(-q)^{n}\cos(nz)}{1 + q^{2n}}$$ Multiplying the last two equations we get $$\phi^{4}(-q^{2}) = \left(1 + 4\sum_{n = 1}^{\infty}\frac{q^{n}\cos(nz)}{1 + q^{2n}}\right)\left(1 + 4\sum_{n = 1}^{\infty}\frac{(-q)^{n}\cos(nz)}{1 + q^{2n}}\right)$$ It is a surprise now that the RHS is indeed independent of $z$. We note that the functions $\cos(nz)$ for $n = 1, 2, 3, \ldots$ are orthogonal on the interval of $[-\pi, \pi]$ and hence we can multiply the series on the right and integrate the whole equation term by term with respect to $z$ on the interval $[-\pi, \pi]$ to get the following: $$2\pi\cdot\phi^{4}(-q^{2}) = 2\pi + 16\pi\sum_{n = 1}^{\infty}\frac{(-q^{2})^{n}}{(1 + q^{2n})^{2}}$$ On replacing $-q^{2}$ by $q$ we get $$\phi^{4}(q) = 1 + 8\sum_{n = 1}^{\infty}\frac{q^{n}}{(1 + (-q)^{n})^{2}}\tag{13}$$ Again putting $qe^{iz} = a, qe^{-iz} = b$ in equation $(12)$ we get $$\phi^{2}(-ab)\,\frac{f(a, b)}{f(-a, -b)} = 1 + 2\sum_{n = 1}^{\infty}\frac{a^{n} + b^{n}}{1 + a^{n}b^{n}}\tag{14}$$ From equation $(13)$ we get \begin{align}\phi^{4}(q) &= 1 + 8\sum_{n = 1}^{\infty}\frac{q^{n}}{(1 + (-q)^{n})^{2}}\notag\\ &= 1 + 8\sum_{n = 1}^{\infty}q^{n}\sum_{k = 0}^{\infty}(-1)^{k}(k + 1)(-q)^{nk}\notag\\ &= 1 + 8\sum_{k = 0}^{\infty}(-1)^{k}(k + 1)\sum_{n = 1}^{\infty}((-1)^{k}q^{k + 1})^{n}\notag\\ &= 1 + 8\sum_{k = 0}^{\infty}(-1)^{k}(k + 1)\frac{(-1)^{k}q^{k + 1}}{1 - (-1)^{k}q^{k + 1}}\notag\\ \Rightarrow \phi^{4}(q) &= 1 + 8\sum_{n = 1}^{\infty}\frac{nq^{n}}{1 + (-q)^{n}}\tag{15}\end{align} Since this post has already grown quite long, it is time to conclude. By now the reader would have got a flavor of the identities relating theta functions to their Lambert series. In the next post we will continue our journey by establishing more identities of the similar form. Some of them would later be used to derive modular equations in the manner of Ramanujan.