How does one calculate the indefinite integral? $$\int\frac1{\sigma\sqrt{2\pi}}\exp\left(-\frac{x^2}{2\sigma^2}\right)dx$$ Where $\sigma$ is some constant.
Work so far:
Integrating from exp as rest is constant. $$\begin{align} \int\exp\left(-\frac{x^2}{2\sigma^2}\right)dx&=\sum_{n=0}^\infty\frac{\left(-\frac{x^2}{2\sigma^2}\right)^n}{n!}=-\sum_{n=0}^\infty n!^{-1}2^{-1}\sigma^{-2n}\int x^{2n}dx\\ &=-\sum_{n=0}^\infty n!^{-1}\sigma^{-2n}x^{2n}x^{-1}\\ \end{align}$$
I pulled it apart, integrated it, now I cant put it back together.
In general, the integral
$$\int e^{-x^2} dx$$
cannot be expressed in terms of elementary functions. For a particular definite integral, we can define the error function,
$$\text{erf }{x} = \frac{2}{\sqrt{\pi}} \int_0^x e^{-x^2} dx$$
In order to introduce constants as in your function, a simple substitution and rescaling can be done.
On the other hand, if you want to compute the number
$$\int_{\mathbb{R}} e^{-x^2} dx$$
the usual trick is to square the integral, convert into polar coordinates, and evaluate.