To change the function into a continuous function, we set
This function is now differentiable at 0, because: |
Since | x sin( 1 / x ) | < | x | for all x, we see that the limit of the difference quotient for c = 0 equals zero. Hence, f is differentiable at 0, and
The function is also differentiable everywhere else, since it is the product and composition of differentiable functions everywhere but for x = 0. Therefore, the function is differentiable on the whole real line.
Actually, this function is more interesting than it seems, because it is
Thus, it provides an example to show that even if derivatives exist, they do not necessarily have to be continuous. These statements are proved at a later point, but you might want to try it on your own already.