Feynman's Trick — Differentiation Under the Integral Sign (3)

Because of a bicycle trip, this post got shelved for a week; really it should have been written a week ago. This post continues with some more examples of Feynman's trick. Readers can perhaps pick up, from these different types of examples, the underlying strategy and method behind its application, and thereby sharpen their own understanding of it.

Example 2:

$$\int_0^{\infty} \frac{\sin x}{x}dx$$

This is also a fairly common type, taking the form $\int \frac{f(x)}{x}dx$. For a form like this, our first instinct is to rewrite it using a parameter, $\int \frac{f(ax)}{x}dx$, the purpose being simply to eliminate the denominator — the same idea as in computing $\int \frac{x}{f(x)}dx$. But if we dig a little deeper, we'll find that although this does eliminate the denominator and makes the first integration easy, when we get to the second integration we find ourselves back with an integral of the form $\int \frac{f(x)}{x}dx$, and we can't proceed any further. So this way of introducing a parameter usually doesn't work.

There is a clever trick: transform it into

$$\begin{aligned}G(a)=\int_0^{\infty} e^{-ax}\frac{\sin x}{x}dx \\ f(x,a)=e^{-ax}\frac{\sin x}{x}\end{aligned}$$

Here we've added an extra piece, $e^{-ax}$, on top of the original expression, and its role is again to eliminate the denominator, because

$$\frac{\partial f(x,a)}{\partial a}=-e^{-ax} \sin x$$

hence

$$\begin{aligned}G'(a)=\int_0^{\infty} -e^{-ax} \sin x dx \\ =\frac{1}{a^2+1} e^{-ax}(a \sin x+\cos x)|_0^{\infty} \\ =-\frac{1}{a^2+1}\end{aligned}$$

(see table of integrals of exponential functions)

which finally gives

$$G(a)=-\int \frac{1}{a^2+1} da=-arctan a +C$$

When $a\to \infty$, $f(x,a)=0$, $G(a)=0$, giving $C=\frac{\pi}{2}$. The final result is

$$\int_0^{\infty} e^{-ax}\frac{\sin x}{x}dx=-arctan a+\frac{\pi}{2}$$

so

$$\int_0^{\infty} \frac{\sin x}{x}dx=G(0)=\frac{\pi}{2}$$

Example 3:

In the book on Advanced Calculus that Feynman studied, there is a very classic example whose solution combines ideas from differential equations.

Given $\int_0^{\infty} e^{-x^2}dx=\frac{\sqrt{\pi}}{2}$, evaluate the integral: $u=\int_0^{\infty} e^{-x^2-\frac{a^2}{x^2}}dx$

This integral already contains a parameter a, so let's just go ahead and differentiate with respect to it, and see what happens:

$$\begin{aligned}\frac{du}{da}=\int_0^{\infty} \frac{\partial (e^{-x^2-\frac{a^2}{x^2}})}{\partial a}dx \\ =2\int_0^{\infty} e^{-x^2-\frac{a^2}{x^2}}d(\frac{a}{x})\end{aligned}$$

Let $t=\frac{a}{x}$; then this becomes

$$\int_0^{\infty} e^{-x^2-\frac{a^2}{x^2}}d(\frac{a}{x})=-\int_0^{\infty} e^{-t^2-\frac{a^2}{t^2}}dt$$

This integral has exactly the same form as the one we're trying to evaluate, since the choice of variable symbols (x, t) is just a matter of notation — the integral itself doesn't depend on what we call the variables. So we can confidently say

$$\int_0^{\infty} e^{-t^2-\frac{a^2}{t^2}}dt=u$$

Putting it all together: $\frac{du}{da}=-2u$

Solving this gives $u=C \times e^{-2a}$, and using the given condition, we can pin down the constant $C=\frac{\sqrt{\pi}}{2}$, so

$$\int_0^{\infty} e^{-x^2-\frac{a^2}{x^2}}dx=\frac{\sqrt{\pi}}{2} \times e^{-2a}$$

Summary

The transformations used in Feynman's trick come in many varied and unpredictable forms. Applying it in practice requires the courage to imagine and to experiment, and often calls for a flash of inspiration before the pen can work its magic! Perhaps it's precisely this flexibility that means it often has unexpected delights waiting for us — and perhaps that's exactly why Feynman was so fond of it.

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