5.1 Differentiable functions: definitions and basic examples
Definition of differentiability
Geometrically, differentiation concerns the gradient, or slope, of a graph of a function. This notion is easiest to define when the graph is just a straight line.
Let be the function for all . If we pick two distinct points, say and for and , then
is the vertical change of the function between and and is the horizontal change: see Figure 5.3. The gradient of is then defined as the ratio of the vertical change and the horizontal change:
Note that we get the same value no matter which values of and we choose. This is because the graph of is a straight line, so has constant slope everywhere.
If the graph of our function is curved, then the gradient will no longer be a constant value. In this case, when we talk about the gradient of at a point , what we really wish to describe is the gradient of the tangent line to the function at the point (if such a tangent line exists). But what really is a ‘tangent line’? How do we define it?
For fixed and , we can still consider the difference quotient
This corresponds to the gradient of the secant line passing through the points and on the graph of : see Figure 5.4.
In general, the secant line doesn’t look very much like a tangent line; indeed, this is the case in Figure 5.4, where we see the secant line is quite far from the tangent line. However, if is very small, then we hope that the secant line gives a reasonable approximation to a tangent line at . Moreover, as gets smaller and smaller, we can hope for a better and better approximation. This idea is illustrated in Figure 5.5. In this case, as gets smaller and smaller, the difference quotient (5.1) gives a better and better approximation to the slope or gradient of the function at . This is the intuition behind the definition of the derivative.
Let be an open interval.
-
1
A function is said to be differentiable at if
(5.2) (5.2)exists. The number is called the derivative of at .
-
2
We say is differentiable if it is differentiable at all points . In this case, we define the derivative of to be the function mapping to for all .
In the definition of the derivative, it is sometimes convenient to change variables, replacing with . In particular, we may equivalently write (5.2) as
By generalising the computation from Example 5.1, we can show that the definition of a derivative agrees with our usual notion of gradient or slope when the graph of the function is a straight line.
Let , and consider the linear function given by for all . Arguing from the definition, show that is differentiable and for all .
The motivation for the definition of a derivative relied on our intuition about tangent lines. However, so far we still have not given a precise definition of a ‘tangent line’. Now that we have a formal definition of a derivative, we can address this.
Let be an open interval and be differentiable at . We define the tangent line to the graph of at to be the line through with slope .
The next example illustrates the derivative in a case where the graph of the function is curved.
Consider the function given by for all . Then is differentiable and for all .
You are no doubt aware of this fact from earlier courses, but our goal here is to justify the value of the derivative by arguing from the definition. Reasoning in this way gives a rigorous foundation for why the various derivative formulæ you’ve encountered hold, exploiting the tools that we have built up so far in the course.
Fix and . By expanding out the square, we see that
Taking the limit as , we therefore see that
and so is differentiable at and , as required. ∎
It is equally important to identify functions which fail to be differentiable. The following functions are classic examples of functions which are continuous but are not differentiable.
The continuous function given by (shown as in Figure 5.1) is not differentiable at .
The one-sided limits of the difference quotient are given by
Since the one-sided limits do not agree, we know from Exercise 4.72 that does not exist. Hence, is not differentiable at . ∎
The continuous function given by (shown as in Figure 5.1) is not differentiable at .
For , the difference quotient is given by
For any , the right-hand expression is unbounded on the interval , and so does not exist by Exercise 4.48 ii). Hence, is not differentiable at . ∎
Show that the function given by (shown as in Figure 5.1) is not differentiable at 0.
There are different ways to denote derivatives, some of which you will likely have come across. For instance, it is common to use the notation
interchangeably. We shall primarily use in this course.
Further examples of differentiable functions
We shall consider some more sophisticated examples of differentiable functions and their derivatives. Many or all of these formulæ will be familiar to you, but as before the onus is on developing a rigorous understanding of why the formulæ hold by arguing from the definition. We want to get ‘under the hood’ and really understand how and why derivatives work! Our first example generalises Example 5.6.
For all , the function given by for all is differentiable. Moreover, for all .
Note that the case corresponds to Example 5.6; however, here we shall use a slightly different argument to that of Example 5.6, since it will later help us to study the exponential function.
Fix and with . We apply the binomial theorem to write
since in the sum, the term is and the term is . This rearranges to give
Here for the right-hand sum in (5.3) is interpreted as equal to . By the triangle inequality, the hypothesis and a second application of the binomial theorem,
Combining (5.3) and (5.4) we see that
Thus, we conclude from the squeeze theorem that
and so is differentiable at and , as required. ∎
We can use the ideas introduced in Example 5.11 to study the following very important example.
The function introduced in Definition 4.5 is differentiable with
Lemma 5.12 tells us that the function is its own derivative. As a consequence, plays a very special role in the theory of differentiation. We shall see many important consequences of this result in Section 5.7 below.
As in Example 5.11, for each let be given by for all . Then, given , let
so that corresponds to the th partial sum of the series for all . Fix and with and consider the difference quotient
notice that the sum on the right starts from since . On the other hand, by reindexing the sum we can write
Combining (5.6) and (5.7), we see that
Notice that the right-hand side involves the difference quotients for the monomials we studied in Example 5.11. So, we can apply some of the inequalities we proved in that example.
Using the triangle inequality and the bound (5.5) from Example 5.11, we obtain
Since the above inequality holds for all , we can take the limit as to deduce (by Exercise 2.46) that
As , the right-hand side converges to . Thus, by the squeeze theorem,
and so is differentiable at and , as required. ∎
The functions and are differentiable with and for all .
For the function defined in Example 4.44, observe that
This tells us that is differentiable at and . A similar argument shows that is differentiable at and : see Exercise 5.14 (i).
So far we have only shown and are differentiable at . However, this special case can be combined with the angle summation formulæ to prove the full result: see Exercise 5.14 (ii). ∎
Fill in the details of Example 5.13 by carrying out the following steps.
-
(i)
Use Exercise 4.46 to show that is differentiable at and .
-
(ii)
Fix and use the angle summation formulæ to show that and are both differentiable at with and .
Higher-order derivatives
If a function is differentiable, this means that the derivative exists – but the function may or may not be differentiable. This motivates the following definition, to distinguish the different types of behaviour that are possible.
Let be an open interval and be differentiable.
-
1
If is differentiable then we say is twice differentiable and define .
-
2
More generally, for we say is -times differentiable if the (recursively-defined) higher-order derivatives exist for all .
-
3
Finally, we say that is infinitely differentiable if it is -times differentiable for all .
Show that is infinitely differentiable.
Consider the function given by for all . Is twice differentiable? Three times differentiable? Infinitely differentiable?
The function
is differentiable but not twice differentiable. To see this, note our earlier examples show that is differentiable on with derivative for all and is is differentiable on with derivative for all . For , we have
Since the left and right limits agree, we conclude from Exercise 4.72 that is differentiable at with . However, the above argument shows that
and it is easy to see this is not differentiable using an argument similar to that from Example 5.7. We illustrate this example in Figure 5.6.
Again, there are different ways to denote higher-order derivatives. These include
Furthermore, second derivatives can be written as or (and similarly for higher-order derivatives, although by the time we get to fourth order the notation gets out of hand).
One-sided derivatives
As with continuity, it is convenient to define one-sided derivatives to deal with functions whose domains are closed (or half-open) intervals. For instance, given , with , we say is differentiable on if is differentiable at all points and the limits
exist. In this case, is called the right derivative at and is called left derivative at .