Here are certain weighted Gaussian integrals I have encountered for which numerical computation reassures equality.

Question. Is this true? If so, is there an underlying transformation or just a proof? $$\int_0^{\infty}x^2e^{-x^2}\frac{{dx}}{\cosh\sqrt{\pi}x} =\frac14\int_0^{\infty}e^{-x^2}\frac{dx}{\cosh\sqrt{\pi}x}.$$

  • 23
    $\begingroup$ The integral in this question was taken from your own paper that was written 10 years earlier "A dozen integrals: Russell-style" and you knew the proof. arxiv.org/abs/0808.2692 $\endgroup$
    – Nemo
    Aug 9, 2021 at 18:15
  • 19
    $\begingroup$ @user44191 Whatever Stack Exchange policy might be, and independently of this particular case (on which I make no comment), it's (1) certainly unusual on MO to ask questions to which you already know the answer, and (2) abusive of other people's time to do this while giving the impression that you don't know the answer. If I spent time solving someone's problem and then typing it up, on the understanding that I was helping them out, I might feel quite angry to discover that they knew the answer all along. I don't use MO as much as I used to, but is there really any doubt over this? $\endgroup$ Aug 10, 2021 at 13:32
  • 5
    $\begingroup$ I can’t understand why downvoting this question. It seems to me interesting and perfectly suitable for MO. Not mentioning an existing proof is a defect, of course, yet I explain it to me with the purpose of not influencing who approaches the problem, since apparently the goal was to get new proofs, insights and connections. $\endgroup$ Aug 10, 2021 at 14:31
  • 18
    $\begingroup$ Besides, after $10$ years it is perfectly possible to forget to have ever proven that particular integral identity. $\endgroup$ Aug 10, 2021 at 17:17
  • 14
    $\begingroup$ @Nemo, making an unnecessary edit, just so you can vote a question down? Really? $\endgroup$ Aug 11, 2021 at 13:09

2 Answers 2


This is a generous explanation of Lucia's comment above.

The functions $$\mathcal H_n(x)=\frac{2^{1/4}}{(2^n n!)^{1/2}}H_n(\sqrt{2\pi}\; x) e^{-\pi x^2}$$ form an orthonormal system in $L^2(\textbf{R})$. Here $H_n(x)$ are the usual Hermite polynomials defined by $$e^{2xz-z^2}=\sum_{n=0}^\infty \frac{H_n(x)}{n!}z^n,\qquad |z|<\infty.$$ The functions are eigenfunctions for the usual Fourier transform so that $$\int_{-\infty}^{+\infty}\mathcal H_n(t)e^{-2\pi i x t}\,dt=(-i)^n \mathcal H_n(x).$$

It follows that $L^2(\textbf{R})$ is a direct sum of four subspaces. In each of these subspaces the Fourier transform is just multiplication by $1$, $i$, $-1$, $-1$ respectively.

It is well known that the function $1/\cosh\pi x$ is invariant by the Fourier transform $$\int_{-\infty}^{+\infty}\frac{e^{-2\pi i x\xi}}{\cosh\pi x}\,dx= \frac{1}{\cosh\pi \xi}.$$ Therefore this function is in the span of the functions $\mathcal H_{4n}(x)$, and therefore is orthogonal to any other eigenfunction. In particular $$\int_{-\infty}^{+\infty}\frac{\mathcal H_2(x)}{\cosh\pi x}\,dx=0.$$ Since $H_2(x)=-2+4x^2$ it follows that $$\int_{-\infty}^{+\infty}\frac{(8\pi x^2-2)e^{-\pi x^2}}{\cosh\pi x}\,dx=0.$$ Putting $x/\sqrt{\pi}$ instead of x $$\int_{-\infty}^{+\infty}\frac{(8 x^2-2)e^{-x^2}}{\cosh\sqrt{\pi} x}\,\frac{dx}{\sqrt{\pi}}=0.$$ This is equivalent to your equation.



The integral in T. Amdeberhan's question was taken from his own paper that was written 10 years earlier before he posted his question: https://arxiv.org/abs/0808.2692 A dozen integrals: Russell-style. Thus it seems that T. Amdeberhan knew the answer to the question he asked. Why did he ask it then?

I provide a screenshot below for the reader's convenience (integral number $7$):

enter image description here

At the end of the paper, the authors provide a sketch of proof:

enter image description here


Note that the following functions are self-reciprocal $\sqrt{\frac{2}{\pi}}\int_0^\infty f(x)\cos ax dx=f(a)$ (see this MO post for a list of such functions): $$ \frac{1}{\cosh\sqrt{\frac{\pi}{2}}x},\quad e^{-x^2/2}.\tag{1} $$ It was proved by Hardy (Quarterly Journal Of Pure And Applied Mathematics, Volume 35, Page 203, 1903) and Ramanujan (Ramanujan's Lost Notebook, part IV, chapter 18) that for two self-reciprocal functions $f$ and $g$ we have $$ \int_0^\infty f(x)g(\alpha x) dx=\frac{1}{\alpha}\int_0^\infty f(x)g(x/\alpha) dx. $$ The formal agument is as follows but it can be made rigorous for certain type of functions $$ \int_0^\infty f(x)g(\alpha x) dx=\int_0^\infty f(x)dx\cdot \sqrt{\frac{2}{\pi}}\int_0^\infty g(y) \cos(\alpha x y)dy=\\ \int_0^\infty g(y)dy \cdot \sqrt{\frac{2}{\pi}}\int_0^\infty f(x)\cos(\alpha x y)dx=\int_0^\infty g(y)f(\alpha y) dy=\\ \frac{1}{\alpha}\int_0^\infty f(x)g(x/\alpha) dx. $$ For functions in $(1)$ which decay rapidly at $x\to\pm\infty$ it is certainly true. So we obtain an identity due to Hardy and Ramanujan $$ \int_{0}^{\infty} \frac{e^{-x^{2}/2}}{\cosh{\sqrt{\frac{\pi}{2}}\alpha{x}}} {dx} = \frac{1}{\alpha} \int_{0}^{\infty} \frac{e^{-x^{2}/2}}{\cosh{\sqrt{\frac{\pi}{2}}\frac{x}{\alpha}}}{dx}. $$ After some simplifications it becomes $$ \int_{0}^{\infty} \frac{e^{-\alpha^2x^{2}}}{\cosh{\sqrt{{\pi}}{x}}} {dx} = \frac{1}{\alpha} \int_{0}^{\infty} \frac{e^{-x^{2}/\alpha^2}}{\cosh{\sqrt{{\pi}}{x}}}{dx}. $$ To complete the proof differentiate this with respect to $\alpha$ and then set $\alpha=1$.

  • 5
    $\begingroup$ It's fine to ask a user, why post a problem if you already know the answer. It crosses a line to follow that by making an unpleasant speculation as to the reason. Please delete that part of your post. $\endgroup$ Aug 11, 2021 at 13:11
  • 5
    $\begingroup$ I removed that part. Let us stick to facts, without making unprovable speculations. $\endgroup$ Aug 11, 2021 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.