# Is the composition of two nowhere differentiable functions still nowhere differentiable?

Let $$f,g:\mathbb R\to\mathbb R$$ be two continuous but nowhere differentiable functions. By the Denjoy–Young–Saks theorem for almost every point $$x_0\in\mathbb R$$ one has $$\limsup\limits_{x\to x_0}\frac{|f(x)-f(x_0)|}{|x-x_0|}=+\infty.$$

Is $$f\circ g$$ still nowhere differentiable? It seems possible that the high frequency parts of $$g$$ lie in the low frequency parts of $$f$$, which might lead to a cancellation of the oscillation.

I am trying to prove non-differentiability through the following: Fix $$x_0$$ and consider $$I_{f,x_0}^k=\{x\in\mathbb R:|f(x)-f(x_0)|\ge k|x-x_0|\},$$ the set of points outside a double-sided cone with slope $$k$$. Is it true that $$\lim\limits_{\delta\to0}|I_{f,x_0}^k\cap[x_0-\delta,x_0+\delta]|/(2\delta)=1?$$ If yes, then we know that “most” of the points near $$x_0$$ have values relatively far away from $$f(x_0)$$, and so there will not be much frequency cancellation.

• A comment on your idea for a proof. The graph of $f$ is not purely unrectifiable. More precisely, a substantial part of the graph is contained in the graph of a $1$-Lipschitz function defined on the quadrant bisector. I would expect that therefore (using Lebesgue differentiation) there exists a set $E\subset\mathbb{R}$ of positive measure and $k>0$ such that for all $x_0\in E$ the set $\mathbb{R}\setminus I^k_{f,x_0}$ has positive lower density at $x_0$. So to me it seems that your idea might not work. – Manfred Sauter May 27 '19 at 16:02

The composition may have points of differentiability.

Let $$f_0(x)=x$$ for $$x\geq 0$$ and $$f_0(x)=2x$$ for $$x<0$$. Let $$g_0(x)=2x$$ for $$x\geq 0$$ and $$g_0(x)=x$$ for $$x<0$$. Then none of them is differentiable at $$0$$, but $$f_0\circ g_0=2x$$ is differentiable everywhere.

Let $$h$$ be a function that is nowhere differenitable, except at $$0$$ where it is very rapidly decaying. E. g. I can take $$h(x)=e^{-\frac{1}{x^2}}B_{|x|}$$, where $$B_t$$ is a sample of Brownian motion.

Now just take $$f=f_0+h$$ and $$g=g_0+h$$.

The composition can be differentiable.

Example: Let $$f(x):=1$$ for rational $$x$$ and $$f(x):=0$$ for irrational $$x$$. Then $$f$$ is nowhere differentiable. Let $$g:=f$$. Then $$f\circ g(x)=1$$ for all $$x$$, thus $$f\circ g$$ is differentiable everywhere.

• Thank you, but sorry I forgot to mention the continuity assumption. – yaoliding May 26 '19 at 8:56