# Proof of a Ramanujan Integral

While studying Ramanujan's Collected Papers I came across a paper titled "Some Definite Integrals" which appeared in Messenger of Mathematics, $${\tt XLIV}, 1915, \mbox{10-18}$$. It contains lot of weird integrals for which Ramanujan has given proofs.

• However in one instance he discusses about the integral \begin{align} &\int_{0}^{\infty}\frac{dx}{\left(1 + x^{2}\right)\left(1 + r^{2}x^{2}\right)\left(1 + r^{4}x^{2}\right)\cdots} \\[5mm] = &\ \frac{\pi}{2\left(1 + r + r^{3} + r^{6} + r^{10} + \cdots\right)}\label{1}\tag{1} \end{align} where $$0 < r < 1$$.

• Ramanujan derives this formula from \begin{align} &\int_{0}^{\infty}\frac{\left(1 + arx\right)\left(1 + ar^{2}x\right)\cdots}{\left(1 + x\right)\left(1 + rx\right)\left(1 + r^{2}x\right)\cdots}x^{n - 1}\,\mathrm{d}x \\[5mm] = &\ \frac{\pi}{\sin\left(n\pi\right)} \prod_{m = 1}^{\infty}\frac{\left(1 - r^{m - n}\,\,\right)\left(1 - ar^{m}\,\right)}{\left(1 - r^{m}\,\right)\left(1 - ar^{m - n}\,\,\right)}\label{2}\tag{2} \end{align} where $$0 < r < 1, n > 0, 0 < a < r^{n - 1}$$ and $$n$$ is not an integer and $$a$$ is not of the form $$a = r^{p}$$ where $$p$$ is a positive integer.

• Unfortunately, Ramanujan does not prove the formula (\ref{2}).

Is there any direct approach to establish (\ref{1}) without using (\ref{2}) or some way to establish (\ref{2}) $$?$$.

• Isn't it possible by Complex Analysis? Indeed, maybe it's good to integrate $f(z)$ over a semi circle in upper half plane and then apply Residue Theorem to gain the formula and at last, take real parts and send radius to infinity. May 25, 2014 at 10:21
• @fardad.math: I am not well versed in complex analysis (as you may observe from my questions and answers on this site). Is there is any approach within the framework of real variables? May 25, 2014 at 16:32
• That $\pi/\sin(n\pi)$ looks suspiciously Gamma-esque to me (it probably comes from the $\Gamma(s)$ function). I smell Ramanujan's Master Theorem (he used it a lot). Just a thought...
– gone
Feb 1 at 16:16

You can use residues, let $f(z)=\frac{1}{(1+z^2)(1+r^2z^2)(1+r^4z^2)...}$ this has an infite set of singularities at $z=\pm i 1/r^{n},n\in\Bbb N_0$. We can see that $\large\int_0^\infty\frac{1}{(1+x^2)(1+r^2x^2)(1+r^4x^2)...}dx=\frac{1}{2}\int_{-\infty}^\infty\frac{1}{(1+x^2)(1+r^2x^2)(1+r^4x^2)...}dx$

So we will consider the upper semi circle contour, spanning over $-\infty$ to $+\infty$, only the positive singularities are in this contour, i.e. $z=i\frac{1}{r}$.

Now $\operatorname{Res}(f(z),z=\frac{i}{r^{n}})=\large\lim_{z\to i\frac{1}{r^{n}}}(z-i\frac{1}{r^{n}})f(z)=\large\lim_{z\to i\frac{1}{r^{n}}}\frac{1}{r^n}(r^nz-i)f(z)$

$=\lim_{z\to i\frac{1}{r^{n}}}\frac{1}{r^n(r^nz+i)}\prod_{j=0,j\ne n}^\infty\frac{1}{(1+x^{2}r^{2j})}$

$=\large\frac{1}{2ir^n}\prod_{j=0,j\ne n}^\infty\frac{1}{(1-r^{2j-2n})}$

Now $\frac{1}{2}\int_{-\infty}^\infty\frac{1}{(1+x^2)(1+r^2x^2)(1+r^4x^2)...}dx=\frac{1}{2}2\pi i\sum \operatorname{Res}(f)=\frac{1}{2}\pi i\sum_{n=0}^\infty\frac{1}{ir^n}\prod_{j=0,j\ne n}^\infty\frac{1}{(1-r^{2j-2n})}$

From here I'm not sure how to reach the closed form, but hopefully this helps to show a different approach, even if you are not too well versed in integrals by residue :)

• I believe there is some typo. The function has terms of the form $(1 + r^{2n}x^{2})$ and not $(1 + r^{2n}x^{2n})$. And then the singularities are of the form $\pm i/r^{n}$. May 26, 2014 at 7:38
• @ParamanandSingh, thank you! I have edited it, hopefully all is good now :) May 26, 2014 at 7:50
• I will try to simplify the last expression you obtained and try to get the expression by Ramanujan. May 26, 2014 at 7:53
• @ParamanandSingh, hopefully it will work out nicely :) May 26, 2014 at 8:07
• @ParamanandSingh, I noticed some other mistakes, which I have corrected :) May 26, 2014 at 9:03

I find this relationship charming.

Here is what I have so far as an alternative solution without resorting to complex analysis. For $n=0,1,...$ define \begin{align} I_n=\int_0^{\infty} \frac{dx}{(1+x^2)(1+r^2x^2)...(1+r^{2n}x^2)} \end{align} Doing many partial fractions I could establish for $n=1,2,3,4,...$ that \begin{align} I_{n}&=\frac{1-r^{2n-1}}{1-r^{2n}}I_{n-1}\\ I_0&=\frac{\pi}{2} \end{align} Therefore \begin{align} I_{\infty}&=\frac{\prod_{n=1}^{\infty}\Big(1-r^{2n-1}\Big)}{\prod_{n=1}^{\infty}\Big(1-r^{2n}\Big)}\frac{\pi}{2} \end{align} Now using the same arguments as in this post, we can establish $(1)$.

• I like your totally elementary answer. +1 Feb 19, 2015 at 8:50
• @ParamanandSingh Many thanks for the comment. Do you know where could I read more on the works of Ramanujan? Are his notes published and accessible? Thanks. Feb 19, 2015 at 9:51
• You should try to get access to the following : Ramanujan Notebooks Vol 1-5 by Bruce C. Berndt, Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work by G. H. Hardy and the best work is "Collected Papers of Ramanujan". The book "Pi and the AGM" by Borwein Brothers is also very helpful. I have tried to present some of the Ramanujan stuff in a systematic fashion in a series of posts in my blog. You can start with paramanands.blogspot.com/2011/11/… and read further posts after that. Feb 19, 2015 at 9:58
• @ParamanandSingh Many thanks for the helpful hints. I will start by taking a look at your works. Feb 19, 2015 at 10:02

Here is a way you can do it with brute force with the aid of change of variables and Fubini's Theorem. Let \begin{align*} I &= \int_{0}^\infty \frac{1}{(1+x^2)(1+r^2x^2) \ \dots (1+r^{2n}x^2)} \ dx. \end{align*} Note for each $$i \in \lbrace 1, \ \dots \ ,n \rbrace,$$ we can write \begin{align*} \frac{1}{1+r^{2i} x^2} &= \int_{0}^{\infty} e^{-(1+r^{2i}x^2) y_i} \ dy_i. \end{align*} Thus, using Fubini's Theorem,

\begin{align*} I &=\int_{0}^\infty \int_{0}^\infty \ \dots \ \int_{0}^\infty e^{-y_1(1+x^2)} e^{-y_2(1+r^2x^2)} \ \dots \ e^{-y_{n}(1+r^{2n}x^2)} \ dy_n \ \dots \ dy_1\ dx \\ &=\int_{0}^\infty \int_{0}^\infty \ \dots \ \int_{0}^\infty e^{-(y_1 + \ \dots \ + y_n)} \ e^{-(y_1+r^2y_2 \ \dots \ + r^{2n}y_n)x^2} \ dy_n \ \dots \ dy_1 \ dx \\ &=\int_{0}^\infty \int_{0}^\infty \ \dots \ \int_{0}^\infty e^{-(y_1 + \ \dots \ + y_n)} \ e^{-(y_1+r^2y_2 \ \dots \ + r^{2n}y_n)x^2} \ dx \ dy_n \ \dots \ dy_1. \end{align*} To carry out the integral with respect to $$x,$$ use the one dimensional change of variables $$x=\frac{t}{\sqrt{y_1+r^2y_2 \ \dots \ + r^{2n}y_n}}$$ and the well-known Gaussian integral $$\int_{0}^\infty e^{-t^2} \ dt= \frac{\sqrt{\pi}}{2}.$$ We get

\begin{align*} I &= \frac{\sqrt{\pi}}{2} \int_{0}^{\infty} \ \dots \ \int_{0}^{\infty} \frac{e^{-(y_1 + \ \dots \ + y_n)}}{\sqrt{y_1+r^2y_2 \ \dots \ + r^{2n}y_n}} \ dy_n \ \dots \ dy_1. \end{align*}

Now, perform the multidimensional change of variables \begin{align*} y_i &= t_i - r^2 t_{i+1}, \quad 1 \leq i By induction on $$n,$$ it is easy to verify $$\left|\frac{\partial(y_1 ,\ \dots \ , y_n)}{\partial(t_1 , \ \dots \ , t_n)}\right|=1$$ and that transformed region of integration is

\begin{align*} t_1 &>0 \\ 0 &< t_i < \frac{t_{i-1}}{r^2},\quad 2 \leq i \leq n. \end{align*}

With this, \begin{align*} I &= \frac{\sqrt{\pi}}{2} \int_{0}^{\infty} \int_{0}^{t_1/r^2} \ \dots \ \int_{0}^{t_{n-1}/r^2} \frac{e^{-t_1-(1-r^2)(t_2 + \ \dots \ + t_n)}}{\sqrt{t_1}}\ dt_n \ \dots \ dt_2 \ dt_1. \end{align*}

This makes $$I$$ an "elementary" integral that can be evaluated either by hand or with Mathematica. To carry out the integration with respect to $$t_n, \ \dots \ , t_2,$$ one must repeatedly apply the exponential identity $$\int_{0}^{t} e^{-ax} \ dx = \frac{1-e^{-at}}{a}$$ for $$a>0,$$ which is pretty messy. To carry out the final integration with respect to $$t_1,$$ make the substitution $$t_1=u_1^2$$ which will transform the resulting integrand into a Gaussian function.
At the moment, I do not know of a clean, slick way to evaluate this multidimensional integral and arrive at the general answer, but I will look into it.

• Maybe, you can take advantage of $n \to \infty$. I mean, with some sort of Laplace Method,$\ldots$ Oct 7, 2020 at 18:48

Ramanujan does indeed give a proof, he shows that the product in your second integral can be expanded as a power series in $$x$$ and makes use of his master theorem (without comment). This power series is related to the q-binomial theorem (where $$\left(ar;r\right)_{n}$$ is the q-Pochhammer symbol).

$$\prod_{n=1}^{\infty}\frac{\left(1-axr^{n}\right)}{\left(1-xr^{n-1}\right)} = \sum_{i=0}^{\infty}\frac{\left(ar;r\right)_{i}}{\left(r;r\right)_{i}}x^{i}$$

proof:

(1) Denoting the above product $$f(x)$$.

$$f(x) = \sum_{i=0}^{\infty}C_{i}x^{i}$$

(2) We can see that $$f(x)$$ satisfies the functional equation $$f(x) = \frac{\left(1-axr\right)}{\left(1-x\right)}f(xr)$$, and so...

$$\left(1-x\right)f(x) = \left(1-axr\right)f(xr)$$

and...

$$\sum_{i=0}^{\infty} \left(C_{i}x^{i}-C_{i}x^{i}r^{i}\right) = \sum_{i=0}^{\infty} \left(C_{i}x^{i+1}-aC_{i}x^{i+1}r^{i+1}\right)$$

(3) Re-indexing the sum on the right and equating coefficients we find:

$$C_{i} = \frac{C_{i-1}\left(1-ar^{i}\right)}{\left(1-r^{i}\right)}$$

If we multiply out the original product we can see that $$C_{0} = 1$$, so, iterating the above expression we find $$C_{i} = \frac{\left(ar;r\right)_{i}}{\left(r;r\right)_{i}}$$. Since this is a Mellin transform of a power series in $$x$$, we can use Ramanujan's master theorem and the fact that:

$$\left(x;y\right)_{-n} = \frac{\left(x;y\right)_{\infty}}{\left(xy^{-n};y\right)_{\infty}}$$