Find an example of 2 functions $f$ and $g$ and a point $a \in \mathbb{R}$, such that $(f \circ g)'(a)$ and $g'(a)$ exists, but $f'(g(a))$ does not exist, and also $f$ and $g$ must take on all values in $\mathbb{R}$.
Same problem as this one.
The solution I came up with was
$a = 0 ~~~~~~~~ f(x) = \begin{cases} x: & x \geq0 \\ 2x: & x \leq 0 \end{cases} \Bigr\} ~~~~~~~~ g(x) = x^3$
That's fine, but now I'm trying to find an example where $g'(a) \neq 0$, or alternatively prove $g'(a) \neq 0 \implies f'(g(a))$ exists.
I'm not even sure which conclusion is correct.
If you assume in addition that $g'$ is continuous then $g'(a)\ne0$, $f\circ g$ differentiable imply $f$ differentiable.
Because now $g$ is a local homeoomorphism; if $h$ is a local inverse for $g$ near $a$ then $f=(f\circ g)\circ h$ is differentiable, being the composition of two differentiable functions.