Problem: evaluate the following integral:

$$\int_0^{\infty}dx \frac{e^{-a x^2(x^2-\pi^2)}\cos(2\pi a x^3)}{\cosh x} $$

To evaluate this integral, consider the following integral in the complex plane:

$$\oint_C \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2}$$

where $C=C_1+C_2+C_3+C_4+C_5+C_6$ as illustrated below:

$$\int_{C_1} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2} = \int_{i \pi/2}^{R+i \pi/2} \frac{dx}{\sinh{x}} e^{-a (x^2-\pi^2/4)^2}$$

$$\int_{C_2} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2} = i\int_{\pi/2}^{-\pi/2} \frac{dy}{\sinh{(R+iy)}} e^{-a [(R+i y)^2-\pi^2/4]^2} $$

$$\int_{C_3} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2} = \int_{R-i \pi/2}^{-i \pi/2} \frac{dx}{\sinh{x}} e^{-a (x^2-\pi^2/4)^2}$$

$$\int_{C_4} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2} = \int_{-\pi/2}^{-\epsilon} \frac{dy}{\sin{y}} e^{-a (y^2+\pi^2/4)^2} $$

$$\int_{C_5} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2} = i \epsilon\int_{-\pi/2}^{\pi/2} \frac{d\phi \, e^{i \phi}}{\sinh{(\epsilon e^{i \phi}})} e^{-a [\epsilon^2 e^{i 2 \phi}-\pi^2/4]^2} $$

$$\int_{C_6} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2} = \int_{\epsilon}^{\pi/2} \frac{dy}{\sin{y}} e^{-a (y^2+\pi^2/4)^2} $$

We intend to take $R \to \infty$ and $\epsilon \to 0$. In this case, it should be clear that the integral over $C_2$ will vanish in the former limit. Also, the integrals over $C_4$ and $C_6$ cancel each other out as the sum is an integral over an odd integrand over a symmetric interval.

We are then left with the integrals over $C_1$, $C_3$, and $C_5$. The sum of the first two integrals, over $C_1$ and $C_3$, is

$$\underbrace{\int_{i \pi/2}^{\infty+i \pi/2} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2}}_{z=x+i \pi/2} + \underbrace{\int_{\infty-i \pi/2}^{-i \pi/2} \frac{dz}{\sinh{z}} e^{-a (z^2-\pi^2/4)^2}}_{z=x-i \pi/2} = \\ -i \int_0^{\infty} \frac{dx}{\cosh{x}} e^{-a x^2 (x+i \pi)^2} + i \int_{\infty}^0 \frac{dx}{\cosh{x}} e^{-a x^2 (x-i \pi)^2}$$

which is

$$-i \int_0^{\infty} \frac{dx}{\cosh{x}} e^{-a x^2 (x^2-\pi^2)} \left [ e^{i 2 \pi a x^3} + e^{-i 2 \pi a x^3}\right] = -i 2 \int_0^{\infty} \frac{dx}{\cosh{x}} e^{-a x^2 (x^2-\pi^2)} \cos{2 \pi a x^3} $$

The integral over $C_5$ is, in the limit as $\epsilon \to 0$, is

$$i \epsilon\int_{-\pi/2}^{\pi/2} \frac{d\phi \, e^{i \phi}}{\sinh{(\epsilon e^{i \phi}})} e^{-a [\epsilon^2 e^{i 2 \phi}-\pi^2/4]^2} \approx i \epsilon\int_{-\pi/2}^{\pi/2} \frac{d\phi \, e^{i \phi}}{\epsilon e^{i \phi}} e^{-a (-\pi^2/4)^2} = i \pi e^{-a \pi^4/16}$$

By Cauchy’s Theorem, the sum of the integrals over these contours is zero. Thus we get

$$-i 2 \int_0^{\infty} \frac{dx}{\cosh{x}} e^{-a x^2 (x^2-\pi^2)} \cos{2 \pi a x^3} + i \pi e^{-a \pi^4/16}=0$$

or

$$ \int_0^{\infty} \frac{dx}{\cosh{x}} e^{-a x^2 (x^2-\pi^2)} \cos{2 \pi a x^3} = \frac{\pi}{2} e^{-\pi^4 a/16}$$

Now, it should be noted that using the methods above, one can show that, for function $F(z)$ that satisfies

$$\lim_{R \to \infty} e^{-R} |F(R)| = 0$$

we have

$$\text{Re} \int_0^{\infty} dx \frac{F(x^2+i \pi x)}{\cosh{x}} = \frac{\pi}{2} F\left ( -\frac{\pi^2}{4}\right)$$

What a clever and brilliant solution. Man, you sure a smart with these contours. You learn me a lot about this stuff.

Can I ask one thing, though?.

Down where you state, “We are then left with the integrals over C1, C3, and C5. The sum of the first two integrals, over C1 and C3, is”:

In the first line, the exponent on the e term is -a(z^2-pi^2/4)^2, then you sub in z=x+(pi i)/2.

How then does it become -ax^2(x+pi i)^2?.

May I ask what happens to the extra terms from the first to second step?.

Do you see what I am trying to explain?.

When I sub in z = x+(pi i)/2 I get some extra terms that are not in -ax^2(x+pi i)^2.

Anyway, I am probably being daft as usual, but I want to follow all of your steps.

Thanks and take care,

Cody

Please disregard my previous comment, Ron. I see you used the real part. DUH. Nice problem.