Q: pointwise convergence in relation to derivatives 2 Assume that
$f_n(x)\to f(x)$ pointwise at any $x\in\mathbb{R}$
$f_n,f$ are all differentiable at any $x\in\mathbb{R}$
$f_n'(x)\to g(x)$ pointwise at any $x\in\mathbb{R}$ and $g$ is differentiable at any $x\in\mathbb{R}$
Does it imply $g(x)=f'(x)$ for all $x$ ?
Without $g$ being differentiable, it was in my previous question pointwise convergence in relation to derivatives
and turned out to be easy and quite standard. This one is probably harder. I have searched 3 books and over 100 posts on convergence, but without finding a suitable counterexample.

A: Define the triangle function $T$ by  $T(x):=\min\{x,2-x\}$ for $x \in[0,2]$, and $T(x):=0$ for $x \notin [0,2]$.  Let
$$g_n(x):=\sum_{k=-\infty}^{\infty} n \, T(n^2(x-k/n))\,,$$
and $$f_n(x):=\int_0^x g_n(t) \, dt \,,
$$
for all real $x$, so $f'_n =g_n$ identically. Note the graph of $g_n$ consists of   equally spaced  triangles, each shifted by  $1/n$ from the preceding one,  with base $2/n^2$, height $n$,   and area $1/n$ each. Then $f'_n=g_n$ tends pointwise to $g=0$,
yet for each $n$,  the nondecreasing  function $f_n$ satisfies
$f_n(k/n)=k/n$ for all integer $k$, so $f_n(x)$ tends uniformly to $f(x)=x$.
Remarks

*

*Actually, replacing $T(\cdot)$ by a $C^\infty$ bump function of integral 1 supported in $[0,2]$, one can make all $f_n$ be $C^\infty$ functions. https://en.wikipedia.org/wiki/Bump_function


*If  $\sup_n |f_n'|$ is bounded (or integrable on compact sets) then  $g=f'$.
