Problem when trying to find the following maclaurin series because of the integral $ f(x) = \int_0^{x} e^{-t^2} dt $? I'm trying to find the maclaurin series of:
$ f(x) = \int_0^{x} e^{-t^2} dt $
So far I've got:
$P_n(x) = \frac{f(0)}{0!} + \frac{f'(0)x}{1!} + \frac{f''(0)x^2}{2!} + ...+\frac{f^{(n)}(0)x^n}{n!}$
But I do not know how to find the value of $f(0)$
Could I solve this by finding the maclaurin series of $e^{-t^2}$ and then integrating? I think I probaly would have to do the same integral.
 A: This question came up in a past exam paper on my course which I've just struggled through, so I thought to share my attempt.
Given: $ f(x) = \int_0^{x} e^{-t^2} dt $
If we take $g(t) = e^t$ such that $g(-t^2) = e^{-t^2}$ and $f(t) = \int_0^{x} g(-t^2) dt$, we can find the power series of $g(t)$, then substitute in $-t^2$.
We can find that the power series of $g(t) = \sum_{n = 0}^\infty \frac{t^n}{n!} = 1 + \frac{t}{1!} + \frac{t^2}{2!} + \frac{t^3}{3!} + ...$. Then $g(-t^2) = 1 - \frac{t^2}{1} + \frac{t^4}{2!} - \frac{t^6}{3!} + \frac{t^8}{4!} - ...$ by substitution (bear in mind that this can also be expressed with a power series). 
We can now use $f(t) = \int_0^{x} g(-t^2) dt$ and use the fact that the power series can be integrated term by term to get $f(t) = x - \frac{x^3}{3 \cdot 1 !} + \frac{x^5}{5 \cdot 2!} - \frac{x^7}{7 \cdot 3!} + \frac{x^9}{9 \cdot 4!} - ...$ which can be expressed as the power/Maclaurin series $\sum_{n=0}^\infty \frac{(-1)^n \cdot x^{2n+1}}{(2n+1) \cdot n!}$.
A: $$
\int_{0}^x e^{-t^2} dt = \sum_{k=0}^\infty \frac{(-1)^k}{k!}\int_{0}^x t^{2k} dt = \sum_{k=0}^\infty \frac{(-1)^k}{k!}\frac{x^{2k+1}}{2k+1}
$$
A: Note that we have $f(0)=\int_0^0 e^{-t^2}\,dt=0$.  And from the Fundamental Theorem of Calculus, $f'(x)=e^{-x^2}$ so that $f'(0)=1$.
