Lambdia

Root Pi from a Bell Curve, by Leaving the Number Line

There is no elementary antiderivative to evaluate, and the checkable slice of that is one line: if p is a polynomial then p' - 2xp has degree deg p + 1, which can never equal the degree of 1. Squaring the integral turns it into a rotationally symmetric integral over the plane, where the polar area element supplies the factor r that makes the radial integral elementary, so I squared equals 2 pi times one half. The same idea survives without polar coordinates via the substitution y = xt, and it fails for e to the minus x to the fourth because x^4 + y^4 is not a function of the radius.

Find the area under the bell curve ex2e^{-x^2} across the whole real line.

ex2dx=π=1.7724538509\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi} = 1.7724538509\ldots
(1)

A π\pi appears in the answer to a question with no circle anywhere in it. Where it comes from is the interesting part, and it comes from leaving the line.

The usual method has nothing to grip

The reflex is to find an antiderivative and evaluate it at the two ends. There is no formula in the elementary functions to find. That is a theorem, not a failure of ingenuity: Liouville showed that certain integrands admit no antiderivative built from powers, exponentials, logarithms and trigonometric functions, and ex2e^{-x^2} is the standard example.

Be careful about what is being claimed, because the loose version is false. π2erf(x)\tfrac{\sqrt\pi}{2}\operatorname{erf}(x) is an antiderivative, and differentiating it returns ex2e^{-x^2} exactly. What does not exist is an antiderivative written in elementary terms, and erf\operatorname{erf} is defined by this very integral, so quoting it evaluates nothing.

A concrete slice of Liouville's result is easy to prove and worth doing, because it shows the obstruction rather than asserting it. Suppose pp is a polynomial of degree dd and (p(x)ex2)=ex2\left(p(x)e^{-x^2}\right)' = e^{-x^2}. Differentiating the left side gives

(pex2)=(p2xp)ex2    p2xp=1\left(p\,e^{-x^2}\right)' = \left(p' - 2xp\right)e^{-x^2} \;\Longrightarrow\; p' - 2xp = 1
(2)

The polynomial p2xpp' - 2xp has degree d+11d + 1 \ge 1, and the constant 1 has degree 0. No pp works, at any degree, so the whole family of candidate formulas is empty in one line.

Square the thing you cannot compute

Call the integral II. It converges, since ex2exe^{-x^2} \le e^{-|x|} once x1|x| \ge 1, so squaring it is legitimate and gives a double integral over the whole plane:

I2= ⁣ ⁣ex2ey2dxdy=R2e(x2+y2)dAI^2 = \int_{-\infty}^{\infty}\!\!\int_{-\infty}^{\infty} e^{-x^2}e^{-y^2}\,dx\,dy = \iint_{\mathbb{R}^2} e^{-(x^2+y^2)}\,dA
(3)

Nothing has been simplified yet. What has changed is that the integrand now depends on x2+y2x^2 + y^2, which is the squared distance from the origin. The function is rotationally symmetric, and a rotationally symmetric function over the plane wants polar coordinates.

Why the step is legal

The integrand is non-negative and measurable, so Tonelli's theorem allows the product to be written as an iterated integral with no integrability assumption at all, and the polar change of variables is a diffeomorphism away from a set of measure zero. Both moves are free here precisely because ex2e^{-x^2} never changes sign.

The ring that makes it elementary

In polar coordinates the area element is dA=rdrdθdA = r\,dr\,d\theta, and the integrand becomes er2e^{-r^2} with no angular dependence. So the angular sweep contributes a bare factor of 2π2\pi and everything else is one radial integral:

I2=02π ⁣ ⁣0er2rdrdθ=2π0rer2drI^2 = \int_0^{2\pi}\!\!\int_0^{\infty} e^{-r^2}\,r\,dr\,d\theta = 2\pi\int_0^{\infty} r\,e^{-r^2}\,dr
(4)

The extra rr is the whole trick. With it, the substitution u=r2u = r^2 works:

0rer2dr=120eudu=12\int_0^{\infty} r\,e^{-r^2}\,dr = \tfrac12\int_0^{\infty} e^{-u}\,du = \tfrac12
(5)

So I2=2π12=πI^2 = 2\pi \cdot \tfrac12 = \pi, and since the integrand is positive, I=πI = \sqrt\pi. The π\pi came from the angular sweep. It is the π\pi of a full turn, and it entered when the problem was moved off the line.

Fig. 1 — Slicing by rings rather than by strips. Each ring has constant height because the integrand only sees distance from the origin, and its area carries the factor of r that equation (5) needs.
Fig. 2 — The original question. The number 1.77 is the two-decimal value of 1.7724538509, and the curve at ±3 is already down to 0.0001 of its peak.

A practical remark about the number itself. The truncated integral is aaex2dx=πerf(a)\int_{-a}^{a} e^{-x^2}dx = \sqrt\pi \operatorname{erf}(a), and erf(3)=0.9999779\operatorname{erf}(3) = 0.9999779. Cutting the tails at ±3\pm 3 therefore loses 22 parts per million, and cutting at ±6\pm 6 loses about 2×10172 \times 10^{-17}. This is why numerical work with this integrand is so forgiving: the domain is infinite and the useful part of it is a handful of units wide, so a quadrature rule on a finite window can reach machine precision.

The same idea without polar coordinates

If a two-variable change of variables feels like heavy machinery, the trick survives in a lighter form. Let J=0ex2dx=I/2J = \int_0^{\infty} e^{-x^2}dx = I/2 and square it. For each fixed xx, substitute y=xty = xt, so dy=xdtdy = x\,dt:

J2=0 ⁣ ⁣0xex2(1+t2)dtdx=0dt2(1+t2)=π4J^2 = \int_0^{\infty}\!\!\int_0^{\infty} x\,e^{-x^2(1+t^2)}\,dt\,dx = \int_0^{\infty}\frac{dt}{2(1+t^2)} = \frac{\pi}{4}
(6)

The inner integral in xx is elementary for the same reason as before, a stray factor of xx in front of a Gaussian, and the remaining integral is an arctangent. So J=π/2J = \sqrt\pi/2 and I=πI = \sqrt\pi. Here the π\pi arrives through arctan\arctan instead of through an angular sweep, which is the same circle wearing a different coat.

Why this cannot be repeated

Squaring an integral to make it easier looks like a technique. It is closer to a coincidence that this particular integrand permits, and the coincidence has two parts.

The integrand must be separable, so that I2I^2 is an integral over the plane of a recognisable function. Exponentials of sums split, so ex2ey2e^{-x^2}e^{-y^2} collapses into e(x2+y2)e^{-(x^2+y^2)}. Then that function of two variables must be rotationally symmetric, so the angular integral is trivial. Both hold here because x2+y2x^2 + y^2 is exactly the squared radius.

Change the exponent and the second condition dies. Squaring ex4dx\int e^{-x^4}dx gives an integrand e(x4+y4)e^{-(x^4+y^4)}, and x4+y4x^4 + y^4 is not a function of rr alone. The level curves are squarish, the angular integral no longer separates, and the whole approach stalls. That integral does have a closed form, 2Γ(5/4)2\Gamma(5/4), and it is found by an entirely different route.

What the same argument gives for free

Rescaling xxax \mapsto x\sqrt a in equation (1) gives eax2dx=π/a\int e^{-ax^2}dx = \sqrt{\pi/a} for every a>0a > 0. Setting a=1/(2σ2)a = 1/(2\sigma^2) yields σ2π\sigma\sqrt{2\pi}, which is where the 2π\sqrt{2\pi}in the normal density's denominator comes from: it is there to cancel this integral.

In nn dimensions the same separation gives Rnex2dx=πn/2\int_{\mathbb{R}^n} e^{-|x|^2}dx = \pi^{n/2}, which is the fastest way to reach the volume of a high-dimensional ball. And substituting t=x2t = x^2 in equation (1) turns it into a statement about the gamma function:

Γ ⁣(12)=0t1/2etdt=20ex2dx=π\Gamma\!\left(\tfrac12\right) = \int_0^{\infty} t^{-1/2}e^{-t}\,dt = 2\int_0^{\infty} e^{-x^2}\,dx = \sqrt{\pi}
(7)

So the factorial of a half is π/2\sqrt\pi/2, and the odd appearance of π\pi in equation (1) is the same fact seen from a different angle.

Sources and further reading

Every step was checked numerically as well as symbolically. Simpson quadrature on the line agrees with π\sqrt\pi to 6×10146 \times 10^{-14}; the Cartesian double integral over a 16 by 16 square agrees with π\pi to 7×10157 \times 10^{-15}; the polar route computed independently agrees with the Cartesian one to 1×10141 \times 10^{-14}, which is the numerical confirmation of the Jacobian factor. And exact rational linear algebra found no polynomial of degree 0 to 12 satisfying equation (2), as the degree argument promises.

Comments · 0

Be the first to comment.