Series of functions $f_n (x)$ which are Differentiable and $\sum_{n=0}^\infty f_n (x) $ uniform convergence to non-differentiable function

I got the following question on my Home work:

show an example of Series of functions $f_n (x)$ which are differentiable and $\sum_{n=0}^\infty f_n (x) $ uniform convergence to non-differentiable function.

(translated from Hebrew)

My main problem is that even if i have $f_n (x)$ which i think is an example, I do not know to calculate $\sum_{n=0}^\infty f_n (x)$


Different approach to the case of $|x|:$ The functions $f_n(x) = \sqrt {x^2+1/n}, n=1,2,\dots$ are infinitely differentiable on $\mathbb R$ (in fact they are real-analytic on $\mathbb R.$) Note that

$$0\le f_n(x) - |x| = \sqrt {x^2+1/n}-|x| = \sqrt { x^2+1/n }-\sqrt {x^2} $$ $$=\frac{1/n}{ \sqrt {x^2+1/n}+\sqrt {x^2} } \le \frac{1/n}{1/\sqrt n} = \frac{1}{\sqrt n}.$$

This shows $f_n(x) \to |x|$ uniformly on all of $\mathbb R.$

Now every sequence can be turned into a series, so we have $f_1(x) + \sum_{n=1}^{\infty}(f_{n+1}(x)-f_n(x)) \to |x|$ uniformly on $\mathbb R.$ And of course $|x|$ is not differentiable at $0.$


You could take the trigonometric Fourier series of the absolute value $|\cdot| : [-\pi,\pi]\to\mathbb{R}$.

$$|x| = \frac{\pi}{2} - \frac{4}{\pi}\sum_{n=1}^\infty\frac{\cos(2n-1)x}{(2n-1)^2},\quad\forall x\in[-\pi,\pi]$$

$|\cdot|$ is continuous on $[-\pi,\pi]$ and not differentiable only at $0$ but left and right derivatives at $0$ exist (they are equal to $\pm 1$). This implies that its Fourier series converges uniformly to $|\cdot|$. However, $|\cdot|$ is not differentiable at $0$.


There's a sequence of polynomials $p_n(x)$ converging uniformly to $|x|$ on $[-1,1]$. Taking $f_0=p_0$ and $f_{n+1}=p_{n+1}-p_n$ will give you what you seek.

The binomial theorem gives $$(1-y)^{1/2}=1-\sum_{k=1}^\infty a_k y^k$$ for some $a_k$ which one can write out, but I won't, and are always positive. It's important here to check this is valid on all the interval $[0,1]$. Set $$p_n(x)=1-\sum_{k=1}^n a_k(1-x^2)^k.$$ Then $p_n(x)\to\sqrt{1-(1-x^2)}=|x|$ on $[-1,1]$. The sequence $p_n(x)$ is decreasing, so by Dini's theorem, the convergence is uniform.