# Integral: $\int_0^{\infty} \cos\left(\frac{a^2}{x^2}-b^2x^2\right)\,dx$ for $a,b>0$

I tried this: $$\int_0^{\infty} \cos\left(\frac{a^2}{x^2}-b^2x^2\right)\,dx=\Re\left(\int_0^{\infty} e^{-ib^2x^2+ia^2/x^2}\,dx\right)=\Re\left(\int_0^{\infty} e^{-\left(ib^2x^2+i^3a^2/x^2\right)}\,dx\right)$$ Sometime back, I stumbled upon the following result: $$\int_0^{\infty} e^{-\left(p^2x^2+m^2/x^2\right)}\,dx=\frac{\sqrt{\pi}}{2p}e^{-2pm}$$ Replacing $p$ with $i^{1/2}b$ and $m$ with $i^{3/2}a$, I get: $$\int_0^{\infty} \cos\left(\frac{a^2}{x^2}-b^2x^2\right)\,dx=\Re\left(\frac{1}{2b}\sqrt{\frac{\pi}{i}}e^{2ab}\right)$$ But this is supposed to be incorrect and I do not see where did I go wrong.

Any help is greatly appreciated. Thanks!

(I do know that this is easily doable using contour integration but I would like to know what's wrong with above)

• Supposed to be incorrect? Did you actually find the real part of that expression and check? – M. Vinay Jul 13 '14 at 3:48
• @M.Vinay: Yes, I did. – Pranav Arora Jul 13 '14 at 3:48
• Make sure you simlified the last result correctly. – Mhenni Benghorbal Jul 13 '14 at 4:02
• You should have a $-2ab$ in the exponent I believe – ClassicStyle Jul 13 '14 at 4:19
• Just checked. With that fix you will get the correct answer – ClassicStyle Jul 13 '14 at 4:21

The confusion arises from the fact that you're assuming the formula $$\int_0^{\infty} e^{-\left(p^2x^2+m^2/x^2\right)}\,dx=\frac{\sqrt{\pi}}{2p}e^{-2pm}$$ is valid if $p^{2}$ is imaginary and positive and $m^{2}$ is imaginary and negative. But that formula is usually derived under the condition that $p$ and $m$ are real positive parameters.

But by integrating on the complex plane, you can see how the two integrals are related.

Let $\displaystyle f(z) = e^{i b^{2}z^{2}} e^{-ia^{2}/z^{2}}$ and integrate around a wedge/sector of radius $R$ that makes an angle of $\frac{\pi}{4}$ with the positive real axis and is indented around the essential singularity at the origin.

Along the arc of the wedge, $\displaystyle |e^{-ia^{2}/z^{2}}|= |e^{-i a^{2}/(R^{2}e^{2it})}| =e^{-a^{2} \sin 2t/R^{2}} \le 1$ since $\displaystyle 0 \le t \le \frac{\pi}{4}$.

Therefore,

\begin{align} \Big| \int_{0}^{\pi /4} f(Re^{it}) \ i Re^{it} \ dt \Big| &\le R \int_{0}^{\pi /4} e^{-b^{2} R^{2} \sin 2t} \ dt \\ &\le R \int_{0}^{\pi /4} e^{-b^{2} R^{2} \frac{4}{\pi} t } \ dt \ \ \text{(Jordan's inequality)} \\ &= \frac{\pi}{4} \frac{1}{b^{2}R} \Big( 1-e^{-b^{2}R^{2}}\Big) \to 0 \ \text{as} \ R \to \infty .\end{align}

A very similar argument shows that the integral also vanishes along the quarter-circle indentation around the origin as the radius of the quarter-circle goes to $0$.

Therefore, since $f(z)$ is analytic inside and on the contour,

$$\int_{0}^{\infty} f(x) \ dx - \int_{0}^{\infty} f(te^{i \pi /4}) e^{i \pi /4} \ dt =0$$

which implies

\begin{align}\int_{0}^{\infty}e^{i b^{2}x^{2}} e^{-ia^{2}/x^{2}} \ dx &= e^{i \pi /4} \int_{0}^{\infty} e^{-b^{2}t^{2}} e^{-a^{2}/t^{2}} \ dt \\ &= e^{i \pi /4} \frac{\sqrt{\pi}}{2b} e^{-2 ab}. \end{align}

And equating the real parts on both sides of the equation,

\begin{align} \int_{0}^{\infty} \cos \left(b^{2}x^{2} -\frac{a^{2}}{x^{2}} \right) \ dx &= \int_{0}^{\infty} \cos \left(\frac{a^{2}}{x^{2}} - b^{2} x^{2} \right) \ dx \\ &= \frac{1}{2b} \sqrt{\frac{\pi}{2}} e^{-2 ab} . \end{align}

I confirm that, before any simplification, $$I=\int_0^{\infty} e^{i \left(\frac{a^2}{x^2}-b^2 x^2\right)} \, dx=\frac{\sqrt{\pi } e^{-\frac{2 \sqrt{i b^2}}{\sqrt{\frac{i}{a^2}}}}}{2 \sqrt{i b^2}}$$ under the conditions that $\Im\left(b^2\right)<0\land \Im\left(a^2\right)>0$.

After simplifications $$J=\int_0^{\infty} \cos\left(\frac{a^2}{x^2}-b^2x^2\right)\,dx=\Re\left(\frac{1}{2b}\sqrt{\frac{\pi}{i}}e^{-2ab}\right)=\frac{1}{2b}\sqrt{\frac{\pi}{2}}e^{-2ab}$$ which is your answer with a minus sign in the exponent.

I performed numerical checks and this is correct.

• I am really sorry, I forgot to mention the constraints on $a$ and $b$. For the given problem, $a,b>0$. Does your result holds true for this case? Also, in my attempt, I realised that I cannot write $-i$ as $i^3$. I can write it as $i^7$ and this will give me the correct result. However, how do I decide between $i^3$ and $i^7$? Thank you! – Pranav Arora Jul 13 '14 at 4:31
• I do not see why you used $i$ and $i^3$. I just used $i$ and everything came. – Claude Leibovici Jul 13 '14 at 4:34
• No no, I didn't do that. Let me explain more clearly. In the exponent of $e$, I have: $$i\left(\frac{a^2}{x^2}-b^2x^2\right)=-\left(ib^2x^2-i\frac{a^2}{x^2}\right)$$ I can write $-i$ as $i^3$ or $i^7$. If I write $-i$ as $i^3$, I get (in the exponent of $e$) $-2\cdot i^{1/2}b\cdot i^{3/2} a=2ab$ and if I use $i^7$, I get: $-2\cdot i^{1/2}b \cdot i^{7/2}a=-2ab$. I do not understand the reason behind these different results. – Pranav Arora Jul 13 '14 at 4:40
• Ah, the problem is with the nature of complex exponentiation. It is multivalued due to the fact that $\exp$ is not injective on the entire complex plane. Thus when you take the square root of $i^7$ and $i^3$ as you would for real numbers, you get different answers. (The reason being you assume $\sqrt{1} = \sqrt{i^4} = i^2 = -1$, which, while certainly being a root of $1$, isn't necessarily the one you want). – Joshua Mundinger Jul 14 '14 at 15:42