# 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.

$$\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?

-
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 7 '12 at 5:11
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 7 '12 at 5:12
Try reading this note of Brian Conrad's and the article by Rosenlicht referenced therein. – Dylan Moreland Jun 7 '12 at 5:20
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 7 '12 at 6:08
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 7 '12 at 6:54

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.

-
But the evaluation of the integral over the whole real line is relatively easy! – Lubin Jun 7 '12 at 6:33
Easy for Lord Kelvin. – copper.hat Jun 7 '12 at 6:41
You probably mean that any continuous function is Riemann integrable on a compact interval. – T. Eskin Mar 13 '13 at 7:25
How to show that the function is non-elementary? I cannot remember seeing a proof of that. – M.B. Aug 10 '13 at 16:32
@M.B.: see for example M.P. Wiener's text here. – Raymond Manzoni Aug 10 '13 at 16:44

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.

-

In my opinion $\int e^{-x^2}$ dx is quite integrable, but requires a bit of insight on calculus. First re-write the integral in triangular form.

$$\int e^{-x^2} dx = {\frac{2^0x}{(1)e^{x^2}}+\int {\frac{2^1x^2}{(1)e^{x^2}}}}$$

You can verify the equation by taking the derivative of both side of the equation. Next use Integration by parts on the right-hand integral consecutively, each equation below can be verify to be correct by taking the derivative :

$$\int 2x^2e^{-x^2}= {\frac{2x^3}{(3*1)e^{x^2}}+\int {\frac{2^2x^4}{(3*1)e^{x^2}}}}$$

$$\int {\frac{2^2x^4}{3e^{x^2}}}= {\frac{2^2x^5}{(5*3*1)e^{x^2}}+\int {\frac{2^3x^6}{(5*3*1)e^{x^2}}}}$$

$$\int {\frac{2^3x^4}{3e^{x^2}}}= {\frac{2^3x^7}{(7*5*3*1)e^{x^2}}+\int {\frac{2^4x^8}{(7*5*3*1)e^{x^2}}}}$$

This process can be repeated forever. However, for now realize that a pattern emerges. The pattern is

$$\int e^{-x^2} dx=e^{-x^2}\sum_{n=0}\frac{(2^n)x^{2n+1}}{{(2n+1)!!}}$$

Well that is it. You may apply limits of integrations to both side of the equation. And then there are teachers...and they set boundaries.

-

$$\int_a^b e^{-x^2} dx = \int_a^b e^{-y^2} dy$$ Let \begin{align}I &=\int_{-\infty}^{\infty} e^{-x^2} dx\\ I^2&= \int_{-\infty}^{\infty} e^{-x^2} dx \int_{-\infty}^{\infty} e^{-y^2} dy\\ \implies I^2 &= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-(x^2+y^2)} dxdy\\ \end{align} change to polar form: $$x^2+y^2=r^2$$ you get $$I^2= \int \int e^-{r^2}dA$$ (as $$dydx = dA$$, A=area)

So while you observe from the Polar graph, $dA = rd{\theta}dr$ as $d{\theta}\to 0$ (definition of integration) Hence, $$I^2=\int_0^{2\pi}\int_0^{\infty} re^{-r^2}d{\theta}dr$$

By manipulation: $$-2I^2=\int_(2pi,0)Int(infinity,0) (-2r)e^{-r^2}d{\theta}dr$$ where $-2r$ is the derivative of $-r^2$.

\begin{align} &I^2 =[\int_{2\pi}^0 \int_0^{\infty} (-2r)e^{-r^2}d\theta dr]\\ \implies& I^2 =(-\pi)x[e^{-r^2},infinity,0] \end{align} do the math. $$\implies I=\sqrt{\pi}$$

You're welcome, Kee Wen Feel free to contact me if you don't understand anything here

-