SubsectionThe Product Rule
As part (b) of Example2.52 shows, it is not true in general that the derivative of a product of two functions is the product of the derivatives of those functions. To see why this is the case, we consider a situation involving functions with physical context.
Example2.53
Say that an investor is regularly purchasing stock in a particular company. Let \(N(t)\) represent the number of shares owned on day \(t\text{,}\) where \(t = 0\) represents the first day on which shares were purchased. Let \(S(t)\) give the value of one share of the stock on day \(t\text{;}\) note that the units on \(S(t)\) are dollars per share. To compute the total value of the stock on day \(t\text{,}\) we take the product
\begin{equation*}
V(t) = N(t) \, \text{shares} \cdot S(t) \, \text{dollars per share}\text{,}
\end{equation*}
Observe that over time, both the number of shares and the value of a given share will vary. The derivative \(N'(t)\) measures the rate at which the number of shares is changing, while \(S'(t)\) measures the rate at which the value per share is changing. How do these respective rates of change affect the rate of change of the total value function?
To help us understand the relationship among changes in \(N\text{,}\) \(S\text{,}\) and \(V\text{,}\) let's consider some specific data.
- Suppose that on day 100, the investor owns 520 shares of stock and the stock's current value is $27.50 per share. This tells us that \(N(100) = 520\) and \(S(100) = 27.50\text{.}\)
- On day 100, the investor purchases an additional 12 shares (so the number of shares held is rising at a rate of 12 shares per day).
- On that same day the price of the stock is rising at a rate of 0.75 dollars per share per day.
In calculus notation, the latter two facts tell us that \(N'(100) = 12\) (shares per day) and \(S'(100) = 0.75\) (dollars per share per day). At what rate is the value of the investor's total holdings changing on day 100?
Observe that the increase in total value comes from two sources: the growing number of shares and the rising value of each share.
-
If only the number of shares is increasing (and the value of each share is constant), the rate at which the total value would rise is the product of the rate at which the number of shares is changing and the current value of the shares. That is, the rate at which the total value would change when the share value is constant is given by
\begin{equation*}
N'(100) \cdot S(100) = 12 \, \frac{\text{shares}}{\text{day}} \cdot 27.50 \, \frac{\text{dollars}}{\text{share}} = 330 \, \frac{\text{dollars} }{\text{day} }\text{.}
\end{equation*}
Note particularly how the units make sense and show the rate at which the total value \(V\) is changing, measured in dollars per day.
-
If instead the number of shares is constant, but the value of each share is rising, the rate at which the total value would rise is the product of the number of shares and the rate of change of share value. In this case, the total value is rising at a rate of
\begin{equation*}
N(100) \cdot S'(100) = 520 \, \text{shares} \cdot 0.75 \, \frac{\text{dollars per share} }{\text{day} } = 390 \, \frac{\text{dollars} }{\text{day} }\text{.}
\end{equation*}
-
Of course, when both the number of shares and the value of each share are changing, we have to include both of these sources. In that case the rate at which the total value is rising is
\begin{equation*}
V'(100) = N'(100) \cdot S(100) + N(100) \cdot S'(100) = 330 + 390 = 720 \, \frac{\text{dollars} }{\text{day} }\text{.}
\end{equation*}
We expect the total value of the investor's holdings to rise by about $720 on the 100th day.
Next, we expand our perspective from the specific example above to the more general and abstract setting of a product \(P\) of two differentiable functions, \(f\) and \(g\text{.}\) If \(P(x) = f(x) \cdot g(x)\text{,}\) our work above suggests that \(P'(x) = f'(x) g(x) + f(x) g'(x)\text{.}\) Indeed, a formal proof using the limit definition of the derivative can be given to show that the following rule, called the product rule, holds in general.
Product Rule
If \(f\) and \(g\) are differentiable functions, then their product \(P(x) = f(x) \cdot g(x)\) is also a differentiable function, and
\begin{equation*}
P'(x) = f'(x) g(x) + f(x) g'(x)\text{.}
\end{equation*}
In light of Example2.53 involving shares of stock, the product rule also makes sense intuitively: the rate of change of \(P\) should take into account both how fast \(f\) and \(g\) are changing, as well as how large \(f\) and \(g\) are at the point of interest. In words, the product rule says: if \(P\) is the product of two functions \(f\) (the first function) and \(g\) (the second), then the derivative of \(P\) is the derivative of the first times the second, plus the first times the derivative of the second.
It is often a helpful mental exercise to say this phrasing aloud when executing the product rule.
Example2.54
If \(P(x) = (x^3+3x)\cdot (5x^2+10x+4)\text{,}\) we can use the product rule to differentiate \(P\text{.}\) The first function is \((x^3+3x)\) and the second function is \((5x^2+10x+4)\text{.}\) By the product rule, \(P'\) will be given by the derivative of the first, \((3x^2+3)\text{,}\) times the second, \((5x^2+10x+4)\text{,}\) plus the first, \((x^3+3x)\text{,}\) times the derivative of the second, \((10x+10)\text{.}\) That is,
\begin{equation*}
P'(x) = (3x^2+3)(5x^2+10x+4)+(x^3+3x)(10x+10)\text{.}
\end{equation*}
Example2.55
Use the product rule to answer each of the questions below. Throughout, be sure to carefully label any derivative you find by name. It is not necessary to algebraically simplify any of the derivatives you compute.
Let \(\displaystyle m(w)=(3w^3+4w^7)(5w^9)\text{.}\) Find \(m'(w)\text{.}\)
Let \(\displaystyle h(t) = (6t^2+3t+2)\left(\sqrt{t}-\frac{2}{t}\right)\text{.}\) Find \(h'(t)\text{.}\)
Determine the slope of the tangent line to the curve \(y = f(x)\) at the point where \(a = 1\) if \(f\) is given by the rule \(f(x) = (4x^3+6x)(3x^3-5x^2+4)\text{.}\)
Find an equation for the tangent line \(L\) to the graph of \(y = g(x)\) at the point where \(a = 4\) if \(g\) is given by the rule \(\displaystyle g(x) = (x^2 + x) \left(\frac{1}{\sqrt{x}}\right)\text{.}\)
Answer
\(\displaystyle m'(w) = (9w^2+28w^6) \cdot (5w^9) + (3w^3+4w^7)\cdot 45w^8\text{.}\)
\(\displaystyle h'(t) =(12t+3) \cdot \left(\sqrt{t}-\frac{2}{t}\right) + (6t^2+3t+2)\cdot \left(\frac{1}{2}t^{-1/2}+2t^{-2}\right)\text{.}\)
\(\displaystyle f'(1) = 26\text{.}\)
\(\displaystyle y=-1.75(x+4)+10\text{.}\)
Solution
-
By the product rule,
\begin{equation*}
m'(w) = (9w^2+28w^6) \cdot (5w^9) + (3w^3+4w^7)\cdot 45w^8\text{.}
\end{equation*}
-
By the product rule,
\begin{equation*}
h'(t) = (12t+3) \cdot \left(\sqrt{t}-\frac{2}{t}\right) + (6t^2+3t+2)\cdot \left(\frac{1}{2}t^{-1/2}+2t^{-2}\right)\text{.}
\end{equation*}
To determine the slope of the tangent line at \(a = 1\text{,}\) we want to find \(f'(1)\text{.}\) Since \(f(x) = (4x^3+6x)(3x^3-5x^2+4)\text{,}\) the product rule tells us that \(\displaystyle f'(x) = (12x^2+6)\cdot(3x^3-5x^2+4)+(4x^3+6x)\cdot(9x^2-10x)\text{.}\) Thus, \(f'(1) = (12(1)^2+6)\cdot(3(1)^3-5(1)^2+4)+(4(1)^3+6(1))\cdot(9(1)^2-10(1))=26\text{.}\)
-
First, observe that \(\displaystyle g(4) = ((4)^2 +4) \cdot \left(\frac{1}{\sqrt{4}}\right) = 10\text{,}\) so we are looking for the tangent line to \(g\) at the point \((-1,0)\text{.}\) Furthermore, by the product rule, \(\displaystyle g'(x) = (2x + 1) \cdot \left(\frac{1}{\sqrt{x}}\right) + (x^2+x)\cdot \left(\frac{-1}{2}x^{-3/2}\right)\text{,}\) and hence
\begin{align*}
g'(4) \amp= (2(-1)+ 1) \cdot \left(\frac{1}{\sqrt{4}}\right) + ((4)^2 +4)\cdot \left(\frac{-1}{2}(4)^{-3/2}\right) \\
\amp= \frac{-1}{2} +(-10)((4)^{-3/2})= -1.75\text{.}
\end{align*}
Therefore, the tangent line is \(y=-1.75(x+4)+10\text{.}\)
SubsectionThe Quotient Rule
Because quotients and products are closely linked, we can use the product rule to understand how to take the derivative of a quotient. Let \(Q(x)\) be defined by \(\displaystyle Q(x) = \frac{f(x)}{g(x)}\text{,}\) where \(f\) and \(g\) are both differentiable functions. It turns out that \(Q\) is differentiable everywhere that \(g(x) \ne 0\text{.}\) We would like a formula for \(Q'\) in terms of \(f\text{,}\) \(g\text{,}\) \(f'\text{,}\) and \(g'\text{.}\) Multiplying both sides of the equation \(\displaystyle Q = \frac{f}{g}\) by \(g\text{,}\) we observe that
\begin{equation*}
f(x) = Q(x) \cdot g(x)\text{.}
\end{equation*}
Now we can use the product rule to differentiate \(f\text{:}\)
\begin{equation*}
f'(x) = Q'(x) g(x) + Q(x)g'(x)\text{.}
\end{equation*}
We want to know a formula for \(Q'\text{,}\) so we solve this equation for \(Q'(x)\text{.}\) Then
\begin{equation*}
Q'(x) g(x) = f'(x) - Q(x) g'(x)\text{,}
\end{equation*}
and dividing both sides by \(g(x)\text{,}\) we have
\begin{equation*}
Q'(x) = \frac{f'(x) - Q(x) g'(x)}{g(x)}\text{.}
\end{equation*}
Finally, we recall that \(Q(x) = \frac{f(x)}{g(x)}\text{.}\) Substituting this expression in the preceding equation, we have
\begin{align*}
Q'(x) =\mathstrut \amp \frac{f'(x) - \frac{f(x)}{g(x)} g'(x)}{g(x)}\\
=\mathstrut \amp \frac{f'(x) - \frac{f(x)}{g(x)} g'(x)}{g(x)} \cdot \frac{g(x)}{g(x)}\\
=\mathstrut \amp \frac{f'(x)g(x) - f(x) g'(x)}{[g(x)]^2}\text{.}
\end{align*}
This calculation gives us the quotient rule.
Quotient Rule
If \(f\) and \(g\) are differentiable functions, then their quotient \(Q(x) = \frac{f(x)}{g(x)}\) is also a differentiable function for all \(x\) where \(g(x) \ne 0\text{,}\) and
\begin{equation*}
Q'(x) = \frac{f'(x)g(x) - f(x) g'(x)}{[g(x)]^2}\text{.}
\end{equation*}
As with the product rule, it can be helpful to think of the quotient rule verbally. If a function \(Q\) is the quotient of a top function \(f\) and a bottom function \(g\text{,}\) then \(Q'\) is given by the derivative of the top times the bottom, minus the top times the derivative of the bottom, all over the bottom squared.
Example2.56
If \(\displaystyle Q(t) = \frac{t^2+4t}{3t+5}\text{,}\) we call \(t^2+4t\) the top function and \(3t+5\) the bottom function. By the quotient rule, \(Q'\) is given by the derivative of the top, \((2t+4)\text{,}\) times the bottom, \((3t+5)\text{,}\) minus the top, \((t^2+4t)\text{,}\) times the derivative of the bottom, \(3\text{,}\) all over the bottom squared, \((3t+4)^2\text{.}\) That is,
\begin{equation*}
Q'(t) = \frac{(2t+4)(3t+5)-(t^2+4t)(3)}{(3t+5)^2}\text{.}
\end{equation*}
Note that if you choose to simplify, only simplify the numerator.
\begin{equation*}
Q'(t) = \frac{(2t+4)(3t+5)-(t^2+4t)(3)}{(3t+5)^2}=\frac{6t^2+22t+20-(3t^2+12t)}{(3t+5)^2}=\frac{3t^2+10t+20}{(3t+5)^2}\text{.}
\end{equation*}
In general, we must be careful in doing any such simplification, as we don't want to follow a correct execution of the quotient rule with an algebraic error.
Example2.57
Use the quotient rule to answer each of the questions below. Throughout, be sure to carefully label any derivative you find by name. That is, if you're given a formula for \(f(x)\text{,}\) clearly label the formula you find for \(f'(x)\text{.}\) It is not necessary to algebraically simplify any of the derivatives you compute.
Let \(\displaystyle r(z)=\frac{2z^3}{z^4 + 1}\text{.}\) Find \(r'(z)\text{.}\)
Let \(\displaystyle v(t) = \frac{10t^2+4t+5}{8t^3+3t}\text{.}\) Find \(v'(t)\text{.}\)
Determine the slope of the tangent line to the curve \(y=R(x)\) at the point where \(x=0\text{,}\) if \(\displaystyle R(x) = \frac{x^2 - 2x - 8}{x^2 - 9}\text{.}\)
Answer
\(\displaystyle r'(z)=\frac{(6z^2)(z^4+1) - 2z^3(4z^3)}{(z^4 + 1)^2}\text{.}\)
\(\displaystyle v'(t) = \frac{(20t+4)(8t^3+3t)-(10t^2+4t+5)(24t^2+3)}{(8t^3+3t)^2}\text{.}\)
\(\displaystyle R'(0) = \frac{2}{9}\text{.}\)
Solution
-
By the quotient rule,
\begin{equation*}
r'(z)=\frac{(6z^2)(z^4+1) - 2z^3(4z^3)}{(z^4 + 1)^2}\text{.}
\end{equation*}
-
By the quotient rule,
\begin{equation*}
v'(t) = \frac{(20t+4)(8t^3+3t)-(10t^2+4t+5)(24t^2+3)}{(8t^3+3t)^2}\text{.}
\end{equation*}
-
We first compute \(R'(x)\text{.}\) By the quotient rule,
\begin{equation*}
R'(x) = \frac{(2x - 2)(x^2 - 9) - (x^2 - 2x - 8)(2x)}{(x^2 - 9)^2}\text{.}
\end{equation*}
From this, it follows that \(\displaystyle R'(0) = \frac{(-2)(-9)-(-8)(0)}{(-9)^2} = \frac{2}{9}\text{,}\) which is the slope of the tangent line to the curve at the point where \(x = 0\text{.}\)
SubsectionCombining Rules
In order to apply the derivative shortcut rules correctly we must recognize the fundamental structure of a function.
Example2.58
Determine the derivative of the function
\begin{equation*}
f(x) = 2x(x^3+3x) + \frac{x^2}{x + 2}\text{.}
\end{equation*}
How do we decide which rules to apply? Our first task is to recognize the structure of the function. This function \(f\) is a sum of two slightly less complicated functions, so we can apply the sum rule to get
\begin{align*}
f'(x) =\mathstrut \amp \frac{d}{dx} \left[ 2x(x^3+3x) + \frac{x^2}{x + 2} \right]\\
=\mathstrut \amp \frac{d}{dx} \left[ 2x(x^3+3x) \right] + \frac{d}{dx}\left[ \frac{x^2}{x + 2} \right]\text{.}
\end{align*}
Now, the left-hand term above is a product, so the product rule is needed there, while the right-hand term is a quotient, so the quotient rule is required. Applying these rules respectively, we find that
\begin{align*}
f'(x) =\mathstrut \amp \left( 2(x^3+3x)+2x (3x^2+3x) \right) + \frac{ 2x(x + 2) - x^2(1)}{(x + 2)^2}\\
=\mathstrut \amp 2(x^3+3x)+2x(3x^2+3x)+ \frac{2x(x+2) -x^2}{(x + 2)^2}\text{.}
\end{align*}
Example2.59
Differentiate
\begin{equation*}
s(y) = \frac{(4y+3)(y^2+3y)}{y^2 + 1}\text{.}
\end{equation*}
The function \(s\) is a quotient of two simpler functions, so the quotient rule will be needed. To begin, we set up the quotient rule and use the notation \(\frac{d}{dy}\) to indicate the derivatives of the numerator and denominator. Thus,
\begin{equation*}
s'(y) = \frac{\frac{d}{dy}\left[ (4y+3)(y^2+3y) \right]\cdot(y^2 + 1) -(4y+3)(y^2+3y) \cdot \frac{d}{dy}\left[y^2 + 1 \right]}{(y^2 + 1)^2}\text{.}
\end{equation*}
Now, there remain two derivatives to calculate. The first one, \(\frac{d}{dy}\left[ (4y+3)(y^2+3y) \right]\) calls for use of the product rule, while the second, \(\frac{d}{dy}\left[y^2 + 1 \right]\) needs only the sum rule. Applying these rules, we now have
\begin{equation*}
s'(y) = \frac{[4(y^2+3y)+(4y+3)(2y+3)](y^2 + 1) - (4y+3)(y^2+3y)[2y]}{(y^2 + 1)^2}\text{.}
\end{equation*}
While some simplification is possible, we are content to leave \(s'(y)\) in its current form.
Success in applying derivative rules begins with recognizing the structure of the function, followed by the careful and diligent application of the relevant derivative rules. The best way to become proficient at this process is through continuous practice!
As the algebraic complexity of the functions we are able to differentiate continues to increase, it is important to remember that the meaning of the derivative remains the same. Regardless of the structure of the function \(f\text{,}\) the value of \(f'(a)\) tells us the instantaneous rate of change of \(f\) with respect to \(x\) at the moment \(x = a\text{,}\) as well as the slope of the tangent line to \(y = f(x)\) at the point \((a,f(a))\text{.}\)