TITLE: Derivative of infinite sum
QUESTION [8 upvotes]: I was thinking about derivative of infinite sum of functions, i.e.
$$f(x) = \sum_{i = 0}^\infty g_i(x)$$
$g(x)$ is continuous in domain of $f$
Because if $(f+g)'(x) = f'(x) + g'(x)$ then $\left(\sum\limits_{i = 0}^{\infty} g_i(x)\right)' = \sum\limits_{i = 0}^{\infty} g_i'(x)$ isn't it?

REPLY [10 votes]: First I assume you mean $g_i$ instead of $g$, and you have to suppose at least that the $g_i$ are all differentiable (more than just continuous).
Even then this is in general false. One common case where it is true is when you assume uniform convergence of $\sum g_i^{'}$ and at least one point of convergence for $\sum g_i$.
A counter example under your hypothesis :
take $g_i^{'}(x) = \cos(i \pi x)/i^2$. then $\sum g_i$ converges since it converges normally ($\sum \frac{1}{i^2}< \infty$) but $\sum g_i^{'}$ diverges at 0 (since $\sum \frac{1}{i} = \infty$).