Differentiate a quotient
Salt in a growing tank
A tank holds salt water. After \(t\) hours it holds \(S = 3t + 6\) grams of salt in \(V = t + 3\) liters of water, so the concentration is \(C = S/V\) grams per liter. The top graph shows \(S\) and \(V\), and the bottom graph shows \(C\).
Set \(t\) to 1. The tank holds 9 grams in 4 liters, so \(C = 2.25\). Salt arrives at 3 grams per hour, and water arrives at 1 liter per hour.
The orange tangent shows how fast \(C\) changes. A dotted line runs one hour to the right of the point, and two bars stand at its end. New salt alone would raise \(C\) by \(3 \div 4 = 0.75\) in one hour, which is the green bar.
Each hour the volume grows by one fourth of itself, so the water lowers \(C\) by one fourth of 2.25, the red bar of 0.5625.
The red bar ends on the tangent, so the slope of \(C\) is the green bar minus the red bar: \(0.75 - 0.5625 = \tfrac{3}{16}\). The ratio of the two rates, \(3 \div 1 = 3\), is not this slope.
Any ratio
The numerator \(f\) and the denominator \(g\) can be any two functions, and \(g\) stays above 0. The top graph shows \(f\) as a solid line and \(g\) as a dashed line, and the bottom graph shows the ratio \(Q = f/g\).
Drag \(x\). The green bar is the rise of \(Q\) from the growth of \(f\), and the red bar is the fall from the growth of \(g\).
The slope of \(Q\) is the green bar minus the red bar. Press the first button: \(g\) grows faster, the red bar becomes longer than the green bar, and the slope becomes negative.
Growth of the top raises a ratio, and growth of the bottom lowers it, so the rule has a minus sign.
Notation
Name the numerator \(f\) and the denominator \(g\). The ratio is \(Q = f/g\), and \(g\) is not 0.
\[Q = \frac{f}{g}\]Multiply both sides by \(g\). Then \(f\) is the product of \(Q\) and \(g\), so the product rule gives \(f'\).
\[f = Q\,g \quad\Rightarrow\quad f' = Q'\,g + Q\,g'\]This step assumes that \(Q\) has a derivative. Textbooks prove that it does.
Subtract \(Q\,g'\) from both sides, and divide by \(g\). The first part is the green bar, and the second part is the red bar.
\[\cy{Q'} = \cg{\frac{f'}{g}} - \cr{\frac{Q\,g'}{g}}\]Replace \(Q\) with \(f/g\). Then multiply the top and the bottom of \(f'/g\) by \(g\), so both parts have the bottom \(g^2\).
\[\cy{Q'} = \frac{f'}{g} - \frac{f\,g'}{g^2} = \frac{f'g - fg'}{g^2}\]The rule is the derivative of the top times the bottom, minus the top times the derivative of the bottom, all over the bottom squared.
\[\left(\frac{f}{g}\right)' = \frac{f'g - fg'}{g^2}\]The rule needs \(f\) and \(g\) to have derivatives at \(x\). It also needs \(g(x) \ne 0\).
When it fails
If \(g(x) = 0\), the ratio has no value at \(x\), so the curve has a gap there and no point for a tangent.
The rule divides by \(g^2\), which is 0 at that input. Use the rule only where \(g(x)\) is not 0.
Example 1: a rational function
Find \(y'\) for \(y = \dfrac{3x - 2}{x^2 + 1}\).
The top \(3x - 2\) has the derivative 3, and the bottom \(x^2 + 1\) has the derivative \(2x\). The bottom is at least 1, so the rule applies at every \(x\).
Substitute the top, the bottom and their derivatives into the rule.
\[y' = \frac{3(x^2+1) - (3x-2)(2x)}{(x^2+1)^2}\]Multiply out the top and collect like terms.
\[\begin{aligned}\text{top} &= 3x^2 + 3 - 6x^2 + 4x \\ &= -3x^2 + 4x + 3 \\ y' &= \frac{-3x^2 + 4x + 3}{(x^2+1)^2}\end{aligned}\]At \(x = 0\) the formula gives \(y' = 3\). The orange tangent rises with slope 3, and the orange bar on the lower graph is 3 high.
Example 2: the order of the subtraction
Find the slope of \(y = \dfrac{x^3}{x - 1}\) at \(x = 2\). The function is defined for \(x \ne 1\).
At \(x = 2\) the top \(x^3\) is 8 and its derivative \(3x^2\) is 12. The bottom \(x - 1\) is 1 there, not 0, and its derivative is 1.
A tempting wrong move: Subtract in the other order.
\[y'(2) = \frac{8\cdot 1 - 12\cdot 1}{1^2} = -4\]The curve rises at \(x = 2\), from 8 there to 13.5 at \(x = 3\). The red line of slope \(-4\) falls, so it crosses the curve instead of touching it.
Put the derivative of the top times the bottom first. The orange tangent rises with slope 4.
\[y'(2) = \frac{12\cdot 1 - 8\cdot 1}{1^2} = \cy{4}\]
Practice
Find \(y'\) for \(y = \dfrac{x^2 - 4}{x^2 + 4}\).
Put the derivative of the top times the bottom first. The curve rises for \(x > 0\), so \(y'\) is positive there.
Solution
The top and the bottom both have the derivative \(2x\).
\[y' = \frac{2x(x^2+4) - (x^2-4)(2x)}{(x^2+4)^2}\]Factor \(2x\) from the top. The bracket is \((x^2+4) - (x^2-4) = 8\), so the top is \(16x\).
\[y' = \frac{16x}{(x^2+4)^2}\]For \(x > 0\) the result is positive. At \(x = 0\) it is 0, where the curve has its lowest point.
Questions
The figure shows the ratio \(Q = f/g\) of \(f(x) = 2x + 1\) and \(g(x) = x + 2\). Questions 1 and 2 use the graph. Question 3 needs a calculation.
At the marked point \(x = 1\), \(f = 3\), \(f' = 2\), \(g = 3\) and \(g' = 1\). What is \(Q'(1)\)?
- \(\tfrac13\)
- \(-\tfrac13\)
- 2
- 1
Answer
\(\tfrac13\)
The marked point is now \(x = -3\), to the left of the gap at \(x = -2\). What is the sign of \(Q'(-3)\)?
- Positive
- Negative, because \(g(-3) = -1\) is negative
- It does not exist, because \(Q\) has no value at \(-2\)
Answer
Positive
Find \(h'(x)\) for \(h(x) = \dfrac{x^2}{3x - 1}\).
- \(\dfrac{3x^2 - 2x}{(3x-1)^2}\)
- \(\dfrac{-3x^2 + 2x}{(3x-1)^2}\)
- \(\dfrac{3x^2 - 2x}{3x - 1}\)
- \(\dfrac{2x}{3}\)
Answer
\(\dfrac{3x^2 - 2x}{(3x-1)^2}\)
Summary
You write the derivative of the top times the bottom, subtract the top times the derivative of the bottom, and divide by the bottom squared.
The rule works because a ratio rises when its top grows and falls when its bottom grows.
You use it for a ratio of two functions, at an input where the bottom is not 0.
This is one of four skills in topic 2.9 of Which & Why: AP Calculus.