9

I am curious to know if it is possible to evaluate the following integral: $$\int_{-\infty}^{\infty}e^{-x^2}\operatorname{sech}^2\left(\frac{x}{2}\right)\,dx$$

Here is the context:

Someone had asked me about the error when using the trapezoidal rule on the integral $$I=\int_{0}^{1} \exp\left(-\ln^2\left(\frac{x}{1-x}\right)\right)\,dx= \int_{0}^{1} \exp\left(-\ln^2\left(\frac{x}{x-2}\right)\right)\,dx$$ I was however interested to potentially find a closed-form for this integral.

Here are my attempts:

After setting $u=\ln \left(\frac{x}{1-x}\right)$ one can show that $$I=\int_{-\infty}^{\infty} \frac{e^{u-u^2}}{(1+e^u)^2}\,du\stackrel{\text{IBP}}{=}-2\int_{-\infty}^{\infty} \frac{u e^{-u^2}}{1+e^u}\,du$$ Here I tried to use contour integration, however, the residue sum diverges rapidly, so I was stuck with this attempt.

Splitting the integral at $0$, and using $$\frac{1}{1+e^u} =\sum_{n=1}^{\infty} (-1)^{n-1} e^{-n u}$$ one can determine $$I=\sum_{n=1}^{\infty} (-1)^{n-1} n \sqrt{\pi} e^{n^2/4} \operatorname{erfc}\left(\frac{n}{2}\right)$$ but I’m not sure how to evaluate this series.

Performing some substitutions on $I$ one can arrive at $$I=\int_{-\infty}^{\infty} x e^{-x^2} \tanh\left(\frac{x}{2}\right)\,dx\stackrel{\text{IBP}}{=}\frac{1}{4}\int_{-\infty}^{\infty} e^{-x^2} \operatorname{sech}^2\left(\frac{x}{2}\right)\,dx=\int_{-\infty}^{\infty}\frac{e^{-x^2}}{e^x+e^{-x}+2}\,dx$$ which appears like an integral that potentially contour integration can be applied to but I still arrive at the same rapidly-diverging residue series.

I also arrived at the radically different form $$I=1-\frac{4}{\pi} \int_{0}^{\infty} \sin (t) \left(\Im \left(\psi \left(\frac{\sqrt{it}}{2\pi}\right)-2\psi\left(\frac{\sqrt{it}}{\pi}\right)\right)+\frac{\pi}{4}\right)\, dt$$ where $\psi$ is the digamma function. This doesn’t appear too hopeful, however, since integrals of the form $\sin (x) \psi (x)$ generally don’t have closed-forms and can only be expressed in terms of a logarithm series of similar form to my question on $\sum_{k=3}^{\infty} \frac{\ln (k)}{k^2-4}$ due to the results known about the Laplace transform of the digamma function, but perhaps the case $\sin (x) \psi (\sqrt{x})$ works out nicer- I will also accept some logarithmic series of similar form for $I$.

I found this question which asked about a generalised form of this integral.

KStar
  • 6,211
  • Not sure if it helps, but: $\operatorname{sech}^2 x=\frac2{1+\cosh 2x}.$ – Thomas Andrews Jul 28 '22 at 00:47
  • FWIW, Wolfram Alpha doesn't give a closed-form solution, just the numeric approximation 1.59294. – Dan Jul 28 '22 at 00:55
  • May worth looking at Mordell integrals. – metamorphy Jul 28 '22 at 02:29
  • 2
    @metamorphy Was just about to post something similar :) Note that the title on that page has copied the integral inaccurately. The paper deals with integrals of the form $$\int_{-\infty}^\infty \frac{e^{ax^2+bx}}{e^{cx}+d},dx$$ and the original source is L.Mordell, Quarterly Journal of Pure and Applied Mathematics 48 (1920), 329-342. – David Jul 28 '22 at 02:31
  • 1
    The integral appeared in this answer but was not resolved. – TheSimpliFire Jul 28 '22 at 10:05
  • Perhaps this would be useful in expanding the exponential? $$ \int_0^{\infty} x^k \operatorname{sech}^2(\frac{x}{2}) : dx = 4 \cdot \Gamma(k+1) \cdot\zeta(k) \cdot(1-\frac{2}{2^k})$$ –  Jul 30 '22 at 00:17

1 Answers1

1

Using $$\frac 1{1+e^u}=\sum_{n=0}^\infty \frac{E_n(0) }{2 n!}u^n$$ $$I=-2\int_{-\infty}^{+\infty} \frac{u\, e^{-u^2}}{1+e^u}\,du=-\sum_{n=0}^\infty\frac{E_{2 n+1}(0)\,\, \Gamma \left(n+\frac{3}{2}\right)}{\Gamma (2 n+2)} $$ The convergence is quite fast.