Using one-sided derivatives when drawing graphs

Consider the following situation. A function f has a domain that consists of several intervals on which this function is continuous. One such interval I has a proper endpoint a. The continuous piece of graph therefore somehow ends at a and we want to know how, which we usually determine using an appropriate one-sided limit (if a is the left endpoint of I, we use the limit from the right, and vice versa). If this limit is infinite, we have an asymptote. If it does not exist, we have some non-standard problem.

The remaining case is the one that we are interested in here, namely when f has a proper one-sided limit. Assume for the moment that a is the left endpoint and we have a proper limit from the right there, assume moreover that we know that the function is increasing on I. Do we have enough information to draw the graph properly? Actually, it's not all that bad, depending whether you see a big difference between these three pictures.

If they are the same for your purposes, then you need not read on. However, if you want to have a really good picture of the function, you might want to know which version is the right one. In fact, it is remarkably easy to find out, you need to know the slope of the one-sided tangent line, in other words, the derivative from the right at a.

This brings us to perhaps the most interesting part of this note. A one-sided derivative is usually calculated as the limit of a derivative, see the section Derivative and limit in Theory - MVT. Unfortunately, that theorem requires one-sided continuity. What do we do when we do not have it?

Here's the good news. If we need that one-sided derivative just in order to draw a graph properly, we need not worry. We can always change the definition of f at a so that the resulting function is continuous at a from the right by adding a point to the graph (or moving it), then we find in a correct way the one-sided derivative using limit of derivative. What happens to this information when we move the added point away? The one-sided derivative of the modified function at a need not be the one-sided derivative of the original function f (it need not even have any one-sided derivative there at all, for instance if it is not defined there), but it still gives a very important information about an imaginary one-sided tangent line, in other words, it tells us which direction the graph should go. And that is exactly what we need to draw the picture.

Therefore the conclusion is as follows:

In a situation as described above, if a is the left endpoint of I, then we find the limit of f ′ at a from the right and learn the slope at a. If a is the right endpoint of I, then we find the limit of f ′ at a from the left and learn the slope at a.