Section 9.2 Differentiation and Related Rates
¶The rules of differentiation provide directions for how a desire rate of change is computed relative to the rates of change of its components. We often think of these rules in terms of differentiating formulas. However, because a derivative is a function that gives the instantaneous rate of change, the rules also apply to any instantaneous rate of change of a dependent variable that is made from other variables.
In this section, we will develop our understanding of the differentiation rules. First, we focus on how the rules apply to formulas. That is, given the explicit formula for a function, we can compute the explicit formula for its derivative. Then we study related rates. In that setting, we do not have explicit formulas for the dependent variable of interest. Instead, we know how the variable relates to other dependent variables. If we know the instantaneous rates of change of the related variables, then the differentiation rules will allow us to compute the instantaneous rate of change of our variable of interest.
Subsection 9.2.1 Derivatives Take Practice
I want to recommend that you practice as much as possible. You might find it useful to do some of this practice using the following web-based app that will also work on smart phones or tablets: Derivative Practice on Algebraic Formulas. Work your way until you can do all of the types of calculations without hesitation.
Start by knowing basic derivatives of power functions using the power rule
We looked at why this rule is true when \(p\) is a positive integer, but the rule is true for any power function. Combining this with the constant multiple rule, you can find the derivative
Example 9.2.1.
Compute the following derivatives:
- \(\displaystyle \frac{d}{dx}[5x^3]\)
- \(\displaystyle \frac{d}{dx}[\frac{x^4}{7}]\)
- \(\displaystyle \frac{d}{dx}[\frac{2}{7x^2}]\)
- To compute \(\displaystyle \frac{d}{dx}[5x^3]\text{,}\) we recognize the elementary power \(x^3\) which has power \(p=3\) so that its derivative is \(\frac{d}{dx}[x^3] = 3x^2\text{.}\) Use the constant multiple rule to get the final derivative.\begin{equation*} \frac{d}{dx}[5x^3] = 5 (3x^2) = 15 x^2. \end{equation*}
- To compute \(\displaystyle \frac{d}{dx}[\frac{x^4}{7}]\text{,}\) we recognize the elementary power \(x^4\) which has power \(p=4\) so that its derivative is \(\frac{d}{dx}[x^4] = 4x^3\text{.}\) The fraction is a constant multiple in disguise with constant \(\frac{1}{7}\text{.}\)\begin{equation*} \frac{d}{dx}[\frac{x^4}{7}] = \frac{d}{dx}[\frac{1}{7} x^4] = \frac{1}{7} (4x^3) = \frac{4}{7} x^3. \end{equation*}
- To compute \(\displaystyle \frac{d}{dx}[\frac{2}{7x^2}]\text{,}\) we use the properties of powers to rewrite division by a power as a negative power,\begin{equation*} \frac{2}{7x^2} = \frac{2}{7} x^{-2}. \end{equation*}The basic power \(p=-2\) has a derivative with new power \(p-1=-3\text{,}\) so\begin{equation*} \frac{d}{dx}[ \frac{2}{7x^2} ] = \frac{d}{dx}[ \frac{2}{7} x^{-2} ] = \frac{2}{7} (-2x^{-3}) = \frac{-4}{7x^3}. \end{equation*}
Once you have mastered these elementary building blocks with the constant multiple rule, you can move to sums of these building blocks. Derivatives behave nicely with sums, since the derivative of a sum is the sum of the derivatives,
In practice, this means that as soon as you recognize a function is combined as a sum of elementary parts, you can just compute the derivatives of each part separately and add the results. (Subtraction is just addition with an inverse, so both are done at the same time.)
Example 9.2.2.
Compute the following derivatives:
- \(\displaystyle \frac{d}{dx}[2x^5-3x^3+5x^2+7]\)
- \(\displaystyle \frac{d}{dx}[x^2 + 3x - \frac{1}{2x^3}]\)
For each problem, pay attention to how the differentiation operator is applied, starting from the entire formula to individual components until the ultimate answer is found.
- \begin{align*} \frac{d}{dx}[2x^5-3x^3+5x^2+7] &= \frac{d}{dx}[2x^5] + \frac{d}{dx}[-3x^3] + \frac{d}{dx}[5x^2] + \frac{d}{dx}[7]\\ &= 2(5x^4) + -3(3x^2) + 5(2x) + 0 \\ & = 10x^4 -9x^2 + 10x \end{align*}
- \begin{align*} \displaystyle \frac{d}{dx}[x^2 + 3x - \frac{1}{2x^3}] &= \frac{d}{dx}[x^2] + \frac{d}{dx}[3x] + \frac{d}{dx}[-\frac{1}{2}x^{-3}] \\ &= 2x + 3 + \frac{-1}{2}(-3x^{-4}) \\ &= 2x+3+\frac{3}{2x^4} \end{align*}
Now that you can compute derivatives of sums of elementary terms, you should practice computing derivatives of products. The product rule for derivatives do not follow the same simple rule as sums. A little memorization jingle that might help is, "The derivative of \(u\) times \(v\) is U dee-V plus V dee-U," which as formula is
Others like to say, "First D-Last plus Last D-First." Alternatively, I personally use a tactile approach where I touch each factor one at a time and write down a new product where I replace the factor I am touching with its derivative and leave all other factors alone, adding the results. For a product of \(u\) and \(v\text{,}\) I would write
and for a product of three terms, \(u, v, w\text{,}\) I would write
Example 9.2.3.
Compute the following derivatives:
- \(\displaystyle \frac{d}{dx}[(2x+5)(3x-7)]\)
- \(\displaystyle \frac{d}{dx}[x^2(x^3+5)]\)
- \(\displaystyle \frac{d}{dx}[4x^2(3x-1)(4x+5)]\)
For each problem, continue to watch how the differentiation operator is applied, starting from the entire formula to individual components until the ultimate answer is found.
- \begin{align*} \frac{d}{dx}[(2x+5)(3x-7)] &= \frac{d}{dx}[2x+5] \cdot (3x-7) + (2x+5) \cdot [3x-7] \\ &= 2(3x-7) + (2x+5)(3) \\ &= 6x-14 + 6x+15 \\ &= 12x+1 \end{align*}
- \begin{align*} \frac{d}{dx}[x^2(x^3+5)] &= \frac{d}{dx}[x^2] \cdot (x^3+5) + x^2 \cdot \frac{d}{dx}[x^3+5] \\ &= (2x)(x^3+5) + x^2(3x^2+0) \\ &= 2x^4+10x + 3x^4 \\ &= 5x^4+10x \end{align*}
- \begin{align*} \frac{d}{dx}[4x^2(3x-1)(4x+5)] &= \frac{d}{dx}[4x^2] (3x-1)(4x+5) \\ & \qquad + (4x^2) \frac{d}{dx}[3x-1] (4x+5) \\ & \qquad + (4x^2)(3x-1) \frac{d}{dx}[4x+5] \\ &= (8x)(3x-1)(4x+5) + (4x^2)(3)(4x+5) + (4x^2)(3x-1)(4) \\ &= 8x(12x^2+15x-4x-5) + 12x^2(4x+5) + 16x^2(3x-1) \\ &= 96x^3 + 88x^2-40x + 48x^3+60x^2 +48x^3-16x^2 \\ &= 192x^3 +132x^2-40x \end{align*}
In each of these examples, it would also be possible to multiply out the formulas before taking a derivative. This is often easier because then you only need to use the sum rule rather than the product rule.
- \begin{align*} \frac{d}{dx}[(2x+5)(3x-7)] &= \frac{d}{dx}[6x^2-14x+15x-35] \\ &= \frac{d}{dx}[6x^2+x-35] \\ &= 12x+1 \end{align*}
- \begin{align*} \frac{d}{dx}[x^2(x^3+5)] &= \frac{d}{dx}[x^5+5x^2] \\ &= 5x^4+10x \end{align*}
- \begin{align*} \frac{d}{dx}[4x^2(3x-1)(4x+5)] &= \frac{d}{dx}[4x^2(12x^2+15x-4x-5)] \\ &= \frac{d}{dx}[48x^4+44x^3-20x^2] \\ &= 48(4x^3) +44(3x^2)-20(2x)\\ &= 192x^3 +132x^2-40x \end{align*}
However, it is good to practice the product rule for those cases later where it is not possible to expand a formula so that the product rule isn't necessary.
After the product rule, you should master the quotient rule,
I like to sing it as a song. In symbols, this rhyme would be written
Example 9.2.5.
Compute the following derivatives:
- \(\displaystyle \frac{d}{dx}\left[\frac{2x+5}{3x-7}\right]\)
- \(\displaystyle \frac{d}{dx}\left[\frac{x^2}{x^3+5}\right]\)
Applying the quotient rule for derivatives leads to each answer. You do not need to expand the square of the denominator, but you should simplify the numerator.
- \begin{align*} \frac{d}{dx}\left[\frac{2x+5}{3x-7}\right] &= \frac{(3x-7) \frac{d}{dx}[2x+5] - (2x+5)\frac{d}{dx}[3x-7]}{(3x-7)^2} \\ &= \frac{(3x-7)(2) - (2x+5)(3)}{(3x-7)^2} \\ &= \frac{6x-14-6x-15}{(3x-7)^2} \\ &= \frac{-29}{(3x-7)^2} \end{align*}
- \begin{align*} \frac{d}{dx}\left[\frac{x^2}{x^3+5}\right] &= \frac{(x^3+5)\frac{d}{dx}[x^2] -x^2 \frac{d}{dx}[x^3+5]}{(x^3+5)^2} \\ &= \frac{(x^3+5)(2x) - x^2(3x^2)}{(x^3+5)^2} \\ &= \frac{2x^4+10x-3x^4}{(x^3+5)^2} \\ &= \frac{-x^4+10x}{(x^3+5)^2} \end{align*}
Subsection 9.2.2 Related Rates
We often fall into a trap thinking that the rules of differentiation apply only to formulas. Some times, two or more quantities are added together to form a new quantity representing their sum. Other times, a quantity of interest is determined by multiplying the values of two measurements. The rules of differentiation apply to any setting where we are interested in how the rate of change a quantity relates to the rates of change of quantities with which it is related. If we know the instantaneous values and rates of change of these quantities, we can find the instantaneous rate of change of the new variable even when we do not know any formulas for our underlying variables.
Example 9.2.6.
Suppose \(y = t^2 f(t) - 3 g(t)\) and \(\displaystyle z = \frac{2f(t)}{g(t)+1}\text{,}\) where the functions \(f\) and \(g\) are not known explicitly. However, we do know the following values at specific times, as shown in a table. Find \(\frac{dy}{dt}\Big|_{2}\) and \(\frac{dz}{dt}\Big|_{4}\text{.}\)
\(t\) | \(0\) | \(1\) | \(2\) | \(3\) | \(4\) | \(5\) |
\(f(t)\) | \(3\) | \(1\) | \(5\) | \(2\) | \(-1\) | \(-3\) |
\(f'(t)\) | \(-2\) | \(4\) | \(-3\) | \(-3\) | \(2\) | \(6\) |
\(g(t)\) | \(1\) | \(3\) | \(5\) | \(6\) | \(4\) | \(2\) |
\(g'(t)\) | \(2\) | \(3\) | \(1\) | \(-1\) | \(-4\) | \(-2\) |
We start with what we know, the equation \(y = t^2 f(t) - 3 g(t)\text{.}\) We may not know the explicit formulas for \(f(t)\) or \(g(t)\text{,}\) but we do know the algebraic operations that put the formulas together. In this problem, \(t\) is the independent variable. The differentiation operator will therefore be \(\frac{d}{dt}\text{.}\)
The last operation used to form \(y\) is addition (i.e. subtraction) of \(t^2 f(t)\) and \(-3g(t)\text{.}\) The sum rule of derivatives 9.1.10 then allows us to write
The expression \(t^2 f(t)\) is a product of \(t^2\) and \(f(t)\text{,}\) so the product rule 9.1.11 tells us
Meanwhile, \(-3g(t)\) is a constant multiple 9.1.7 of \(g(t)\) so that
Putting all of these together in a single statement, we obtain
Now that we have the equation relating the different rates expressed as derivatives, we can use our data from the table to find actual instantaneous rates of change. When \(t=2\text{,}\) we find
In a similar way, we know \(\displaystyle z = \frac{2f(t)}{g(t)+1}\) is a quotient. The quotient rule tells us
When \(t=4\text{,}\) we find
We now consider examples of using related rates of change to find the instantaneous rate of change of a quantity that depends on other related variables. In each example, we will first recognize how related dependent variables are algebraically combined. Then we can use rules of differentiation to identify a new equation that relates their rates of change. This equation, in turn, allows us to solve for the unknown rate.
Subsubsection 9.2.2.1 A Physical Example of the Sum Rule
The sum rule for derivatives tells us that the derivative of a sum of two functions equals the sum of the individual derivatives. In the context of rates of change, this means that when a dependent variable is equal to the sum of two other dependent variables, then the rate of change of the new variable must equal the sum of the rates of change of the dependent variables being added.
Example 9.2.8.
A tank is being filled with water two supply hoses. At a particular instant, if the first hose is pumping water at a rate of 20 gal/min and the second hose is pumping water at a rate of 30 gal/min, at what rate is volume of water in the tank changing?
We know the intuitive solution to the problem is 50 gal/min. This is actually a consequence of the sum rule of derivatives. We can think of the water in the tank as having two components: \(W_1\text{,}\) the volume of water (gal) that was pumped by hose 1, and \(W_2\text{,}\) the volume of water (gal) that was pumped by hose 2. These two variables are functions of time \(t\) (min), although we do not know any formulas for these functions (and don't need to).
The rates of water flowing from the hoses correspond to derivatives:
The total volume of water in the tank at a given time \(t\) is the sum \(W(t)=W_1(t) + W_2(t)\text{.}\) By the sum rule of derivatives,
Technically, we should have a constant added to \(W\) that represents the initial amount of water in the tank and didn't come from either hose. Because the derivative of a constant is zero, this will not change the result.
Subsubsection 9.2.2.2 A Physical Example of the Product Rule
The sum rule for derivatives feels very intuitive. If a quantity is the sum of parts, then the total rate of change for the quantity is the sum of the rates of change for each of the parts. The product rule is less intuitive because we don't get to multiply rates of change when a quantity is a product. To illustrate this example, we focus on a geometric example on the area of a rectangle when the lengths of the sides are changing.
Example 9.2.9.
A city is in the shape of a rectangle with sides aligned with North-South and East-West lines. Suppose that the city is currently 5 miles east-to-west and 3 miles north-to-south and plans to expand to a size 8 miles east-to-west by 5 miles north-to-south over the next 10 years. What is the average rate of change of the total area in the city over the 10 years? If the borders were to move at a constant rate over those 10 years, what is the instantaneous rate of change of the total area of the city at the beginning and at the end of the 10 years?
The average rate of change of total area is calculated according to the usual formula. It does not follow the differentiation rules, which are about instantaneous rates of change. We let \(A\) represent the area of the city and \(t\) the time in years from now. The city currently has a total area of
After 10 years, the city will have a total area of
The change in area is \(\Delta A = A(10)-A(0) = 25 \: \hbox{mi}^2\) and the change in time is \(\Delta t = 10\) years. Consequently, the average rate of change of area is
To connect our intuition with functions and to prepare for the next calculations, let us introduce variables in addition to time \(t\) and total area \(A\text{.}\) The state of the city can be characterized more precisely with two more variables: the distance east-to-west, which we'll call the width \(W\) (mi), and the distance north-to-south, which we'll call the height \(H\) (mi). We think of \(W\text{,}\) \(H\) and \(A\) as being dependent variables as they are each a function of time \(t\text{.}\) They are related variables because the area always equals the product of \(W\) and \(H\text{:}\)
To find the instantaneous rates of change, we need to know how fast the width and height measurements are changing in time. Because the problem stated that these changed at a constant rate, we can use the average rates of change to compute the instantaneous rates:
Since the area \(A\) is the product of \(W\) and \(H\text{,}\) the product rule for derivatives will provide the instantaneous rate of change for area:
This equation is the related rates equation.
When \(t=0\) we have \(W(0)=5\) and \(H(0)=3\) so that
That is, at the beginning, the city is expanding at a rate of \(1.9 \: \hbox{mi}^2/\hbox{yr}\text{.}\) After 10 years, \(t=10\text{,}\) we have \(W(10)=8\) and \(H(10)=5\) so that
At the end of the 10 years, the city is expanding at a rate of \(3.1 \: \hbox{mi}^2/\hbox{yr}\text{.}\)
The picture of expanding area helps provide some intuition for why the product rule is the appropriate technique. If we consider the city after 6 months (\(t=0.5\)), both the width and the height have changed by a small amount, as shown in the figure below. The total change in area has two primary contributions, corresponding to long, skinny rectangles with areas \(W(0) \cdot \Delta H\) and \(\Delta W \cdot H(0)\text{,}\) and a very small rectangle with area \(\Delta W \cdot \Delta H\text{.}\) The product rule corresponds to the rate of change coming from the two primary contributions while the small rectangle leads to a term that has a limit of zero in the calculation of the derivative.
Subsubsection 9.2.2.3 A Physical Example of the Quotient Rule
Quotients often appear when working with densities, concentrations, or other ratios.
Example 9.2.10.
A salt-water solution is being formulated. At a particular instant, the solution consists of 10 L of water with 5 kg of salt. At that instant, water is being added at a rate of 0.5 L/s while salt is being added at a rate of 0.2 kg/s. What is the instantaneous rate of change of the concentration?
We start by identifying the variables that define the state of our system. The variables include the time \(t\text{,}\) measured in seconds (s), the total volume of water \(V\text{,}\) measured in liters (L), the total amount of salt in the water \(S\text{,}\) measured in kilograms (kg), and the concentration of salt water \(C\text{,}\) measured in kilograms per liter (kg/L). The variables \(V\text{,}\) \(S\) and \(C\) are functions of time \(t\) with an equation relating them by
The instantaneous rate of change is computed using the quotient rule for derivatives, giving us a related rates equation
The values at the instant in question are given by
Using these values in the quotient rule for derivatives, we have
That is, the concentration is changing at a rate of -0.005 kg salt per liter water per second. Alternatively, we could say that the concentration is decreasing at a rate of 0.005 kg/L/s.
Subsection 9.2.3 Summary
- When differentiating a formula, we must identify the last operation that acts on an expression. Last is determined according to the order of operations.
- The linear rules of differentiation include the constant multiple and sum rules. These feel more intuitive because differentiation occurs in place.
- The nonlinear rules of differentiation include the product and quotient rules. The derivative of a product consists of the sum of two terms, not just the product of the derivatives. THe derivative of a quotient involves subtraction of two terms and a denominator that is squared.
- Practice applying the rules until they are mastered. For example, try Derivative Practice on Algebraic Formulas.
- Rules of differentiation apply to any instantaneous rate of change, whether expressed as a function or not. Related rates are calculated by first expressing an equation that defines the relation between quantities. The rules of differentiation produce an equation relating the rates of those quantities.
Exercises 9.2.4 Exercises
Use the values of \(f(x)\) and \(g(x)\) and their derivatives from the following table to calculate the indicated derivative.
\(x\) | 0 | 1 | 2 | 3 |
\(f(x)\) | 2 | 5 | -3 | 4 |
\(g(x)\) | -2 | 1 | 6 | 5 |
\(f'(x)\) | 3 | 1 | 2 | -4 |
\(g'(x)\) | 4 | 7 | -1 | 2 |
1.
If \(h(x)=3f(x) + 2 g(x)\text{,}\) find \(h'(0)\text{.}\)
2.
If \(H(x)=x^2f(x) + 4\text{,}\) find \(H'(3)\text{.}\)
3.
If \(\displaystyle p(x)=\frac{3}{g(x)}\text{,}\) find \(p'(1)\text{.}\)
4.
If \(\displaystyle Q(x)=\frac{f(x)}{2g(x)}\text{,}\) find \(Q'(2)\text{.}\)
Related Rates
As you solve these related rates problems, practice clearly identifying the dependent variables and the independent variable. State the equation that relates these variables. Use the rules of differentiation to create an equation that relates the rates of change.
5.
A candle is lit at both ends. One end is burning at a rate of 1 cm/hour. The other end is burning at a rate of 2 cm/hour. What is the rate of change of the length of the candle?
6.
A population of birds on an island changes due to births, deaths, and migration of individuals. If the population has births occuring at a rate of 800 per year, deaths occuring at a rate of 720 per year, immigration of 100 per year and emigration of 150 per year, what is the overall rate of change of the population?
7.
A movie company's income is based on two money streams: direct online rental and DVD sales. Suppose that the company receives $2.50 for each online rental and $6.00 for each sold DVD. If the company rents movies at a rate of 2000 movies per month and sells DVDs at a rate of 1500 DVDs per month, what is the rate of income?
8.
The concentration of an antibiotic drug in the bloodstream is affected by the rate of administration and by the rate of metabolism. Suppose that an individual has 5 liters of blood and the drug is being administered by injection at a constant rate of 0.3 grams per hour. In addition, the body removes the drug by metabolism at an instantaneous rate (grams per hour) that is proportional to the total amount (mass in grams) of the drug in the body at that instant, where the proportionality constant is 0.8.
Let \(M\) represent the total mass (grams) of the drug in the body, and let \(C\) represent the concentration (grams per liter) of the drug. Let \(t\) measure the time (hours) since the treatment began.
- State an equation relating \(\frac{dM}{dt}\) and \(M\) based on the description of injection and metabolism.
- State an equation relating \(M\) and \(C\text{.}\) What is the corresponding related rates equation?
- What is \(\frac{dC}{dt}\) at a particular moment when \(C = 0.04\) grams per liter?
- An equilibrium has been reached if \(\frac{dC}{dt}=0\text{.}\) What is the equilibrium concentration? That is, find \(C\) so that \(\frac{dC}{dt}=0\text{.}\)
9.
A city has a population of 40,000 and a total debt of $54 million. If the city's population is growing at a rate of 1,000 per year and is borrowing additional money at a rate of $2 million per year, what is the rate of change of the per capita debt (total debt divided by population)?
10.
A company has 300 employees that earn an average annual salary of $40,000 per employee. If the company's workforce is growing at a rate of 20 employees per year and the average annual salary is increases at a rate of $500 per employee per year. What is the rate of change of total salary costs for the company?
11.
Potential energy \(P\) of an object raised above the ground is defined as the product of the mass \(m\) of the object times the height \(h\) above the ground times the gravitational constant \(g = 9.8\) m⁄s2. A bag of sand weighing 4 kilograms is at a height of 2 meters. If the bag is losing 0.05 kg of sand per second and is being lifted at a rate of 2 cm per second, what is the rate of change of the potential energy? Note: 1 joule of energy is the same as 1 kg·m·s2.
12.
A city has a population of 40,000 and a total debt of $54 million. If the city's population is growing at a rate of 1,000 per year and is borrowing additional money at a rate of $2 million per year, what is the rate of change of the per capita debt (total debt divided by population)?