What are (as easy as possible) examples of functions $f$ with the following properties?
- singular, i.e. continuous, non-constant, and differentiable almost everywhere with derivative zero,
- non locally constant, i.e. $\exists x$ with $f'(x)=0$ but $\forall U $neighborhood of $x$, $ \exists y∈U$ with $f(x)≠f(y)$.
Note that the above definition of non locally constant is unusual, but I don't know how to call this specific case.
Anyway, this is this case I ask for.
Take any singular function $g:[0,1]\to\mathbb{R}$ (e.g., the Cantor function) and extend $g$ to all of $\mathbb{R}$ by making it constant on $(-\infty,0]$ and $[1,\infty)$. Now pick an increasing sequence $(a_n)$ converging to some value $a\in\mathbb{R}$ and a sequence $(c_n)$ such that $\sum c_n$ converges, and consider the function $$f(x)=\sum_{n=0}^\infty c_ng\left(\frac{x-a_n}{a_{n+1}-a_n}\right).$$ This function looks like a bunch of scaled and shifted copies of $g$ on the intervals $[a_n,a_{n+1}]$, accumulating at the point $a$. If $c_n$ shrinks fast enough, then $f$ will be differentiable at $a$ with $f'(a)=0$, but $f$ is not constant on any neighborhood of $a$.