The Chain Rule assumes that both $f$ and $g$ are differentiable at the relevant points.
In this case, we have $(f \circ g)(x) = x^2$ and $(g \circ f)(x) = x^2$. We can see that both of these functions are differentiable at $x=0$, as their derivatives are $2x$,
Show more…