Skip to main content

Chapter 6 The derivative function

Section 6.1 Definition

Recall that a function is an input-output process. We think of a quantity function \(q(t) \) as taking a time as an input and returning the amount of some quantity at that particular time as its output. But the process of computing derivative values for a specific quantity function is itself also a function — again a specific time is the input, and then Definition 5.5.1 can be used to return the instantaneous rate of change at that time (if the limit exists there). Essentially, to turn the process of computing derivatives into a function, we take Derivative value and replace the specific time \(t^\ast \) with a variable time \(t \text{.}\)

Definition 6.1.1. Derivative function.

Given quantity function \(q(t) \text{,}\) the associated derivative function is the function
\begin{equation*} q'(t) = \lim_{\change{t} \to 0} \slope{q}{t} \qquad \text{for} \qquad \change{q} = q(t + \change{t}) - q(t) \text{.} \end{equation*}
The domain of \(q' \) is the collection of all time values where \(q \) is differentiable (see Definition 5.5.1), and \(q' \) remains undefined at those time values where \(q \) is not differentiable. The process of computing a formula for the derivative function \(q'(t) \) from a formula for \(q(t) \) is called differentiation, and we often say that we differentiate \(q(t) \) to produce \(q'(t) \text{.}\)

Notation.

We use \(q'(t) \) when we want to refer to the derivative function for \(q \) in function notation, while we use \(dq/dt \) to represent an input-output formula in \(t \) for \(q' \text{.}\) Of course, both of these forms are relative to the initial choice of letter \(q \) — if we were dealing with a position function \(s(t) \) as our quantity function, then we would use \(s'(t) \) and \(ds/dt \) to refer to the derivative. In some contexts, particularly physics and applied mathematics, you might see \(\dot{q} \) used to representative the derivative function for \(q(t) \text{.}\)
It is also common practice in mathematics and other science disciplines to use a “bare” \(\opddt \) as an operator that applies the differentiation process to a function or formula. For example, notation in the form
\begin{equation*} \ddt{t^2} = \text{(some formula)} \end{equation*}
or
\begin{equation*} \opddt t^2 = \text{(some formula)} \text{,} \end{equation*}
is meant to be read as “a formula for the derivative function associated to the square function is (some formula).” Or, more simply, “the derivative of the square function is (some formula)” — that is, the symbol \(\opddt \) represents the phrase “the derivative of.”

Section 6.2 Computing algebraically

In Section 5.5, we calculated individual derivative values by looking for patterns in average-rate approximations to instantaneous rate at a specific time as \(\change{t} \to 0 \text{.}\) Now we attempt to calculate all derivative values at once, using the limit definition with a variable time \(t \text{.}\) In this process, there will be two variables involved: the input time \(t \text{,}\) and the limit variable \(\change{t} \text{.}\) As you compute the limit, regard \(t \) as an unspecified constant. We take \(\change{t} \to 0 \) for one specific \(t \text{,}\) but as we leave \(t \) unspecified this will do the work of computing the derivative value \(q'(t) \) as a formula in \(t \text{.}\)
Note that every derivative limit is a so-called \(0 / 0\)-form limit, since if \(\change{t} \approx 0 \) then also
\begin{align*} \change{q} \amp = q(t + \change{t}) - q(t) \\ \amp \approx q(t + 0) - q(t) \\ \amp = q(t) - q(t) \\ \amp = 0 \text{.} \end{align*}
So for \(\change{t} \approx 0 \text{,}\) both numerator and denominator in the difference quotient \(\inlineslope{q}{t} \) are approximately zero. But we never actually have an undefined \(0 / 0 \) quotient, as in the limit \(\change{t} \to 0 \) we consider \(\change{t} \approx 0 \) but \(\change{t} \neq 0 \text{.}\)
Our general method is to avoid division by zero by algebraic manipulation.
Here is a basic example of the process.

Example 6.2.2. Velocity for parabolic motion.

Let’s return to the situation from Example 5.1.2, where we considered parabolic motion due to gravity:
\begin{equation*} h(t) = -5 t^2 + 30 t \text{.} \end{equation*}
In that example, we computed an average velocity over the time domain \(1 \le t \le 3 \text{.}\) We could view that computation as computing a forward difference approximation to the instantaneous velocity at \(t = 1 \text{.}\) Now let’s compute the instantaneous velocity function for this motion, and then evaluate at \(t = 2 \) to compare.
First, let’s set up the forward/backward difference approximation formula.
\begin{align*} h(t + \change{t}) \amp = -5 (t + \change{t})^2 + 30 (t + \change{t}) \\ \amp = -5 \bbrac{t^2 + 2 t \change{t} + {(\change{t})}^2} + 30 (t + \change{t}) \\ \amp = {\color{red} -5 t^2} - 10 t \change{t} - 5 {(\change{t})}^2 + {\color{red} 30 t} + 30 \change{t} \\ h(t) \amp = -5 t^2 + 30 t \end{align*}
Observe that both terms in \(h(t) \) also appear in our expanded expression for \(h(t + \change{t}) \text{,}\) and these common terms will cancel in the subtraction of \(\change{h} \text{,}\) so that
\begin{align*} \change{h} \amp = h(t + \change{t}) - h(t) \\ \amp = - 10 t \change{t} - 5 {(\change{t})}^2 + 30 \change{t} \\ \amp = (- 10 t + 30 - 5 \change{t}) \change{t} \text{.} \end{align*}
Therefore,
\begin{align*} \slope{h}{t} \amp = \frac{ h(t + \change{t}) - h(t) }{ \change{t} } \\ \amp = \frac{ (- 10 t + 30 - 5 \change{t}) \bcancel{\change{t}} }{ \bcancel{\change{t}} } \\ \amp = - 10 t + 30 - 5 \change{t} \text{.} \end{align*}
We now see that
\begin{equation*} \slope{h}{t} \to -10 t + 30 \qquad \text{as} \qquad \change{t} \to 0 \text{,} \end{equation*}
and so in differential notation we can write
\begin{equation*} \ddt{h} = -10 t + 30 \text{,} \end{equation*}
or in function notation we can write
\begin{equation*} q'(t) = -10 t + 30 \text{.} \end{equation*}
If we wish, we can now evaluate
\begin{equation*} q'(1) = 20 \text{.} \end{equation*}
Comparing that with our average rate computation in Example 5.1.2, it’s no surprise that our previous average velocity calculation is not a good estimate of the instantaneous velocity, as \(2 \) seconds is too long of a time interval to give a good estimate for this model.

Section 6.3 Fundamental differentiation formulas and principles

Subsection 6.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.

Justification.

For constant quantity function \(q(t) = c \text{,}\) we also have \(q(t + \change{t}) = c \text{,}\) so in this case \(\change{q} = 0 \text{.}\) Therefore,
\begin{equation*} \slope{q}{t} = \frac{0}{\change{t}} = 0 \text{.} \end{equation*}
(Remember that \(\change{t} \approx 0 \) but \(\change{t} \neq 0 \text{.}\))
So our average rate approximations \(\inlineslope{q}{t} \) have constant value \(0 \text{,}\) and to take their limit we simply apply the Limit of a constant function law to conclude that
\begin{equation*} \slope{q}{t} \to 0 \qquad \text{as} \qquad \change{t} \to 0\text{.} \end{equation*}
Therefore, for a constant function we have
\begin{equation*} \dqdt = 0 \text{.} \end{equation*}

Justification.

For quantity function \(q(t) = t \) we have \(q(t + \change{t}) = t + \change{t} \text{,}\) so
\begin{equation*} \change{q} = (t + \change{t}) - t = \change{t} \text{.} \end{equation*}
Therefore,
\begin{equation*} \slope{q}{t} = \frac{ \change{t} }{ \change{t} } = 1 \text{.} \end{equation*}
Again, as this average rate ends up being constant, we have
\begin{equation*} \slope{q}{t} \to 1 \qquad \text{as} \qquad \change{t} \to 0\text{,} \end{equation*}
and so
\begin{equation*} \dqdt = 1 \text{.} \end{equation*}

Note 6.3.3.

In the justifications for Pattern 6.3.1 and Pattern 6.3.2 we are not making the mistake of taking \(0/0 = 1 \) to be true, because in the limit defining \(dq/dt \) we think of \(\change{t} \approx 0 \) but \(\change{t} \neq 0 \text{.}\)

Subsection 6.3.2 Effects of vertical transformations and combinations

Now we’ll work a little more generally to develop some algebraic rules for derivatives based on transforming and combining the outputs of differentiable functions.

Justification.

We have
\begin{equation*} q(t + \change{t}) = k p(t + \change{t}) \text{,} \end{equation*}
so that
\begin{align*} \change{q} \amp = q(t + \change{t}) - q(t) \\ \amp = k p(t + \change{t}) - k p(t) \\ \amp = k \bbrac{ p(t + \change{t}) - p(t) } \\ \amp = k \change{p} \text{.} \end{align*}
Therefore,
\begin{equation*} \slope{q}{t} = \frac{k \change{p} }{ \change{t} } = k \, \slope{p}{t}\text{.} \end{equation*}
We have assumed that \(p \) is differentiable, so
\begin{equation*} \slope{p}{t} \to \ddt{p} \qquad \text{as} \qquad \change{t} \to 0 \text{.} \end{equation*}
By the Constant multiple law we then have
\begin{equation*} k \, \slope{p}{t} \to k \, \ddt{p} \qquad \text{as} \qquad \change{t} \to 0 \text{.} \end{equation*}
That is,
\begin{equation*} \slope{q}{t} = k \slope{p}{t} \to k \, \ddt{p} \qquad \text{as} \qquad \change{t} \to 0\text{,} \end{equation*}
and so
\begin{equation*} \dqdt = k \, \ddt{p} \text{,} \end{equation*}
as claimed.
A tangent to a graph and a scaled tangent to a scaled graph.
Figure 6.3.5. Scaling a tangent line scales its slope.

Remark 6.3.6.

Pattern 6.3.17 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.
A tangent to a graph and a reflected tangent to a reflected graph.
Figure 6.3.7. Reflecting a tangent line makes its slope negative.

Example 6.3.8.

\begin{equation*} h(t) = -5 t^2 + 30 t \end{equation*}
we computed
\begin{equation*} \ddt{h} = -10 t + 30 \text{.} \end{equation*}
So if we had
\begin{align*} q(t) \amp = t^2 - 6 t \amp \amp\implies \amp q(t) \amp = \left(- \frac{1}{5} \right) \, h(t)\text{,} \end{align*}
then
\begin{align*} \dqdt \amp = \left(- \frac{1}{5}\right) \, \ddt{h} \\ \amp = \left(- \frac{1}{5} \right) \, (-10 t + 30) \\ \amp = 2 t - 6 \text{.} \end{align*}

Justification.

We have
\begin{equation*} q(t + \change{t}) = p_1(t + \change{t}) + p_2(t + \change{t}) \text{,} \end{equation*}
so
\begin{align*} \change{q} \amp = q(t + \change{t}) - q(t) \\ \amp = \bbrac{ p_1(t + \change{t}) + p_2(t + \change{t}) } - \bbrac{ p_1(t) + p_2(t) } \\ \amp = \bbrac{ p_1(t + \change{t}) - p_1(t) } + \bbrac{ p_2(t + \change{t}) - p_2(t)} \\ \amp = \change{p_1} + \change{p_2} \text{.} \end{align*}
Therefore,
\begin{equation*} \slope{q}{t} = \frac{ \change{p_1} + \change{p_2} }{ \change{t} } = \slope{p_1}{t} + \slope{p_2}{t}\text{.} \end{equation*}
We have assumed that \(p_1 \) and \(p_2 \) are both differentiable, so both
\begin{equation*} \slope{p_1}{t} \to \ddt{p_1}, \quad \slope{p_2}{t} \to \ddt{p_2} \qquad \text{as} \qquad \change{t} \to 0\text{.} \end{equation*}
Using the Sum and difference laws, we can combine these to get
\begin{equation*} \slope{p_1}{t} + \slope{p_2}{t} \to \ddt{p_1} + \ddt{p_2} \qquad \text{as} \qquad \change{t} \to 0 \text{.} \end{equation*}
That is,
\begin{equation*} \slope{q}{t} = \slope{p_1}{t} + \slope{p_2}{t} \to \ddt{p_1} + \ddt{p_2} \qquad \text{as} \qquad \change{t} \to 0\text{,} \end{equation*}
and so
\begin{equation*} \ddt{q} = \ddt{p_1} + \ddt{p_2} \text{,} \end{equation*}
as claimed.
We may combine the Constant Multiple Rule (Pattern 6.3.4) using \(-1 \) as the scale factor with the Sum Rule (Pattern 6.3.9) to create a Difference Rule.
We may apply a combination of our rules and basic formulas so far to establish the pattern of a derivative function for a linear function.

Justification.

Calculate
\begin{align*} \dqdt \amp = \opddt (r t + q_0) \\ \amp = \opddt (r t) + \ddt{q_0} \amp \amp\text{(i)} \\ \amp = \opddt (r t) + 0 \amp \amp\text{(ii)} \\ \amp = r \ddt{t} \amp \amp\text{(iii)} \\ \amp = r \cdot 1 \amp \amp\text{(iv)} \\ \amp = r \text{,} \end{align*}
with step justifications:
  1. Rule for derivative of a constant (Pattern 6.3.1).
  2. Rule for derivative of the independent variable (Pattern 6.3.2).
Recall that a function that exhibits a uniformly constant rate is must be linear. Pattern 6.3.11 says the opposite: a linear function exhibits a uniformly constant rate. Graphically, this corresponds to exhibiting a constant slope, so that an average rate calculation
\begin{equation*} \slope{q}{t} \end{equation*}
between any pair of points on the graph leads to the same result. (See Example 5.2.5, and Figure 5.2.6 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. Pattern 6.3.11 asserts 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.
Finally, consider the special case of the Sum Rule where the second function is a constant function: if
\begin{equation*} q(t) = p_1(t) + C \text{,} \end{equation*}
then
\begin{align*} \dqdt \amp = \opddt (p_1 + C) \\ \amp = \ddt{p_1} + \ddt{C} \\ \amp = \ddt{p_1} + 0 \\ \amp = \ddt{p_1} \text{.} \end{align*}
A tangent to a graph and a shifted tangent to a shifted graph.
Figure 6.3.14. Shifting a tangent line does not change its slope.

Subsection 6.3.3 Effects of horizontal transformations

Now let’s consider the effect of a horizontal transformation of a differentiable quantity function on the derivative function.

Justification idea.

Instead of carrying out a detailed calculation of \(dq / dt \text{,}\) let’s just argue in terms of the concept of the derivative. If the value of \(dq / dt \) at a particular time \(t = t_0 \) represents the instantaneous rate of accumulation of \(q \) at that time, but
\begin{equation*} q(t) = p(t - c) \end{equation*}
for all \(t \) in a small domain containing \(t_0 \text{,}\) then we are really just measuring the instantaneous rate of accumulation of \(q \) at the “earlier” time \(t = t_0 - c \text{.}\)
A tangent to a graph and a shifted tangent to a shifted graph.
Figure 6.3.16. Shifting a tangent line does not change its slope.

Justification.

First let’s examine the pattern of average rate calculations for the scaled quantity function. Suppose \(t_1 \le t \le t_2 \) is some domain containing a time of interest \(t = t^\ast \text{.}\)
\begin{align*} \slope{q}{t} \amp = \frac{q(t_2) - q(t_1)}{t_2 - t_1} \\ \amp = \frac{p(t_2 / k) - p(t_1 / k)}{t_2 - t_1} \text{.} \end{align*}
This almost looks like an average rate calculation for \(p \text{,}\) but the time values in the denominator don’t match the time values used as inputs to \(p \) in the numerator. Let’s fix that: assuming \(k \neq 0 \text{,}\) we have
\begin{equation*} \frac{1 / k}{1 / k} = 1 \text{.} \end{equation*}
This means we may multiply our difference quotient above by this version of \(1 \) affecting its value:
\begin{align*} \slope{q}{t} \amp = \slope{q}{t} \cdot \frac{1 / k}{1 / k} \\ \amp = \frac{p(t_2 / k) - p(t_1 / k)}{t_2 - t_1} \cdot \frac{1 / k}{1 / k} \\ \amp = \frac{p(t_2 / k) - p(t_1 / k)}{t_2 / k - t_1 / k} \cdot \frac{1 / k}{1} \\ \amp = \frac{p(t_2 / k) - p(t_1 / k)}{t_2 / k - t_1 / k} \cdot \frac{1}{k} \text{.} \end{align*}
So an average rate calculation for \(q \) over a domain \(t_1 \le t \le t_2 \) is a scaling of an average rate calculation for \(p \) over domain \(t_1 / k \le t \le t_2 / k \text{.}\) To more clearly work over this scaled domain, let’s change variables.
\begin{align*} u_1 \amp = t_1 / k \amp \change{u} \amp = u_2 - u_1 \\ u_2 \amp = t_2 / k \amp \amp = t_2 / k - t_1 / k \\ u^\ast \amp = t^\ast / k \amp \amp = \change{t} / k \end{align*}
With these new variables, our previous calculation becomes
\begin{equation*} \slope{q}{t} = \frac{p(u_2) - p(u_1)}{u_2 - u_1} \cdot \frac{1}{k} = \slope{p}{u} \cdot \frac{1}{k}\text{.} \end{equation*}
A secant line representing an average rate on a stretched graph.
(a) A secant line representing an average rate on a stretched graph.
A compressed secant line representing an average rate on the original graph.
(b) A compressed secant line representing an average rate on the original graph.
Figure 6.3.18. An average rate calculation on one graph compressed into an average rate calculation on another. Note that in the case that \(k \gt 1 \) (which is what is pictured here), the graph of \(q \) is a stretch of the graph of \(p \text{,}\) but this in turn means that the graph of \(p \) is a compression of the graph of \(q \text{.}\) Notice how this makes the slope of the secant line on the graph of \(p \) steeper than the corresponding slope of the secant line on the graph of \(q \text{.}\)
If we are considering a specific time \(t = t^\ast \text{,}\) our calculations above say that every average rate calculation for \(q \) on a domain containing \(t^\ast \) can be converted into a scaled average rate calculation for \(p \) on a domain containing \(u^\ast = t^\ast / k \text{.}\) Applying this in particular to a forward/backward average rate approximation as in Definition 5.5.1, since \(p \) is assumed to be differentiable, we have
\begin{equation*} \slope{p}{u} \to \dd{p}{u} \qquad \text{as} \qquad \change{u} \to 0 \text{.} \end{equation*}
As we are investigating \(dq/dt \text{,}\) we would like to know the limit of \(\inlineslope{q}{t} \) as \(\change{t} \to 0 \text{.}\) But for \(\change{t} \to 0 \text{,}\) we have
\begin{equation*} \change{u} = \change{t} / k \to 0 / k = 0 \text{.} \end{equation*}
So
\begin{align*} \change{t} \amp \to 0 \amp \amp \implies \quad \change{u} \to 0\\ \amp \amp \amp \implies \quad \slope{p}{u} \to \dd{p}{u}\\ \amp \amp \amp \implies \quad \slope{q}{t} = \slope{p}{u} \cdot \frac{1}{k} \to \dd{p}{u} \cdot \frac{1}{k} \text{.} \end{align*}
The pattern of our change-of-variables was \(u = t / k \text{,}\) so that
\begin{equation*} \dd{p}{u} = p'(u) = p'(t / k) \text{.} \end{equation*}
Combining with the calculations above we have
\begin{equation*} q'(t) = \lim_{\change{t} \to 0} \slope{q}{t} = \dd{p}{u} \cdot \frac{1}{k} = \frac{p'(t / k)}{k} \text{,} \end{equation*}
as desired.

Remark 6.3.19.

In Pattern 6.3.17, we have expressed the horizontal scale pattern \(q(t) = p(t / k) \) consistently with our presentation in Subsection 2.4.2, where the scale factor is expressed through division rather than multiplication. Nevertheless, here is the corresponding derivative pattern when the horizontal scale factor is expressed through multiplication. To obtain it, we simply make a substitution of the scale factor via \(a = 1 / k \text{:}\)
\begin{equation*} q(t) = p(a t) \qquad \implies \qquad q'(t) = a p'(a t) \text{.} \end{equation*}
Aside: A look ahead.
Note that Pattern 6.3.17 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.
A tangent to a graph and a reflected tangent to a reflected graph.
Figure 6.3.20. Reflecting a tangent line makes its slope negative.

Section 6.4 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 6.4.1. Using Sage to compute the equation of a tangent line.

Consider function
\begin{equation*} q(t) = t^3 - 2 t + 5 \text{.} \end{equation*}
What is the equation of the tangent line to the graph of this function at the point
\begin{equation*} q(1) = 4 \text{?} \end{equation*}
It would be tedious to carry this out with pencil-and-paper as we did for a quadratic function in Example 6.2.2, so let’s use Sage.
Now we apply Pattern 5.6.4 to get tangent line equation
\begin{align*} y \amp = 1 t + (4 - 1 \cdot 1) \\ \amp = t + 3 \text{.} \end{align*}
Here is the same calculation, but using function notation.