Smooth sequence of functions converging pointwise to a smooth function and limit of derivatives In the wikipedia page of uniform convergence, it says that given a sequence $\{ f_n \}$ of differentiable real functions (say, over the reals) with the property that it converges pointwise to some function $f$, the limit of $\{f_{n}' \}$ need not be equal to $f'$.
It then gives an example where $\{ f_n \} $ converges uniformly to a differentiable $f$, but $\{f_n '\}$ does not converge even pointwise.
My question is, what if we assume that each $f_n$ and their limit $f$ are, say, $C^\infty$, and $\{ f_n '\}$ converges pointwise to some $C^\infty$ function $g$ as well. Is it now enough to show that $f' = g$? Or do we further need to assume uniform convergence? Is there a classic counterexample to this question as well?
 A: Let $f_1,f_2,\ldots$ be a sequence of $C^\infty$ functions from
${\mathbb R}$ to ${\mathbb R}$.
Let $f,g$ be two more $C^\infty$ functions from ${\mathbb R}$ to ${\mathbb R}$.
Assume, as $i\to\infty$, $f_i\to f$ pointwise.
Assume, as $i\to\infty$, $f'_i\to g$ pointwise.
We wish to show: $f'=g$.
Define $G:{\mathbb R}\to{\mathbb R}$ by:
$\forall x\in{\mathbb R}$, $G(x)=\int_0^x\,g$.
Then $G$ is $C^\infty$ and $G'=g$.
For all integers $i>0$, let $\phi_i:=f_i-G$; then $\phi_i$ is $C^\infty$.
Also, $\forall$integers $i>0$, we have: $\phi'_i=f'_i-g$.
Let $\phi:=f-G$; then $\phi$ is $C^\infty$.
Also, we have: $\phi'=f'-g$.
Also, as $i\to\infty$, $\phi_i\to\phi$ pointwise.
Also, $\phi'_i\to0$ pointwise.
It suffices to show: $\phi'=0$.
Given $a\in{\mathbb R}$, we wish to show that $\phi'(a)=0$.
Assume $\phi'(a)\ne0$. Want: Contradiction.
Let $\varepsilon:=|\phi'(a)|/2$.
Then $|\phi'(a)|>\varepsilon>0$.
By continuity of $\phi'$, choose $\delta>0$ s.t.,
on $[a-\delta,a+\delta]$, $|\phi'|>\varepsilon$.
Let $K:=[a-\delta,a+\delta]$.
Then, on $K$, $|\phi'|>\varepsilon$.
For all integers $n>0$, let
$$C_n:=\{x\in K~\hbox{s.t.}~\forall\hbox{integers }i\ge
n,\,|\phi'_i(x)|\le\varepsilon\};$$
then $C_n$ is closed in ${\mathbb R}$ and $C_n\subseteq K$.
Because $\phi'_i\to0$ pointwise, we get: $C_1\cup C_2\cup C_3\cup\cdots=K$.
By the Baire Category Theorem, choose an integer $n>0$ s.t.: the
interior in ${\mathbb R}$ of $C_n$ is nonempty.
Choose $q$ in the interior in ${\mathbb R}$ of $C_n$.
Choose $\rho>0$ s.t. $[q-\rho,q+\rho]\subseteq C_n$.
Let $J:=[q-\rho,q+\rho]$. Then $J\subseteq C_n$.
By definition of $C_n$, $\forall$integers $i\ge n$, we have: on $C_n$,
$|\phi'_i|\le\varepsilon$.
Therefore, $\forall$integers $i\ge n$, we have: on $J$,
$|\phi'_i|\le\varepsilon$.
Then, by the Mean Value Theorem, $\forall$integers $i\ge n$,
$\forall$distinct $a,b\in J$,
$$\left|\frac{\phi_i(b)-\phi_i(a)}{b-a}\right|\le\varepsilon.$$
Taking the limit, as $i\to\infty$, we get:
$\forall$distinct $a,b\in J$,
$$\left|\frac{\phi(b)-\phi(a)}{b-a}\right|\le\varepsilon.$$
So, since $q\in J$, we get:
$\forall b\in J\backslash\{q\}$,
$$\left|\frac{\phi(b)-\phi(q)}{b-q}\right|\le\varepsilon.$$
Letting $b\to q$, we get: $|\phi'(q)|\le\varepsilon$.
Recall: on $K$, $|\phi'|>\varepsilon$.
So, since $q\in J\subseteq C_n\subseteq K$,
we get $|\phi'(q)|>\varepsilon$.
Contradiction. QED
