Feynman's Trick for Integrals (7): A Synthesis of Euler's Mathematics

In the fifth post of this series, BoJone derived some seemingly unmotivated formulas without explaining where they came from or what they're used for. In fact, they were all things I worked out while studying the following integral:

$$\int_{-\infty}^{+\infty} \frac{\cos x}{a^2+x^2}dx$$more

Computing a special case

How should we go about this integral? I didn't have a good idea right away — even though it already comes with a parameter a, differentiating directly with respect to a only makes the integrand more complicated, without any obviously integrable form appearing. So I decided to first look at a special case, namely a=1:

$$\int_{-\infty}^{+\infty} \frac{\cos x}{1+x^2}dx$$

Since differentiating with respect to the original parameter doesn't simplify anything, this tells us that Feynman's trick can't be applied directly to this parameter as it stands. I decided to try changing the parameter to:

$$F(a)=\int_{-\infty}^{+\infty} \frac{\cos (ax)}{1+x^2}dx$$

Clearly, when a=0 the value of the integral is $F(0)=\pi$, and by the discussion in Feynman's Trick for Integrals (5), when $a\to \infty$ we have $F(\infty)=0$.

Let's try differentiating?

$$F'(a)=-\int_{-\infty}^{+\infty} \frac{x \sin (ax)}{1+x^2}dx$$

Still no obviously integrable form appears. But the periodicity that shows up when differentiating trigonometric functions reminded me of the approach in Feynman's Trick for Integrals (3), where we once used the idea of a differential equation to evaluate an integral. So I differentiated once more:

$$\begin{aligned}F''(a)=&\,-\int_{-\infty}^{+\infty} \frac{x^2 \cos (ax)}{1+x^2}dx \\ =&\,\int_{-\infty}^{+\infty} \frac{\cos (ax)}{1+x^2}dx-\int_{-\infty}^{+\infty}\cos (ax)dx \\ =&\,F(a)-\int_{-\infty}^{+\infty}\cos (ax)dx\end{aligned}$$

What a pleasant surprise! Out popped a second-order linear differential equation. By the discussion in Feynman's Trick for Integrals (5), $\int_{-\infty}^{+\infty}cos (ax)dx=0$. So this means:

$$F''(a)=F(a)$$

That makes things much easier — we can directly write down the general solution $F(a)=C_1 e^a+C_2 e^{-a}$, and using $F(0)=\pi,F(\infty)=0$, we immediately deduce:

$$F(a)=\pi e^{-a}$$

At this point we obtain:

$$\begin{aligned}\int_{-\infty}^{+\infty} \frac{\cos x}{a^2+x^2}dx =&\,\frac{1}{a}\int_{-\infty}^{+\infty} \frac{\cos (a\times \frac{x}{a})}{1+(\frac{x}{a})^2}d(\frac{x}{a}) \\ =&\,\frac{1}{a}F(a)=\frac{\pi}{a}e^{-a}\end{aligned}$$

Reflections and puzzles

If you've worked through this derivation yourself, I suspect you'll be puzzled by the same thing I was: according to $F'(a)=-\int_{-\infty}^{+\infty} \frac{x \sin (ax)}{1+x^2}dx$ we should get $F'(0)=0$, but the solution we found clearly doesn't follow this pattern. Why is that?

At first I was completely stumped, but on reflection I realized that $a=0$ is a rather special case — what happens when $a\neq 0$? I tried letting a take a very small specific value (say 0.000001), and found that the result computed from $F'(a)=-\int_{-\infty}^{+\infty} \frac{x \sin (ax)}{1+x^2}dx$ agreed with the result computed from $F(a)=\pi e^{-a}$. So the final conclusion is: the integral $\int_{-\infty}^{+\infty} \frac{x \sin (ax)}{1+x^2}dx$ is discontinuous at a=0!! Actually, one can also think of it this way: a approaches 0, but x also tends to infinity, and — more importantly — even if $\sin(ax)$ tends to 0, $x \sin(ax)$ doesn't necessarily tend to 0 as well. In short, it can all be summed up in one sentence:

In this integral, taking the limit in $a$ first and then in $x$, versus taking the limit in $x$ first and then in $a$, gives different results!

This is a warning that limits of functions of several variables cannot always be interchanged in order!

On another note, Feynman's Trick for Integrals (5) in fact also provides us with another approach to computing

$$\int_{-\infty}^{+\infty} \frac{\cos x}{a^2+x^2}dx$$

The idea is to rewrite it as:

$$\int_{-\infty}^{+\infty} \frac{e^{ix}}{a^2+x^2}dx$$

and introduce a parameter to turn it into:

$$F(b)=\int_{-\infty}^{+\infty} e^{-b(x^2+a^2)}\frac{e^{ix}}{a^2+x^2}dx$$

and then differentiate with respect to b. This is also a fairly straightforward approach, though the process requires using the result from Feynman's Trick for Integrals (3). Interested readers are welcome to give it a try.

English translation of a post from 科学空间 | Scientific Spaces by 苏剑林. Original: https://kexue.fm/archives/1946
Translated automatically with claude-sonnet-5; all equations are reproduced verbatim from the source. Copyright remains with the original author.