Find a power series expansion for E(z) If a function $E(z)$ is defined on $\mathbb{C}$ by
\begin{equation} E(z) = \int_0^z e^{-w^2} dw \end{equation}
find a power series expansion for $E(z)$ about $0$. 
I think I should integrate the thing and then apply the power series expansion of $e^z$ to $-w^2$. Can anyone help?
Thanks
 A: Do the power series expansion first, and then integrate term by term. From the usual power series for $e^t$, which converges absolutely to $e^t$ everywhere, we have
$$e^{-w^2}=1-w^2+\frac{w^4}{2!}-\frac{w^6}{3!}+\cdots.$$
Integrate term by term from $0$ to $z$. We get
$$z-\frac{z^3}{3}+\frac{z^5}{5\cdot 2!}-\frac{z^7}{7\cdot 3!}+\cdots.$$
A: André Nicolas gave the simplest answer; moreover, it can apply to functions for which there is no antiderivative.
In the case you posted, if you know already that $$\begin{equation} E(z) = \int_0^z e^{-w^2} dw =\frac{\sqrt{\pi }}{2}  \text{erf}(z)\end{equation}$$ you can expand the result and obtain the same expansion.
But, let us suppose an much more difficult integrand and look at $$\begin{equation} E(z) = \int_0^z \sin(\sqrt w) e^{-w^2} dw\end{equation}$$ Integrating first would be impossible while expanding and integrating stay a very simple process.
The advantage of expanding the integrand is that you don't need to search for any antiderivative and the only thing you have to know is that $$\int_0^z w^n dw=\frac{z^{n+1}}{n+1}$$ (except for $n=-1$).
