Ramanujan's eccentric Integral formula

This is one of those precious cases when Ramanujan himself provided (a sketch of) a proof. The identity was published in his paper "Some definite integrals" (Mess. Math. 44 (1915), pp. 10-18) together with several related formulae.

It might be instructive to look first at the simpler identity (i.e. the limiting case when $b\to\infty$; the identity mentioned in the original question can be obtained by a similar approach): $$\int\limits_{0}^{\infty} \prod_{k=0}^{\infty}\frac{1}{ 1 + x^{2}/(a+k)^{2}}dx = \frac{\sqrt{\pi}}{2} \frac{ \Gamma(a+\frac{1}{2})}{\Gamma(a)},\quad a>0.\qquad\qquad\qquad(1)$$ Ramanujan derives (1) by using a partial fraction decomposition of the product $\prod_{k=0}^{n}\frac{1}{ 1 + x^{2}/(a+k)^{2}}$, integrating term-wise, and passing to the limit $n\to\infty$. He also indicates that alternatively (1) is implied by the factorization $$\prod_{k=0}^{\infty}\left[1+\frac{x^2}{(a+k)^2}\right] = \frac{ [\Gamma(a)]^2}{\Gamma(a+ix)\Gamma(a-ix)},$$ which follows readily from Euler's product formula for the gamma function. Thus (1) is equivalent to the formula $$\int\limits_{0}^{\infty}\Gamma(a+ix)\Gamma(a-ix)dx=\frac{\sqrt{\pi}}{2} \Gamma(a)\Gamma\left(a+\frac{1}{2}\right).$$


There is a nice paper "Wallis-Ramanujan-Schur-Feynman" by Amdeberhan et al (American Mathematical Monthly 117 (2010), pp. 618-632) that discusses interesting combinatorial aspects of formula (1) and its generalizations.


Regarding your three questions:

I have no idea what the intuition is behind Ramanujan's formula, but I hope someone else does, since I'd certainly like to know.

Expressing the same number as a series in different ways is generally not useful per se, assuming you don't count being interesting or beautiful as being useful. Replacing a slowly converging series with a rapidly converging one can be useful if you want to compute a numerical approximation. If you get lucky, a new series may lead to a remarkable algorithm (such as the Bailey-Borwein-Plouffe algorithm for computing individual binary digits of $\pi$) or irrationality proof (such as Apery's proof of the irrationality of $\zeta(3)$), but you certainly can't count on that.

As for applications of continued fractions in the real world, I don't know of many applications for continued fraction expansions of real numbers. Of course simple continued fractions are critical if you want good rational approximations, but not very many people do want them in practice.

On the other hand, continued fraction expansions of functions have lots of real-world uses. The intuition is that people are rarely interested in the properties of specific numbers in applied problems, but they are more likely to be interested in specific functions.

For example, the Berlekamp-Massey algorithm efficiently reconstructs a linear recurrence relation from a sequence satisfying it, and it can be reformulated in terms of computing the continued fraction expansion of a rational function. This is "linear feedback shift register synthesis", which comes up in many practical problems; among other things, it's used for decoding Reed-Solomon error-correcting codes, which are used on CDs, DVDs, and Blu-ray discs. It also comes up in some Krylov subspace algorithms for sparse linear algebra, such as the Wiedemann algorithm.

Another practical application is computing in the Jacobian of a hyperelliptic curve $y^2 = f(x)$ over a field $K$ (which may not sound very practical, but it is if you want to do hyperelliptic curve cryptography). This amounts to finding a reduction algorithm for divisors on the curve, and it can be done very efficiently if you know how the continued fractions of functions in $K(x,\sqrt{f(x)})$ behave.

A third case is computing Pade approximants of transcendental functions (this goes slightly beyond continued fractions, but is closely connected). Pade approximants give excellent rational function approximations to a given function, which are much more tractable on a computer than the original function was.


Here is a proof of Ramanujan's identity (thanks to Todd Trimble for encouraging me to post this!). As Andrey Rekalo notes, we have the identity $$\displaystyle\prod\limits_{k=0}^{\infty}(1+\frac{x^2}{(k+a)^2})=\frac{\Gamma(a)^2}{|\Gamma(a+ix)|^2}$$

In particular, the integrand in Ramanujan's integral is $\dfrac{\Gamma(b+1)^2 |\Gamma(a+ix)|^2}{\Gamma(a)^2 |\Gamma(b+1+ix)|^2}$. Hence, after a little algebra (and also changing $b$ to $b-1$; I personally think Ramanujan made the wrong aesthetic choice here), we need to prove the integral evaluation $$I=\displaystyle\int\limits_{-\infty}^{\infty} \frac{|\Gamma(a+ix)|^2}{|\Gamma(b+ix)|^2}dx=\sqrt{\pi}\frac{\Gamma(a)\Gamma(a+1/2)\Gamma(b-a-1/2)}{\Gamma(b-1/2)\Gamma(b)\Gamma(b-a)}$$

Now, if $f(x)$ has Mellin transform $F(s)$, then one form of Parseval's theorem for Mellin transforms is the identity $$\int_{0}^{\infty}|f(x)|^{2}x^{-1}dx=\frac{1}{2\pi}\int\limits_{-\infty}^{\infty}|F(it)|^2 dt$$

(under suitable conditions of course). Applying this with the Mellin pair $f(x)=\Gamma(b-a)^{-1}x^{a}(1-x)^{b-a-1}$ if $0\leq x \leq 1$ (and $f=0$ otherwise), $F(s)=\dfrac{\Gamma(s+a)}{\Gamma(s+b)}$ gives

$$I=2\pi \Gamma(b-a)^{-2} \int\limits_{0}^{\infty}x^{2a-1}(1-x)^{2b-2a-2}dx$$

$$=2\pi \Gamma(b-a)^{-2} \frac{\Gamma(2a) \Gamma(2b-2a-1)}{\Gamma(2b-1)}$$

Next, apply the formula $\Gamma(2z)=2^{2z-1}\pi^{-1/2}\Gamma(z)\Gamma(z+1/2)$ to each of the $\Gamma$-functions in the quotient here, getting

$$I=\sqrt{\pi} \frac{\Gamma(a)\Gamma(a+1/2)\Gamma(b-a-1/2)\Gamma(b-a)}{\Gamma(b-a)^2 \Gamma(b-1/2) \Gamma(b)}$$And cancelling $\Gamma(b-a)$ concludes the proof.

Exercise: Give a proof, along similar lines, of the formula

$$\int_{-\infty}^{\infty} |\Gamma(a+ix)\Gamma(b+ix)|^2 dx=\sqrt{\pi}\cdot\frac{\Gamma(a)\Gamma(a+1/2)\Gamma(b)\Gamma(b+1/2)\Gamma(a+b)}{\Gamma(a+b+1/2)}$$

And determine for what range of $a,b$ it holds.