Integral of $e^{-x^{2}}$ and the error function How to integrate $e^{-x^{2}}$?  
When I used geogebra I got the answer as $\frac{1}{2}\sqrt{\pi}\operatorname{erf}(x)$. What is $\operatorname{erf}(x)$ ?
How to arrive at this answer?
 A: This integral cannot be expressed in terms of elementary functions such as polynomials, trigonometric, exponentials or logarithms. It is however a very important integral so mathematicians made up an answer and gave it a new name - $\operatorname{erf}(x)$. The definition of $\operatorname{erf}(x)$ is hence based on the integral. It full name is the Error Function. It is often encountered in statistics/probability and the solving of differential equations.
A: The integral of $e^{-x^2}$, or $\int e^{-x^2}dx$, cannot be expressed using elementary functions. So, we make new functions to express it.
$\operatorname{erf} (x) $ is the error function, defined as $\operatorname{erf}(z)= \frac {2}{\sqrt{\pi}} \int_0^z e^{-t^2} dt$
If $E(x)=\int e^{-x^2}dx$,
$$\operatorname{erf}(x)= \frac {2}{\sqrt{\pi}} (E(x)-E(0)) \\
E(x)=\int e^{-x^2}dx=\frac{\sqrt{\pi}}{2} \operatorname{erf}(x)+E(0) = \frac{\sqrt{\pi}}{2} \operatorname{erf}(x)+ C$$
(The value of $E(0)$ is arbitrary, so it can be rewritten as a constant, $C$). Hope this helps.
A: You cannot find the antiderivative of $e^{-x^2}$ in terms of elementary functions, but interestingly you can calculate the integral over $\mathbb{R}$. The standard trick to computing $$I=\int_{-\infty}^{\infty} e^{-x^2} dx$$ is as follows. Write 
$$I^2 = \int_{-\infty}^{\infty} e^{-x^2} dx \int_{-\infty}^{\infty} e^{-y^2} dy = \int_{\mathbb{R}^2} e^{-x^2 -y^2} dx dy. $$ Now convert to polar coordinates, $x = r \cos \theta$, $y = r \sin \theta$. Then $dxdy$ becomes $$dx dy = \left|\frac{\partial(x,y)}{\partial(r, \theta)}\right| dr d\theta = r dr d\theta.$$ So $$I^2 = \int_{\mathbb{R}^2}r e^{-r^2} dr d\theta = 2\pi \int_0^{\infty} r e^{-r^2} dr = 2\pi \left[ -\frac{1}{2}e^{-r^2}\right]^{\infty}_0 = \pi.$$ So $I = \sqrt{\pi}.$
