Consider the function defined by
Find values for the constants and such that the derivative exists.
First, let’s assume otherwise everywhere and the values of and are arbitrary (since the value of does not depend on them).
Then, exists implies the one-sided limits exist and are equal:
Using the definition of we plug in the expressions for when approaches from the left and from the right,
The limit on the left exists if and only if (otherwise the limit diverges to infinity has ). In this case the limit is 0, and we have two equations,
Using the equation on the right we have, . Then plugging this value into the equation on the left we obtain
Finally, using this in our expression we solve for in terms of alone, . Therefore,