Suppose $f,g:[a,b]\to \mathbb R$.
Provide a counterexample: If $f=g^2$ and $f$ is differentiable on $[a,b]$, then $g$ is differentiable on $(a,b)$.
I've been attempting to find a counterexample by picking a $g$ and then squaring it to get $f$. Whatever I try and let $g$ be, I can't find one that isn't also differentiable on the same interval. Any suggestions as to what type of functions I should be looking at would be great.
Hint: We can let simply $f:=1$ then the values of $g$ can be either $+1$ or $-1$, it neither has to be continuous.