Prove $\int_{0}^\infty \frac{1}{\Gamma(x)}\, \mathrm{d}x = e + \int_0^\infty \frac{e^{-x}}{\pi^2 + \ln^2 x}\, \mathrm{d}x$ I came across this nice identity:
$$\int_{0}^\infty \frac{1}{\Gamma(x)}\, \mathrm{d}x = e + \int_0^\infty \frac{e^{-x}}{\pi^2 + \ln^2 x}\, \mathrm{d}x$$
Is there an elementary proof?
 A: Hardy recorded in his 1937 papers that the formula was discovered by Ramanujan, who did not profess to prove such an identity. Hardy published his proof, which was based on the "Plana's formula"(A proof of Plana's formula can be found here). Here is an outline of Hardy's original proof. I doubt whether an "elementary" proof exists(without complex analysis).
The Plana's formula asserts that
$$\sum_{n=0}^{\infty}f(n)-\int_{0}^{\infty}f(x)dx=\frac{1}{2}f(0)+i\int_{0}^{\infty}\frac{f(it)-f(-it)}{e^{2\pi t}-1}dt$$
Let $f(u)=1/\Gamma(u)$, then $$\sum_{n=0}^{\infty}\frac{1}{n!}-\int_{0}^{\infty}\frac{1}{\Gamma(x)}dx=i\int_{0}^{\infty}\frac{1/\Gamma(it)-1/\Gamma(-it)}{e^{2\pi t}-1}dt$$
An elementary transform of RHS gives
$$i\int_{0}^{\infty}\frac{1/\Gamma(it)-1/\Gamma(-it)}{e^{2\pi t}-1}dt=-\frac{1}{2}\int_{-\infty}^{\infty}\frac{1/\Gamma(it)}{\sin \pi i t}e^{-\pi\vert t\vert}dt$$
Also $$e^{-\pi\vert t\vert}=\int_{0}^{\infty}\frac{u^{it}}{u(\pi^2+\log^2u)}du$$
Then RHS is equal to $$\int_{-\infty}^{\infty}\int_{0}^{\infty}\frac{u^{it}}{u(\pi^2+\log^2u)}\frac{-1/\Gamma(it)}{2\sin \pi i t}dudt$$
Mellin transform gives $$-\frac{1}{2\pi i}\int_{C}\frac{\pi u^{z-1}}{\Gamma(z)\sin \pi z}dz=-e^{-u}$$
where C is the imaginary axis.
And we are done.
