TITLE: Why can't you find all antiderivatives by integrating a power series?
QUESTION [5 upvotes]: if  
$f(x) = \sum\limits^{\infty}_{n=0}\frac{f^{(n)}(0)}{n!}x^n$  
why can't you do the following to find a general solution  
$F(x) \equiv \int f(x)dx$  
$F(x) = \int (\sum\limits^{\infty}_{n=0}\frac{f^{(n)}(0)}{n!}x^n) dx = \sum\limits^{\infty}_{n=0}\frac{f^{(n)}(0)}{n!}(\int x^n dx) = \sum\limits^{\infty}_{n=0}\frac{f^{(n)}(0)}{n!}(\frac{x^{n+1}}{n+1}) = 
\sum\limits^{\infty}_{n=0}\frac{f^{(n)}(0)}{(n+1)!}x^{n+1}$  
I was wondering about this because I tried this approach to finding the antiderivative $\int e^{x^2} dx$

REPLY [3 votes]: First of all, $\int f(x) dx$ is a collections of functions, not a function.
You should rather define $F(x) = \int_{t = 0}^x f(t) dt$.
Then, you should be careful about interchanging $\int$ and $\sum_{n=0}^\infty$.
This is true for finite sums, but not always for infinite series of integral (look e.g. Fatou-Lebesgue theorem) — it is the same as interchanging a limit for integration.
Finally, you have to be able to calculate the infinite series you end up with.