Is there really no way to integrate $e^{-x^2}$?

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?


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.


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.