# Functions which are continuous but non differentiable at a point except modulus function

I have noticed one thing during solving problems : That is, wherever I find a function which is continuous but non differentiable at a point, there has always been some |.|(modulus) function or [.](greatest integer function) in it.

I feel that's the only way one can have a sharp point in the graph of a function. Every other function tend to be smooth at all points.I am unable to manipulate them into a non differentiable continuous function by adding, multiplying, squaring or any other operations.

Is my assumption true ? If not, can you give an example of a function which is continuous but non differentiable at a point except modulus function or GIF function ?

• Try taking fractional roots. – David Mitra Oct 3 '15 at 10:49
• i.stack.imgur.com/saC8D.gif – ThePortakal Oct 3 '15 at 10:50
• $\sqrt{x}$ at $x=0$. – Michael Hoppe Oct 3 '15 at 10:51
• √x is actually √|x|. So, you are using |.| @MichaelHoppe – Shubham Oct 3 '15 at 10:54
• Indeed, most continuous functions are far worse than you could possibly imagine. Almost all of them are nowhere differentiable. We deal only with the nice ones because that's all our feeble minds can handle. – Matt Samuel Oct 3 '15 at 11:21

Consider the Thomae function; $f:[0,1]\to\mathbb R$ where $$f(x)=\begin{cases} \frac1q,& x\in\mathbb Q,\ x=\frac pq, \ p,q\in\mathbb Z, \ p\not\lvert q, \ q>0\\ 0,& x\notin\mathbb Q. \end{cases}$$ Then $f$ is continuous on $[0,1]\setminus\mathbb Q$ but not continuous on $[0,1]\cap\mathbb Q$. See this MSE question for a proof: Proving Thomae's function is nowhere differentiable.
For an even more pathological example, we have the Weierstrass function $w:\mathbb R\to\mathbb R$, defined by $$w(x) = \sum_{n=0}^\infty a^n\cos(b^n\pi x),$$ where $0<a<1$, $b$ is a positive odd integer, and $$ab > 1 + \frac32\pi.$$ This function is continuous everywhere but differentiable nowhere. The proof of this is not trivial; see this paper: https://pure.ltu.se/ws/files/30923977/LTU-EX-03320-SE.pdf
Consider $f(x)=max(x, x^2)$.It is continuous but not differentiable at x=1.