The Ramanujan Cos/Cosh Identity is stated here as $$\left[1+2\sum_{n=1}^{\infty}\frac{\cos n\theta}{\cosh n\pi}\right]^{-2}+ \left[1+2\sum_{n=1}^{\infty}\frac{\cosh n\theta}{\cosh n\pi}\right]^{-2}= \frac{2\Gamma^4\left(\frac34\right)}{\pi}$$

Then there is a line:

Equating coefficients of $\theta^0$, $\theta^4$, and $\theta^8$ gives some amazing identities for the hyperbolic secant.

Those identities are given here.

So I have two questions:

  1. How do we get those formulas from the Cos/Cosh identity?

  2. Are there similar identities? (similar to Cos/cosh identity)


Solution 1:

It will be helpful to start from an explanation of the origin and the proof of the Ramanujan identity. These are hidden (not very deeply) in the theory of elliptic functions.

Indeed, Jacobi elliptic function $\operatorname{dn}(z,k)$ has Fourier series $$\operatorname{dn}(z,k)=\frac{\pi}{2K}\left[1+2\sum_{n=1}^{\infty}\frac{\cos n\pi\frac{z}{K}}{\cosh n \pi \frac{K'}{K}}\right],$$ where $K(k)$ denotes complete elliptic integral and $K'(k)=K(\sqrt{1-k^2})$ the complementary one. The Ramanujan Cos/Cosh identity is thus equivalent to showing that $$\operatorname{dn}^{-2}\left(\frac{K_1}{\pi}\theta,k_1\right)+\operatorname{dn}^{-2}\left(\frac{iK_1}{\pi}\theta,k_1\right)=\frac{8\Gamma^4\left(\frac34\right)K_1^2}{\pi^3},\tag{1}$$ where $k_1=\frac{1}{\sqrt2}$ is the first elliptic integral singular value and $K_1:=K(k_1)=K'(k_1)$.

The right hand side of (1) is independent on $\theta$ and is readily shown to be equal to $2$ using e.g. formula (3) from the same page. Therefore it remains to show that for any $\sigma\in\mathbb{C}$ one has $$\operatorname{dn}^{-2}\left(\sigma,k_1\right)+\operatorname{dn}^{-2}\left(i\sigma,k_1\right)=2.$$ I leave this last point to you as an exercise (hint: use Jacobi's imaginary transformation).


Hopefully it is now clear that one can construct many generalizations of Ramanujan identity. Such constructions would involve two basic ingredients:

  • Fourier series of elliptic functions,

  • elliptic integral singular values.

Indeed, pick your favorite identity satisfied by the elliptic functions. The first ingredient will transform them into trigonometric series. The second one will allow to replace the elliptic modulus by algebraic numbers and the corresponding half-periods by misteriously-looking combinations of gamma functions of rational arguments.


P.S. The first question is just Taylor expansion in $\theta$ (for instance, set $\theta=0$ in the Ramanujan identity and see what happens).