Chapter 12 The derivative function
Section 12.1 Definition
In Section 6.3, we turned the process of calculating an accumulation for a rate model over a specific time interval into a function by replacing the specific end time with a variable one. The resulting function accepted inputs that represented that variable end time, and returned outputs that represented accumulation values over time domains of different lengths, but always with the same start time.
The process of computing derivative values can be turned into a function in a much simpler way. In Section 11.5, we defined a Derivative value at a specific input time for a given quantity function. To turn this process into a function, we merely have to replace “at a specific time” with “at a variable time”, so that the new derivative function takes a time as input and, if the quantity function is differentiable at that input time, returns the associated derivative value.
Notation.
to represent an input-output formula in for Of course, both of these forms are relative to the initial choice of letter — if we were dealing with a position function as our quantity function, then we would use and
to refer to the derivative. In some contexts, particularly physics, you might see used to representative the derivative function for
It is also common practice in mathematics and other science disciplines to use a “bare” as an operator that applies the differentiation process to a function or formula. For example, notation in the form
or
is meant to be read as “a formula for the derivative function associated to the exponential function is (some formula).” Or, more simply, “the derivative of the exponential function is (some formula)” — that is, the symbol represents the phrase “the derivative of.”
Principle 12.1.2. Derivative function provides a rate model.
We won’t be able to verify Principle 12.1.2 until Chapter 13, where we will see that if we start with a rate model use an accumulation function to create an associated quantity model
then this quantity model will be differentiable and its derivative function will be exactly the rate function we began with:
Intuitively it seems simple that the above description is a circular process, so of course we should return back to the rate function we began with. But mathematically, it is far from obvious that the processes behind the two concepts integral and derivative are reverse processes.
Section 12.2 Computing algebraically
In Section 11.5, we calculated individual derivative values by looking for patterns in average-rate approximations to rate at a specific time as we made smaller. By replacing the specific time with a variable time and working conceptually with a time domain of “infinitesimal” length instead of a time domain of substantial length in many cases we can obtain a formula for all output values of We think of as being so small as to be negligible, but always consider (or else the denominator of represents division by zero).
For this, we will exclusively use the forward approximation formula, so that the approximation at a specific point in time
becomes the general, exact formula
The key to the process is to not consider the “infinitesimal” length negligible too early, since if we take right away, we will always end up with
which is undefined. Instead, we simplify as much as possible until we can definitively see the effect of
Here is a basic example of the process.
Example 12.2.1. Velocity for parabolic motion.
Let’s return to the example situation we made us of repeatedly in Chapter 7 of an object launched from the surface of an airless planet whose motion is then determined by the gravitational pull of the planet. (See Example 7.2.1, Example 7.3.1, and Example 7.3.4.) In those examples, we began with a constant acceleration model and traced it back to a parabolic position model
For simplicity in this example, let’s use actual numbers for and — say, and Our positional model is then
and we have
so that
Therefore,
Now treating as negligible, we can clearly see that
Procedure 12.2.2. Computing a derivative function algebraically.
- Use the formula for
to form the difference quotient - Manipulate this expression algebraically until division by
no longer occurs. - Now consider all remaining instances of
to be negligible. (That is, consider and simplify accordingly.)
The formula in that remains is the derivative function.
Section 12.3 Fundamental differentiation formulas and principles
Subsection 12.3.1 Two fundamental formulas
Function formulas are built out of the independent variable and constants. So we’ll start by analysing the two simplest possible quantity models built on those two components.
Pattern 12.3.1. Derivative of a constant.
Justification.
Therefore,
In an actual average-rate approximation (that is, with ), this would always compute to So, in fact, these approximations would not be approximations but instead they are already the exact value, and it is correct to write
We are not making the mistake of taking to be true, because we think of our infinitesimal time domain length as being so small as to be negligible, but we always consider to be true.
Pattern 12.3.2. Derivative of the independent variable.
Justification.
Subsection 12.3.2 Scaling and adding quantities does the same to the derivative
Now we’ll work a little more generally to develop some algebraic rules for derivatives.
Pattern 12.3.3. Derivative of a scaled quantity.
Justification.
Pattern 12.3.14 applies equally well when the vertical scale factor is negative. Thinking in terms of tangent lines, if we reflect vertically then the rise becomes negative while the run stays the same.
Example 12.3.6.
In Example 12.2.1, forPattern 12.3.7. Derivative of a sum of quantities.
Justification.
Example 12.3.8. Derivative of a linear quantity function.
For
we may apply a combination of our rules and basic formulas so far:
with step justifications
If we accept Principle 12.1.2, then in Example 12.3.8 we have successfully reversed Pattern 7.2.2 — a linear quantity model represents a quantity that varies at a constant rate, and a quantity that varies at a constant rate can be modelled by a linear function.
In fact, a function is forced to be linear by the property of exhibiting a uniformly constant rate. Graphically, this corresponds to exhibiting a constant slope, so that an average rate calculation
between any pair of points on the graph leads to the same result. (See Example 11.2.8, and Figure 11.2.9 in particular.)
By definition, a tangent line to a quantity’s graph meets that graph at a particular point with slope equal to the quantity’s derivative value there. Example 12.3.8 shows that the slope of that tangent line will be the same as the slope of the quantity’s graph, so in fact they will be the same line.
Pattern 12.3.9. Tangent to a line.
A linear quantity function is differentiable at every input time, and the tangent line at every point on the quantity’s graph is the same line as the graph itself.
Now consider the special case of Pattern 12.3.7 where the second function is a constant function: if
then
Pattern 12.3.10. Derivative of a vertical shift.
Finally, let’s consider the effect of horizontal transformations on derivative.
Pattern 12.3.12. Derivative of a horizontally-shifted quantity function.
Justification idea.
Pattern 12.3.14. Derivative of a horizontally-scaled quantity function.
Justification.
First let’s examine the pattern of average rate calculations for the scaled quantity function:
This almost looks like an average rate calculation for but the two times in the denominator don’t match the times used in the numerator. Let’s fix that:
So an average rate calculation for over domain is a scaling of an average rate calculation for over domain
If we are considering a specific time our calculations above say that every average rate calculation for on a domain containing can be converted into a scaled average rate calculation for on a domain containing since
where the approximation can be made arbitrarily close by taking
sufficiently small. If we take small enough so that can be described as “sufficiently small” in this sense, then
as desired.
Pattern 12.3.14 applies equally well when the horizontal scale factor is negative. Thinking in terms of tangent lines, if we reflect horizontally then the rise becomes negative because the second point has become the first, and vice versa. Meanwhile, the amount of run stays the same.
We need some basic example derivatives to work with before we can consider examples of the previous two patterns, which is what the next section is about. Once you have studied the derivatives of some familiar functions, see Example 12.5.5 for an example of applying Pattern 12.3.12 and Pattern 12.3.14.
Section 12.4 Derivatives of polynomials
Polynomials are built out of constants and powers of the independent variable. We already know the derivatives for constants and the independent variable itself, so let’s tackle higher powers. We’ve already carried out one example involving (Example 12.2.1), so let’s try a cubic.
Example 12.4.1. Derivative of the basic cubic function.
Let’s investigate what happens if we go back-and-forth through our two processes.
Example 12.4.2. Derivative of the quantity model for a quadratic rate model.
where is the initial quantity. The constant denominator is actually a scale factor:
So the derivative process has successfully returned our original rate function.
Formula 1 of Pattern 7.4.2 could be described in words as follows: to obtain the accumulation function for a power of increase the exponent and then divide by that new exponent. The differentiation pattern should be the reverse of this pattern. To reverse a multi-step pattern, we need to both reverse the steps but also reverse the order of the steps. With this in mind, and also using the result of Example 12.4.1 as inspiration, we might guess that the pattern is: to obtain the derivative function for a power of multiply by the exponent and then decrease the exponent.
Pattern 12.4.3. Derivative of a power function.
Justification for positive integer .
We follow the template of Example 12.4.1. For quantity function
we have
where are the so-called binomial coefficients for the expansion of a binomial expression of the form Therefore,
and so
Treating as negligible at this point gives us
Finally, it turns out that the first binomial coefficient for the expansion of a binomial expression of the form is (refer to the Binomial Theorem), so that
as claimed.
Remark 12.4.4. Non-positive and/or non-integer exponents.
While our justification is only valid for positive, integer exponents Pattern 12.4.3 itself is valid for all exponents, and we will justify this in later chapters after we have a few more techniques and patterns available to us. In the meantime, recall that for negative exponents we cannot attach a derivative value to the quantity function at the singularity at (see Subsection 11.7.3), which is the reason for including the phrase “everywhere that it is defined” in the statement of the pattern. We could also consider the pattern to be true for since in that case the quantity function satisfies
while Pattern 12.4.3 gives
(again assuming ). So in some sense Pattern 12.4.3 “contains” Pattern 12.3.1. (And, for that matter, it also “contains” Pattern 12.3.2 when we take )
Here are a couple examples of using Pattern 12.4.3.
Example 12.4.5. Derivative of a power with a negative exponent.
Note 12.4.6.
While we might describe part of Pattern 12.4.3 as decrease the exponent, this does not mean decrease the magnitude of the exponent. For example, a common mistake in applying Pattern 12.4.3 is to use in the derivative formula for instead of as in Example 12.4.5.
Example 12.4.7. Derivative of a power with an irrational exponent.
Finally, we can combine Pattern 12.4.3 with Pattern 12.3.3 and Pattern 12.3.7 to obtain a general formula for the derivative function of any polynomial. We will leave the justification up to you, the reader.
Pattern 12.4.8. Derivative of a polynomial.
Example 12.4.9. Derivative of a polynomial.
Checkpoint 12.4.10.
Verify for yourself that beginning with a polynomial rate function
applying Pattern 7.4.4 to obtain an associated quantity model (don’t forget to include the initial value), and then applying Pattern 12.4.8 to obtain the derivative function of that quantity function will return you back to the original rate function.
Section 12.5 Derivatives of the natural logarithm and exponential functions
Subsection 12.5.1 The natural logarithm
If we accept Principle 12.1.2, then Definition 8.1.1 tells us how to differentiate the natural logarithm function.
Pattern 12.5.1. Derivative of the natural logarithm.
It is common to extend the domain of the natural logarithm by composing with the absolute value function: whereas is defined only for is defined for all except at the singularity at For this function, a negative input has the same output value as the corresponding positive input of the same magnitude, so the graph is symmetric about the vertical axis.
Consider a point on the graph in Figure 12.5.2 at with There is a corresponding point at the same height at As this second point is on the graph of and so we know its derivative value as
This derivative value describes the slope of the tangent line at this point. The derivative value
describes the slope of the tangent line at the original point. But since these two points are reflections of each other in the vertical axis, we can see that the two slopes will be equal in magnitude but have opposite signs.
So by symmetry we have
However, as was negative to begin with,
and we end up with
which is the same “one-over” formula as for the derivative of the natural logarithm.
Pattern 12.5.4. Derivative of the natural logarithm composed with the absolute value.
Example 12.5.5. Derivative of a horizontally transformed logarithm.
To calculate
Now consider
Pattern 12.3.12 says that
Finally, consider
the function whose derivative we would like to calculate. Pattern 12.3.14 tells us
So we have determined that
Recall that the natural logarithm is defined to be the accumulation function for rate function That is, values of are defined to be results of definite integral calculations. In fact, we can interpret values of the same way.
By symmetry, the areas in Figure 12.5.6 have the same magnitude, but are oppositely oriented. We can counteract the negative orientation of the area on the left by integrating backwards in time:
Thus we can say that
Subsection 12.5.2 The natural exponential
Again, if we accept Principle 12.1.2, then Pattern 9.6.1 tells us how to differentiate the natural exponential function. In particular, Pattern 9.6.1 says that rate function leads to the accumulation function If we assume that then this accumulation function is also the quantity function:
and Principle 12.1.2 tells us to expect that
Now, the quantity functions
are vertical shifts of one another, so Pattern 12.3.10 tells us that they have the same derivative.
Pattern 12.5.7. Derivative of the natural exponential.
This is a remarkable fact! It says that a quantity that experiences exponential growth will also have a rate function that grows exponentially. This is why exponential growth can be both exciting (when considering compounding of gains in your investment account, for example) and terrifying (when considering unchecked spread of a virus in a population, for example). — the more there is, the sooner there will be a lot more than that.
In this direction, we can now combine Pattern 12.5.7 with Pattern 12.3.14 to verify exponential solutions to rate equations where the rate is proportional to the quantity, as in our Radioactive decay example.
Example 12.5.8. Verifying an exponential solution to a proportional rate equation.
Suppose is a quantity function whose rate of variation is proportional to the quantity, with proportionality constant Let’s take our proportionality constant to be so that
We expect
so we are looking for a function whose derivative is a multiple of that original function. The pattern
is almost correct, but the “multiple” is only However, we know from Pattern 12.3.14 that introducing a horizontal scale factor into the quantity function also introduces a vertical scale factor into the derivative function. In this case, if we take
then Pattern 12.3.14 says that
This is only one particular solution to (✶). Can we guess at the general solution by introducing some parameter? Our particular solution above has initial value
But exponential growth or decay does not turn into some other behaviour if there is a different initial value — otherwise a horizontal shift (so that the point in time that is considered is shifted) would change the type of graph, which is not possible. For example, see our direction field for (Figure 4.3.5) — the example solution curves all look like exponential decay no matter the initial value.
Recall from Definition 9.1.5 that introducing a constant multiple in an exponential function changes the initial amount. So let’s try
Pattern 12.5.9. General solution to a proportional rate equation.
Section 12.6 Derivatives of the sine and cosine functions
If this is true, then Pattern 12.3.10 tells us that
as well. Finally, applying Pattern 12.3.3 would lead us to
We will verify this fact using the definition of derivative, but first we need a special property of the sine and cosine functions, each.
Examining the graphs of these trigonometric functions, we clearly see that for we have and it also appears that because very close to the line But in each of these cases we can say something much stronger about how close these approximations are relative to how small is.
Pattern 12.6.2. Sine at small inputs.
Justification.
We will verify the statement for positive values of the justification for negative values of is similar.
Recall that values of represent the -coordinate of a position on the unit circle. That is, in Figure 12.6.3, the value of is the equal to the triangle side length marked
Now, we have because is the length of the hypotenuse in a right triangle and is the length of one of the legs of that triangle. We also have because the arc that measures has the same endpoints as the segment measured by but takes the segment is a straight path between those points. Going out further, for a similar reason we can say But also because is a hypotenuse and is a leg. And we have by using opposite-over-adjacent in the large right triangle. So we finally have
Splitting in two at and doing a little re-arranging, we have
(Note that for but positive, the value of is also positive, so multiplying or dividing both sides of an inequality by either or will not reverse the inequality.)
Combining these inequalities, we have
where the superscript indicates that is assumed to be positive. This inequality says that the graph of whatever it might look like, must be confined to the shaded region in Figure 12.6.4 below. For this graph must be squeezed into the little wedge in the upper-left corner of the shaded region, very close to a height of and so we conclude
The following corresponding property of the cosine function can be justified in a similar manner.
Pattern 12.6.5. Cosine at small inputs.
Remark 12.6.6.
The statement that
both the numerator and denominator are approximately for small values of But similarly to Section 3.2, it becomes a “race” to The fact that
says that the numerator “wins” the race, so that the approximation must be very tight compared to since if it were the other way around then we would expect the expression
to have a singularity at
Pattern 12.6.7. Derivative of the cosine function.
Justification.
As usual, we start with
Using the addition identity for cosine, we have
Therefore,
so
as desired.
and this is in fact the case.
Pattern 12.6.8. Derivative of the sine function.
Justification idea.
Apply the same sort of reasoning as in the justification for Pattern 12.6.7, beginning by applying an addition identity to in
Section 12.7 Calculating derivatives with Sage
Of course, Sage can symbolically calculate derivatives. Here is the syntax for computing a derivative formula in Sage.
derivative(formula, variable)
Alternatively, you can define a function and then apply the
derivative
method to it.q(t) = some_formula q.derivative()
If you need a specific derivative value, you can use the
substitute
method with the first syntax option above. In the second syntax option, a function is returned to that can be evaluated with function notation.q(t) = some_formula r = q.derivative() r(some_number)
Here is an example using both syntax variations.
Example 12.7.1. Using Sage to compute the equation of a tangent line.
Consider function
What is the equation of the tangent line to the graph of this function at the point
It is not too difficult to use Pattern 12.4.8 to carry this out with pencil-and-paper, but let’s use Sage.
xxxxxxxxxx
var('t')
dqdt = derivative(t^3 - 2*t + 5, t)
slope = dqdt.substitute(t = 1)
print("dqdt =", dqdt)
print("slope at t=1 is", slope)
Here is the same calculation, but using function notation.
xxxxxxxxxx
q(t) = t^3 - 2*t + 5
dqdt = q.derivative()
slope = dqdt(1)
line = slope * t + (q(1) - slope * 1)
print("dqdt is the function")
print(dqdt)
print()
print("slope at t=1 is", slope)
print()
print("equation of tangent line at t=1 is")
print("y =", line)