Find sequence of differentiable functions $f_n$ on $\mathbb{R}$ that converge uniformly, but $f'_n$ converges only pointwise Question:

Find a sequence of differentiable functions $f_n$ on $\mathbb{R}$ that converge uniformly to a differentiable function $f$, such that $f'_n$ converges pointwise but not uniformly to $f'$.

Attempt:
I have tried a number of possibilities, such as $f_n=x^n$ or $f_n=\frac{x^n}{n}$ but I don't know what the right approach is to construct the function. I am initially thinking that it's easiest to construct such a sequence of functions on the interval $[0,1]$ so that in the limit of $n$, part of the function goes to $0$ and the other part goes to $1$. However, this would make the resulting $f$ non-differentiable.

Let $f_n(x)=0$ if $|x|\ge 1/n.$ For $|x|<1/n$ let $f_n(x)=n^3(x^2-1/n^2)^2.$
$|f_n(x)|\le 1/n$ for all $x$ so $f_n$ converges uniformly to $f=0.$ So $f'=0.$
It is easy to confirm that $f'_n(x)$ exists when $x=\pm 1/n.$
$-1=\frac {f_n(1/n)-f_n(0)}{1/n-0}=f'_n(y_n)$ for some $y_n\in (0,1/n)$ so $f'_n$ does not converge uniformly to $0=f'.$
$f'_n(0)=0=f'(0)$ for every $n.$
If $x\ne 0$ then $\{n\in\Bbb N: f'_n(x)\ne f'(0)=0\}=\{n\in\Bbb N:n<1/|x|\}$ is a finite set.
