Inspired by a bad approach to a homework problem, I'm wondering for which which continuous functions $f:\mathbb R\to\mathbb R$ does there exist a discontinuous function $g$ such that $f=g\circ g$.
Maybe I'm missing something immediate, but I'd like to show that there exists no continuous functions $f$ satisfying this.
Just kidding, it's apparently immediate.
An easy example is $f(x) = x$ and $$ g(x) = \begin{cases} x & \text{for } x \neq \pm 1 \\ -x & \text{for } x = \pm 1 \end{cases}. $$