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.
 A: I think that$$f_n(x) = \dfrac{\sin(nx)}{n^2x}$$ will work. We have $f_n = \frac{1}{n}\textrm{sinc}(nx)$ and $\textrm{sinc}$ is uniformly bounded by $1$, so $f_n$ converges uniformly to zero.
Further, $$f_n' = \dfrac{\cos nx}{nx} - \dfrac{\sin nx}{n^2 x^2}$$ which should converge pointwise to zero, but $f_n'(\pi/n) = -1/\pi$ so the convergence can't be uniform. (These derivatives are all continuous too, with $f_n'(0) = 0$; you can convince yourself by writing out the Taylor series, $\cos y / y \sim 1/y - y/2 + O(y^3);$ $\sin y/y^2 \sim 1/y - y/6 + O(y^3)$ so the singularities "cancel"; alternately, you can use L'Hopital's rule).
(Here's a sketch that the derivatives converge pointwise to $0$: knowing that $f_n'(0) = 0$ for all $n$, just need to show that $$f_n' = \dfrac{1}{nx}(\cos nx - \textrm{sinc }nx)$$ can be made small for $x\neq 0$. The difference of cosine and sinc is bounded by $2$, and $\dfrac{1}{nx}$ can be made arbitrarily small for fixed $x \neq 0$.)
A: Take $f_{n}(x)=\sqrt{x^{2}+\frac{1}{n^{2}}}.$ Then for all $x\in 
%TCIMACRO{\U{211d} }%
%BeginExpansion
\mathbb{R}
%EndExpansion
,$ $$\lim_{n\rightarrow \infty }f_{n}(x)=\left\vert x\right\vert =f(x).$$ So $%
f_{n}$ converges pointwise to $f$ on $%
%TCIMACRO{\U{211d} }%
%BeginExpansion
\mathbb{R}
%EndExpansion
.$
Next, for any integer $n\geq 1,$ $$\left\vert f_{n}(x)-f(x)\right\vert =\frac{%
1}{n^{2}}\frac{1}{\sqrt{x^{2}+\frac{1}{n^{2}}}+\sqrt{x^{2}}}\leq \frac{1}{n}.
$$ Then $f_{n}$ is uniformly convergent to $f$ over $%
%TCIMACRO{\U{211d} }%
%BeginExpansion
\mathbb{R}
%EndExpansion
.$ Next, $f_{n}^{\prime }(x)=\frac{x}{\sqrt{x^{2}+\frac{1}{n^{2}}}}$
converges (pointwise) to $g(x)=\left\{ 0,\ if\ x=0,\ and\ x/\left\vert
x\right\vert \ if\ x\neq 0.\right. $ Note that $f_{n}^{\prime }$ is
continuous but not the limit $g$, so $f_{n}^{\prime }$ do not converges to $g
$ uniformly.
A: Let $f$ be a function which is everywhere zero except interval (0; 1) where it has some shape of a bell.
Now the sequence is $f_n(x) = \frac{f(n(x - n))}n$
As you can see, "the bell" moves along the x-axis, becoming lower and lower, so the sequence uniformly converges to zero. But considering the derivative, we see that
$f'_n(x) = f'(nx - n^2)$, which always has maximum value equal to $sup f'(x)$. However, the location where it's non-zero also moves along the x-axis. So, point-wise it converges to zero, but not uniformly.
I think it's not too hard to construct a function with a "bell". For example, take $sin(x)$ on span  [$-0.5\pi$; $1.5\pi$] and move it up.
A: 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.
