Feynman's Trick (8): Evaluating the Gaussian Integral

Ever since I learned about Feynman's trick for evaluating integrals, I've been wanting to use it to compute that remarkable integral, the Gaussian integral $\int_0^{\infty} e^{-x^2}dx=\frac{\sqrt{\pi}}{2}$, but I kept coming up empty-handed. In The Mathematical Bridge, the author solves it by converting it into a double integral—a clean and clever approach. But to showcase the power of Feynman's trick, I kept looking for other ways to derive the Gaussian integral. Last week, in Methods of Mathematical Physics, I saw the author evaluate this integral using the Laplace transform, which caught my eye immediately—though that falls under integral transforms, a technique belonging to "differentiation under the integral sign" in a different sense, so I won't discuss it here. Today, while searching online, I came across a paper by Zhao Jie titled "Integrals with Parameters," which presented a method that does fall within the scope of Feynman's trick. I wanted to share it here.

Looking at it in hindsight, the result of the Gaussian integral involves the quantity $\sqrt{\pi}$. Generally speaking, many familiar formulas involve $\pi$, but almost none involve $\sqrt{\pi}$ directly, so it's natural to square the integral first. We introduce

$$f(x)=(\int_0^x e^{-t^2}dt)^2$$

This greatly broadened my view of Feynman's trick—I'd never really considered putting the parameter into the limits of integration. What advantage does this bring? Let's differentiate with respect to x:

$$f'(x)=2\int_0^x e^{-t^2}dt \times e^{-x^2}=2\int_0^x e^{-(t^2+x^2)}dt$$

It turns out that after differentiating this way, the product of the two integrals collapses into a single integral times a standalone term! This simplifies things considerably. Making the substitution $t=ux$, we get

$$f'(x)=\int_0^1 2x e^{-(1+u^2)x^2}du$$

Now let's work our way back.

$$f(x)=\int (\int_0^1 2x e^{-(1+u^2)x^2}du)dx= \int_0^1 [ \int(2x e^{-(1+u^2)x^2}dx)]du$$

that is,

$$f(x)=-\int_0^1(\frac{e^{-(1+u^2)x^2}}{1+u^2})du+C$$

When x=0, we can find that $f(0)=0$, and $\int_0^1(\frac{e^{-(1+u^2)x^2}}{1+u^2})du=\frac{\pi}{4}$, so $C=\frac{\pi}{4}$. That is:

$$f(x)=-\int_0^1(\frac{e^{-(1+u^2)x^2}}{1+u^2})du+\frac{\pi}{4}$$

The Gaussian integral is equivalent to $x\to +\infty$, so

$$\lim_{x\to +\infty} \int_0^1(\frac{e^{-(1+u^2)x^2}}{1+u^2})du=0$$

Hence $f(+\infty)=\frac{\pi}{4}$, and therefore:

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

How elegant! This brings together a whole array of techniques and greatly broadens our perspective on Feynman's trick. Note that in all our previous uses of Feynman's trick, we ended up deriving an explicit closed form for the parametrized integral—here we don't. We only ever evaluate it at two specific points! But that turns out to be enough! This gives us an entirely new angle of attack, and going forward we'll be able to wield this technique even more powerfully!

The solution from The Mathematical Bridge:

Let $I=\int_{-\infty}^{+\infty} e^{-x^2}dx$, then

$$\begin{aligned}I^2=\int_{-\infty}^{+\infty} e^{-x^2}dx \times \int_{-\infty}^{+\infty} e^{-y^2}dy \\ =\int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} e^{-(x^2+y^2)}dxdy\end{aligned}$$

Switching to polar coordinates, we get

$$\begin{aligned}I^2=\int_{0}^{2\pi} \int_{0}^{\infty} e^{-r^2}r dr d\theta \\ =\int_{0}^{2\pi} (-\frac{1}{2} e^{-r^2}|_0^{\infty})d\theta \\ =\int_0^{2\pi} \frac{1}{2} d\theta \\ =\pi\end{aligned}$$

so $I=\sqrt{\pi}$.

The whole derivation flows as smoothly as water—truly a masterstroke!

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