TITLE: Is there really no way to integrate $e^{-x^2}$?
QUESTION [61 upvotes]: 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?

REPLY [59 votes]: 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.