Give an example of a continuous strictly increasing function g:R->R which is... Give an example of a continuous strictly increasing function $g\colon \Bbb R\to \Bbb R$ which is differentiable at every $x$ not belonging to $\Bbb Z$ and not differentiable at any $x$ belonging to $\Bbb Z$.
Could I use a piecewise function to show this?
 A: Here is a way to construct such a function.


*

*Draw $f(x)=x^3+x^2+x$.

*At every integer $n$, draw $g(x)$ between $n$ and $n+1$ as the secant from $f(n)$ to $f(n+1)$.

*$g(x)$ is now continuous, differentiable at every point between the integers, but not at the integers.


EDIT v2 I've edited to use a strictly increasing function.

Here is a graphical depiction of the concept:

A: Yes, a piecewise defined function will do it. We first do it for $x\ge 0$.
For $0\le x\lt 1$, let $f(x)=x$. For $1\le x\lt 2$, let $f(x)=1+2x$. For $2\le x\lt 3$, let $f(x)=3+4x$. For $3\le x\lt 4$, let $f(x)=7+8x$, and so on.
So for $0\le n\le x\lt n+1$, let $f(x)=2^n-1+2^n x$. 
Verification that we do not have differentiability at the integers is reasonably straightforward, the slopes do not match. 
For the part with $x\lt 0$, use $-(f(|x|+1)+1$. 
A: Floor function can help us to get a closed form of such function.
We can start with $y=|x-\lfloor x+\frac 12 \rfloor|$

Then we stretch it to get the in-differentiable points on integer $x$s, getting $y=|\frac x2-\lfloor \frac x2+\frac 12 \rfloor|$ 

Now we add it to a suitable strictly increasing function to get what we want(it should increase more than $1/2$ between two consecutive integers), for example $y=|\frac x2-\lfloor \frac x2+\frac 12 \rfloor|+2x+1$ 

A: Define the function f(x) = x^3 for x integer, and then use linear interpolation for x in between integers. This is similar to the answer provided by "oks".
