Differentiability and the Chain Rule

I am not sure how to proceed with this question:

Construct counterexamples for the following statements.

(a) If a function $g(x)$ is differentiable at $x=a$ and a function $f(x)$ is not differentiable at $g(a)$, then the function $(f\circ g)(x)$ is not differentiable at $x=a$.

(b)If a function $g(x)$ is not differentiable at $x=a$ and a function $f(x)$ is differentiable at $g(a)$, then the function $(f\circ g)(x)$ is not differentiable at $x=a$.

(c) If a function $g(x)$ is not differentiable at $x=a$ and a function $f(x)$ is not differentiable at $g(a)$, then the function $(f\circ g)(x)$ is not differentiable at $x=a$.

For (a) I have begun by outlining what I know:

• $g'(a)$ exists

• $f'(g(a))$ does not exist

• $(f\circ g)'(x)=f\;'(g(x))\cdot g'(x)$

Which leaves me stuck because then $(f\circ g)'(a)=f\;'(g(a))\cdot g'(a)$ and it is stated that $f(x)$ is not differentiable at $g(a)$.

-
You don’t know that $(f\circ g)'(x)=f\;'(g(x))\cdot g\;'(x)$: you just know that $(f\circ g)'(x)$ exists. Indeed, as you point out, you know that it can’t be $f\;'(g(x))\cdot g\;'(x)$, since the first factor is undefined. – Brian M. Scott Oct 27 '11 at 5:31
The functions in AMPerrine’s hint can also help you with (b). For (c) you might try to get $|g(x)|$ constant for some discontinuous $g(x)$. – Brian M. Scott Oct 27 '11 at 5:41
Thanks. I failed to think ahead when recommending we stay continuous. – AMPerrine Oct 27 '11 at 5:46

Functions which aren't differentiable due to discontinuity are bound to pose problems, so try something continuous like $f(x)=|x|$. Not differentiable at $x=0$, but what if $g$ is a constant function, say $g(x)=0$? Try thinking along that sort of line.