The function g is clearly differentiable at all points of J other than 0. In fact, by the usual quotient rule for differentiation.

To see what happens at x=0, you have to find the derivative from first principles: . Using the definitions of g(x) when x≠0 and when x=0, you see that this is equal to . Thus g is differentiable at 0 (with derivative ).

Finally, to show that g is of class , you must check that the derivative g' is continuous at 0. To do this, evaluate (using l'Hôpital's rule) and verify that it is equal to .