83

Today in my calculus class, we encountered the function $e^{-x^2}$, and I was told that it was not integrable.

I was very surprised. Is there really no way to find the integral of $e^{-x^2}$? Graphing $e^{-x^2}$, it appears as though it should be.

A Wikipedia page on Gaussian Functions states that

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

This is from -infinity to infinity. If the function can be integrated within these bounds, I'm unsure why it can't be integrated with respect to $(a, b)$.

Is there really no way to find the integral of $e^{-x^2}$, or are the methods to finding it found in branches higher than second semester calculus?

Zolani13
  • 1,761
  • 8
    There is no antiderivative written in elementary functions (imagine the roots for a polynomial of degree, e.g., five, for which there is no formula). – Artem Jun 07 '12 at 05:11
  • 14
    There is no elementary function whose derivative is $e^{-x^2}$. By elementary function we mean something obtained using arithmetical operations and composition from the standard functions we all know and love. But this is not a serious problem. A few important definite integrals involving $e^{-x^2}$ have pleasant closed form. – André Nicolas Jun 07 '12 at 05:12
  • 10
    Try reading this note of Brian Conrad's and the article by Rosenlicht referenced therein. – Dylan Moreland Jun 07 '12 at 05:20
  • 8
    Well, in someway it is no more surprising than stating that $\frac{1}{2}$ cannot be written as an integer. As noted by others, it is integrable, it is just that the collection of 'standard' functions is not rich enough to express the answer. – copper.hat Jun 07 '12 at 06:08
  • 27
    Unfortunately there are three or four different meanings being given to the word "integrable" here:

    (1) $f(x)$ is Riemann integrable on intervals $[a,b]$ (yes, every continuous function is)

    (2) $f(x)$ has an antiderivative that is an elementary function (no, it doesn't: the antiderivative $\sqrt{\pi}\ \text{erf}(x)/2$ is not an elementary function)

    (3) $\int_{-\infty}^\infty |f(x)|\ dx < \infty$ (yes, and this is the usual meaning of "integrable" in analysis)

    (4) $\int_{-\infty}^\infty f(x)\ dx$ can be expressed in "closed form" (yes, it is $\sqrt{\pi}$).

    – Robert Israel Jun 07 '12 at 06:54
  • Sure, just use polar coordinates. That's what Gauss did. – rotskoff Jun 07 '12 at 07:46
  • you can use a trick to say that it = I and find $I^{2}$ then square root it to find a form over any bound for the function – Faust Mar 13 '13 at 07:33
  • Try this link if you guys are still unable to solve it. –  Apr 09 '13 at 13:46
  • Hi Vivek, welcome to Math.SE. We prefer not to have answers that just consist of a link with no further explanation. Also, this video is about the definite integral $\int_{-\infty}^\infty e^{-x^2/2},dx$, which is not really what the question is about (the asker already knows about this case). – Nate Eldredge Apr 09 '13 at 14:15
  • the video is legitimate (its title is "Integral of exp(-x^2) | MIT 18.02SC Multivariable Calculus, Fall 2010"), but it would have been better if you explained in the answer what it is. – mau Apr 09 '13 at 14:17
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Amzoti Apr 09 '13 at 14:17
  • Integration does produce new kinds of functions. Consider $\ln x=\int_1^x (1/y);dy$ for $y>0$, which cannot be expressed in terms of arithmetic combinations, even allowing constant non-integer powers, of rational functions. – DanielWainfleet Jul 12 '16 at 03:18
  • I recently wondered why using a series representation cannot get $\sqrt{\pi}$, when its interval of convergence is infinity. – cgo Aug 19 '21 at 04:51

2 Answers2

88

To build on kee wen's answer and provide more readability, here is an analytic method of obtaining a definite integral for the Gaussian function over the entire real line:

Let $I=\int_{-\infty}^\infty e^{-x^2} dx$.

Then, $$\begin{align} I^2 &= \left(\int_{-\infty}^\infty e^{-x^2} dx\right) \times \left(\int_{-\infty}^{\infty} e^{-y^2}dy\right) \\ &=\int_{-\infty}^\infty\left(\int_{-\infty}^\infty e^{-(x^2+y^2)} dx\right)dy \\ \end{align}$$

Next we change to polar form: $x^2+y^2=r^2$, $dx\,dy=dA=r\,d\theta\,dr$. Therefore

$$\begin{align} I^2 &= \iint e^{-(r^2)}r\,d\theta\,dr \\ &=\int_0^{2\pi}\left(\int_0^\infty re^{-r^2}dr\right)d\theta \\ &=2\pi\int_0^\infty re^{-r^2}dr \end{align}$$

Next, let's change variables so that $u=r^2$, $du=2r\,dr$. Therefore, $$\begin{align} 2I^2 &=2\pi\int_{r=0}^\infty 2re^{-r^2}dr \\ &= 2\pi \int_{u=0}^\infty e^{-u} du \\ &= 2\pi \left(-e^{-\infty}+e^0\right) \\ &= 2\pi \left(-0+1\right) \\ &= 2\pi \end{align}$$

Therefore, $I=\sqrt{\pi}$.

Just bear in mind that this is simpler than obtaining a definite integral of the Gaussian over some interval (a,b), and we still cannot obtain an antiderivative for the Gaussian expressible in terms of elementary functions.

Daniel Fischer
  • 206,697
Anthony
  • 1,025
  • If $e^{-x^2}$ is the area under the curve then $I^2$ should have units of $area^{2}$. But \begin{align} I^2 &= \iint e^{-(r^2)}r,d\theta,dr \ \end{align} has units of volume. How is it possible? – user599310 Jan 24 '20 at 16:00
  • 1
    @user599310 The units of $I^2$ are indeed units of $area^2$, but so too are the units of $\iint e^{-(r^2)}r,d\theta,dr$ in $area^2$.

    First note that $dA = r,d\theta,dr = dx,dy$, all of which are in units of $area$. Second note that $e^{-r^2}$ is equivalent to $e^{-x^2}e^{-y^2}$. In words, the base shift that we performed from $dx,dy$ to $r,d\theta,dr$ changes us from measuring the function in terms of two lengths, to measuring it in terms of chunks of areas. Hence why $e^{-r^2}$ is a function that returns areas, where $e^{-x^2}$ returns lengths.

    – Gerald Feb 06 '20 at 19:04
  • @CopaceticMan What I don't understand is if we plot the function $f(x,y)=e^{-(x^2+y^2)}$ then shouldn't the integral give us back the volume under the surface? – user599310 Feb 07 '20 at 16:20
  • 1
    @user599310, I am going to attempt some pseudo math to show it:

    $$ I^2 = \int e^-x^2 dx \times \int e^-x^2 dx = Area \times Area = Area^2$$

    We can replace one x, with a dummy variable, move the dummy copy into the first integral to get a double integral.

    $$ I^2 = \int \int e^{-x^2-y^2} dA $$

    In context, the integrand a function that returns two Area, as it is the product of two functions which return a distance, specifically the height above one axis. So $fdA$ is still in terms of $area^2$. You are correct in your confusion, as the leap may not appear obvious, but it's valid.

    – Gerald Jun 16 '20 at 19:42
  • If stuck at the second equality, the integral regarding x is treated as a scalar for the integral regarding y. – Raoul Luqué Jul 17 '23 at 17:23
73

That function is integrable. As a matter of fact, any continuous function (on a compact interval) is Riemann integrable (it doesn't even actually have to be continuous, but continuity is enough to guarantee integrability on a compact interval). The antiderivative of $e^{-x^2}$ (up to a constant factor) is called the error function, and can't be written in terms of the simple functions you know from calculus, but that is all.

JLA
  • 6,442
  • 2
  • 24
  • 40