For the function to be differentiable, its derivative has to exist everywhere, which means the derivative itself must be continuous. Differentiating gives

The question mark is a placeholder, and if the derivative is to be continuous, then the question mark will have the same value as the limit as

from either side.


So the derivative will be continuous as long as

For the function to be differentiable everywhere, we need to require that

is itself continuous, which means the following limits should be the same:



So, the function should be

with derivative
