Let $f:\mathbb R\to\mathbb R$ be continuous and monotonic and assume that $f\circ f$ is analytic. Is $f$ necessarily continuously differentiable/smooth/analytic?
My question arose from this: Inspired by the thread a continuous function satisfying $f(f(f(x)))=-x$ other than $f(x)=-x$ I wondered if the only continuous solution to $f(f(f(x)))=-8x$ is the trivial solution $f(x)=-2x$. I can prove this if I assume that $f$ is continuously differentiable everywhere, but is that condition necessary?