Use a known power series expansion to find the power series representation of the integral function $g(x) =\int_0^x e^{-t^2}dt$ centered at $a=0$
My approach
Note that $g'(x) = e^{-x^2}$. We also know the Maclaurin Series for $e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!}$.
Then, $$g'(x)=e^{-x^2} = \sum_{n=0}^{\infty} \frac{(-x^2)^n}{n!}$$ $$g(x) = \int \bigg[\sum_{n=0}^{\infty} \frac{(-x^2)^n}{n!}\bigg] dx$$ $$g(x) = \sum_{n=0}^{\infty} \frac{(-1)^n}{n!} \int x^{2n}dx $$ $$g(x) = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{n!(2n+1)} +K, \text{ where $K$ is unknown}$$
Consider $x=0$, we figured out that $g(0) = 0 +K = 0$, hence $K=0$. Hence $$g(x) = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{n!(2n+1)}$$
Is this right? I cannot differentiate between power series and Maclaurin series or stuffs like that. Can anybody clarify on this too?