# Taylor series integration

I am having trouble with the following question:

Integrate the Taylor series

$$e^{(-t^2)} = \sum^\infty_{n=0} \frac{(-t^2)^n}{n!}$$ term-by-term to obtain the Taylor series for erf (error function) about a = 0.

Now I have integrated the first few terms and can see that the series converges, but I do not see how to turn it into another taylor series. $$\int\sum^\infty_{n=0} \frac{(-t^2)^n}{n!} dt =C+t - \frac{t^3}{3}+\frac{t^5}{10}-\frac{t^7}{42} +...$$

Can any one give me a hand with this?

$$\int \sum_{n=0}^\infty \frac{(-t^2)^n}{n!} dt$$ $$= \sum_{n=0}^\infty \int \frac{(-t^2)^n}{n!} dt$$ $$= \sum_{n=0}^\infty \int \frac{(-1)^n}{n!} t^{2n}dt$$ $$= \sum_{n=0}^\infty \left(\frac{(-1)^n}{n!} \int t^{2n}dt\right)$$ $$= \sum_{n=0}^\infty \left(\frac{(-1)^n}{n!} \frac{t^{2n+1}}{2n+1}\right)$$