Example of a differentiable $S(x)=\sum f_n(x)$ such that $S'(x)\ne\sum f_n'(x)$ for (at least almost) all x Let $S(x)=\sum f_n(x)$ be pointwise convergent and differentiable on some $A\subseteq\Bbb R$, with all the $f_n$ differentiable on $A$. In the comments to this answer a user asked for an $S$ such that $\sum f_n'$ is pointwise convergent but not identical to $S'$. Out of curiosity I gave it a try.
For such an $S$, I thought it's convenient to start from $T=\sum f_n'$, assuming the $f_n'$ are integrable and $T$ does not converge uniformly, in order to integrate the $f_n'$ on a convenient interval and take the sum of these resulting functions as $S$. 
Soon enough I came up with $$T(x)=\sum_{n=1}^\infty f_n'(x)=\sum_{n=1}^\infty-x(1-x)^n=\begin{cases}x-1 &x\in(0,1] \\ 0&x=0.\end{cases} $$which suggests$$S(x)=\sum_{n=1}^\infty\frac{(1-x)^{n+1}(nx+x+1)}{(n+1)(n+2)}.$$ On $[0,1]$ one has $S(x)=\frac12(x-1)^2$ and thus $S'(x)=x-1$. In particular $S'(0)=-1\ne T(0),$ so $S'\ne T$. 
I briefly tried to find a much more pathological case, but it wasn't apparent to me.
Question: Defining $S$ and $T$ as in the first paragraph, what is a specific $S$ such that $S'\ne T$ on the whole $A$, except maybe for countably many points?
 A: First thing to do I think is to switch from series of functions to sequneces of functions by
$$
g_n := \sum_{k=0}^n f_k,
$$
since it's equiavlent, but easier to deal with.
I define my $g_n$ on $[0,1]$ by saying that I want $g_n$ to be 
$$
g_n(x) = \left\{
  \begin{array}{lr}
    0 : &x \in [0,1]\setminus(\bigcup_{k=1}^{n-1} [\frac{k}{n}-\frac{1}{n^{3/2}},\frac{k}{n}+\frac{2}{n^{3/2}}])\\
    1 : &x=\frac{k}{n}, k=1,\ldots,n-1 \\
    -1 : &x=\frac{k}{n}+\frac{1}{n^{3/2}}, k=1,\ldots,n-1
  \end{array}
\right.
$$
and we fill the gaps by linear functions. So these are teeth, that stay the same height, but are thinner and thinner. Now if we integrate those $g_n$s, we get some small "bubbles" on the intervals $[\frac{k}{n}-\frac{1}{2n^{3/2}},\frac{k}{n}+\frac{2}{2n^{3/2}}]$ that converge uniformly to 0, but $g_n$'s obviously don't converge to zero.
The last point is to show that it actually fails to converge in almost every point. Take an irrational $x \in (0,1)$, by Dirichlet's approximation theorem we have that for infinitely many irreducible rationals
$$
\left|x-\frac{k}{n}\right| < \frac{1}{n^2}.
$$
Take such a rational, say $k/n$. Now we have
$$
g_n(x) = g_n\left(\frac{k}{n} + \left(x-\frac{k}{n}\right)\right) \approx 1 + n^{3/2}\left(x-\frac{k}{n}\right) < 1 + \frac{1}{n^{1/2}},
$$
so for infinitely many $n$'s $g_n(x)$ is arbitrarly close to 1. 
