The quotient rule
The product rule gives the derivative of f times g. What is the derivative of f divided by g, and where do its minus sign and its square come from?
Where you are 13 in Derivatives
Why this exists
The basic rules split a quotient only when the bottom is a single power of x. A function such as \dfrac{2x + 3}{x^2 + 1} cannot be split that way, and the product rule, (fg)' = f'g + fg', handles products, not quotients.
The first guess, that the derivative of a quotient is the quotient of the derivatives, fails at once. Take f(x) = x^2 and g(x) = x. For x \ne 0 the quotient is \displaystyle \frac{f(x)}{g(x)} = x, whose derivative is 1, while \displaystyle \frac{f'(x)}{g'(x)} = \frac{2x}{1} = 2x. The two agree only at x = \tfrac{1}{2}. This lesson finds the correct rule, and finds it from the product rule.
Definition
The quotient rule. If f and g are differentiable at x and g(x) \ne 0, then \displaystyle \frac{f}{g} is differentiable at x and
In words: the derivative of the top times the bottom, minus the top times the derivative of the bottom, all over the bottom squared. Unlike the product rule, the order matters: subtraction is not commutative, and swapping the two terms changes the sign. In Leibniz notation, with u and v functions of x,
The special case f = 1 is the reciprocal rule: \left(\dfrac{1}{g}\right)' = -\dfrac{g'}{g^2} wherever g is differentiable and not 0.
Intuition
Start with the reciprocal. Where g is positive and rising, \displaystyle \frac{1}{g} is falling, so the derivative of \displaystyle \frac{1}{g} must have the sign opposite to g'. That is the minus sign. The size of the change depends on how large g already is: when g is near 2, a small change \Delta g moves \displaystyle \frac{1}{g} by about \displaystyle \frac{\Delta g}{4}, while near 10 it moves it by only about \displaystyle \frac{\Delta g}{100}. That is the g^2 underneath.
A second picture uses rates in proportion to size. For positive f and g, divide the quotient rule by \displaystyle \frac{f}{g}:
The product rule, divided the same way, says that relative rates add: \displaystyle \frac{(fg)'}{fg} = \frac{f'}{f} + \frac{g'}{g}. For a quotient they subtract. If the top grows 3\% per unit of time and the bottom 5\%, the quotient shrinks at about 2\%. Example 6 reads a rate this way.
Results
Quotient rule. If f and g are differentiable at x and g(x) \ne 0, then \left(\dfrac{f}{g}\right)'(x) = \dfrac{f'(x)g(x) - f(x)g'(x)}{g(x)^2}.
Reciprocal rule. \left(\dfrac{1}{g}\right)'(x) = -\dfrac{g'(x)}{g(x)^2}, under the same hypotheses on g. A constant on top just multiplies: \left(\dfrac{c}{g}\right)' = -\dfrac{c\,g'}{g^2}.
Negative powers, a check. For a positive integer n and x \ne 0, the reciprocal rule with g(x) = x^n gives
That is the power rule \displaystyle \frac{d}{dx}\big[x^r\big] = rx^{r-1} with r = -n, which the power rule lesson proved from the definition. Two different routes give the same formula.
Why it is true
The reciprocal, from the definition. Suppose g is differentiable at x and g(x) \ne 0. Since g is differentiable at x it is continuous there, as the lesson on differentiability proves, so g(x + h) \to g(x) as h \to 0. In particular g(x + h) \ne 0 for every small enough h, and the difference quotient of \displaystyle \frac{1}{g} is defined. Over the common denominator,
As h \to 0 the first factor tends to g'(x), and by continuity the second tends to \displaystyle \frac{1}{g(x)^2}, a number because g(x) \ne 0. The product law for limits gives \displaystyle \left(\frac{1}{g}\right)'(x) = -\frac{g'(x)}{g(x)^2}.
The quotient, from the product rule. Write \displaystyle \frac{f}{g} = f \cdot \frac{1}{g}. Both factors are differentiable at x, the second by the step above, so the product rule applies:
A direct proof also exists. Put \displaystyle \frac{f(x + h)}{g(x + h)} - \frac{f(x)}{g(x)} over the common denominator g(x + h)g(x); its numerator is f(x + h)g(x) - f(x)g(x + h). Adding and subtracting the middle term f(x)g(x), as in the product rule’s proof, turns that numerator into
Dividing by h and letting h \to 0 gives \displaystyle \frac{f'(x)g(x) - f(x)g'(x)}{g(x)^2}, again using the continuity of g for the denominator.
Worked examples
A rational function and its level points
Find f'(x) for f(x) = \dfrac{2x + 3}{x^2 + 1}, and find where the graph has a horizontal tangent.
SolutionThe bottom x^2 + 1 is never 0, so the rule applies at every x. With top 2x + 3 (derivative 2) and bottom x^2 + 1 (derivative 2x),
A fraction is 0 exactly when its top is 0 and its bottom is not. Here -2x^2 - 6x + 2 = 0 is x^2 + 3x - 1 = 0, and the quadratic formula gives \displaystyle x = \dfrac{-3 \pm \sqrt{13}}{2}, about 0.303 and -3.303. The bottom of f' is left squared and unexpanded: it is positive, and that is all the sign of f' needs.
Simplify first, or not?
Find the derivative of (a) p(x) = \dfrac{x^2 - 9}{x - 3}, (b) r(x) = \dfrac{7}{x^2 + 3x}, (c) s(x) = \dfrac{x^3 + 2x}{5}.
Solution(a) For x \ne 3 the top factors and p(x) = x + 3, so p'(x) = 1 for every x \ne 3. The quotient rule agrees, with more writing:
At x = 3 the function p is undefined, so it has no derivative there, however simple x + 3 looks.
(b) The top is constant, so the reciprocal rule with c = 7 is the short route: r'(x) = -\dfrac{7(2x + 3)}{(x^2 + 3x)^2}, for x \ne 0 and x \ne -3.
(c) The bottom is constant, so this is a constant multiple, not a quotient that needs the rule: s'(x) = \dfrac{3x^2 + 2}{5}.
Reach for the quotient rule when both top and bottom vary and the fraction does not cancel or split.
Quotients with exponentials
Using \dfrac{d}{dx}\big[e^x\big] = e^x and \dfrac{d}{dx}\big[a^x\big] = a^x \ln a from derivatives of exponential functions, differentiate (a) y = \dfrac{e^x}{x + 1} and (b) g(x) = \dfrac{2^x}{2^x + 1}. Find g'(0).
Solution(a) For x \ne -1,
Since e^x > 0, the derivative is 0 only at x = 0, negative for x < 0 (with x \ne -1) and positive for x > 0.
(b) The bottom 2^x + 1 is always positive. With top and bottom both having derivative 2^x \ln 2,
The 2^x \cdot 2^x terms cancel. Every factor is positive, so the graph of g rises everywhere, a reading of the sign that Increasing, decreasing, constant, positive and negative intervals makes exact. At 0: g'(0) = \dfrac{\ln 2}{4} \approx 0.1733.
Values from a table
The functions f and g are differentiable, with f(-1) = 6, f'(-1) = 2, g(-1) = 3 and g'(-1) = -4. Find the derivative at x = -1 of (a) \dfrac{f}{g}, (b) \dfrac{g}{f}, (c) \dfrac{1}{g}.
Solution(a) Top f, bottom g:
(b) Now g is the top, so the roles swap:
The two numerators are negatives of each other, and the denominators differ. Getting the top and bottom straight is the whole content of the rule.
(c) By the reciprocal rule, \left(\dfrac{1}{g}\right)'(-1) = -\dfrac{-4}{3^2} = \dfrac{4}{9}. The quotient of the derivatives, \displaystyle \frac{2}{-4}, matches none of these.
A tangent line to a quotient
Find the tangent line to y = \dfrac{4x}{x^2 + 4} at x = 1, and the points where the tangent is horizontal.
SolutionThe quotient rule gives
At x = 1: \displaystyle y = \frac{4}{5} and the slope is \displaystyle \frac{12}{25}. As in tangent lines, the line is
The slope is 0 where 16 - 4x^2 = 0, at x = 2 and x = -2, giving the points (2, 1) and (-2, -1).
Mebrat’s average order
Mebrat runs a 3D printing studio. In week 8 her sales are 4{,}800 dollars per week, rising by 120 dollars per week each week, and she fills 160 orders per week, a number rising by 8 orders per week each week. Is the average dollar value of an order rising or falling?
SolutionLet S(t) be sales in dollars per week and N(t) orders per week, so the average order is \displaystyle A(t) = \frac{S(t)}{N(t)} dollars per order. With S(8) = 4800, S'(8) = 120, N(8) = 160 and N'(8) = 8,
The average order, now A(8) = 30 dollars, is falling by 0.75 dollars per order each week, although sales are rising. The relative rates explain why: sales grow by \displaystyle \frac{120}{4800} = 2.5\% per week and orders by \displaystyle \frac{8}{160} = 5\%, so the average falls by 2.5\% of 30 dollars per week, which is 0.75 dollars.
Yohannes’s cost per part
Yohannes, who prices the studio’s jobs, models the cost of a run of q parts as C(q) = 400 + 3q + 0.01q^2 dollars. The cost per part is \displaystyle A(q) = \frac{C(q)}{q}. Find A'(100), and find the run size where A'(q) = 0.
SolutionThe quotient rule with top C and bottom q gives a useful general form:
So the cost per part falls when C'(q), the cost of one more part, is below the current cost per part, and rises when it is above. Here C'(q) = 3 + 0.02q, and
At q = 100: \displaystyle A'(100) = \frac{100 - 400}{10{,}000} = -0.03 dollars per part, per additional part. Splitting first, \displaystyle A(q) = \frac{400}{q} + 3 + 0.01q, gives the same \displaystyle A'(q) = -\frac{400}{q^2} + 0.01.
A'(q) = 0 when 0.01q^2 = 400, so q = 200 (run sizes are positive). There A(200) = 7 and C'(200) = 7: the cost of one more part equals the cost per part. A' is negative before 200 and positive after, which suggests the lowest cost per part; turning a sign change into a minimum is the work of maxima and minima, later. Here algebra settles it already:
which is positive for every q > 0 except q = 200. So 200 parts gives the lowest cost per part, 7 dollars.
Boundaries
- The bottom must not be 0 at the point. At a zero of g the quotient is undefined and has no derivative at all. The rule holds only where g(x) \ne 0, and the derivative it gives carries the same exclusions.
- Both functions must be differentiable at the point. The proof uses f'(x) and g'(x); if either does not exist, the rule says nothing.
- It is not the quotient of the derivatives, and the order of the two terms in the top matters.
- Simplifying can change the domain. \displaystyle \frac{x^2 - 9}{x - 3} and x + 3 have the same derivative except at x = 3, where only the second is defined.
Where this goes next
The derivatives of tangent, secant, cosecant and cotangent come from this rule, writing each as a quotient of sine and cosine. The chain rule gives a second route to the reciprocal rule, through \displaystyle \frac{1}{g} = g^{-1}, and combining the rules decides when a quotient is better rewritten as a product or a power. The cost-per-part reasoning of Example 7 is a first case of finding a least value with maxima and minima.
Exercises
Quotients of powers and polynomials
Find the derivative.
- f(x) = \dfrac{x - 4}{x + 2}
- g(t) = \dfrac{t^2}{3t - 1}
- y = \dfrac{x^2 + 1}{x^2 - 1}
- h(x) = \dfrac{5}{x^3 + 2x}
- y = \dfrac{1}{x^5}, by the reciprocal rule; compare with the power rule.
- \displaystyle y = \dfrac{\sqrt{x}}{x + 1}, for x > 0.
Exponentials
- y = \dfrac{x^2}{e^x}; find where the tangent is horizontal.
- f(x) = \dfrac{e^x - 1}{e^x + 1}; find f'(0).
- g(x) = \dfrac{x}{3^x}; find where g'(x) = 0.
Values from a table
The functions f and g are differentiable, with f(4) = -3, f'(4) = 5, g(4) = 2 and g'(4) = -1. Find the derivative at x = 4 of:
- \dfrac{f}{g}
- \dfrac{g}{f}
- \dfrac{1}{f}
- \dfrac{f(x)}{x}
Tangent lines
- Find the tangent line to y = \dfrac{x + 3}{x - 1} at x = 3.
- Find the tangent line to y = \dfrac{2^x}{x} at x = 1.
- Find the points on y = \dfrac{x}{x^2 + 9} where the tangent is horizontal.
Rates in context
- For another material, Yohannes models C(q) = 900 + 4q + 0.04q^2 dollars for q parts. Find A'(100) for the cost per part \displaystyle A(q) = \frac{C(q)}{q}.
- For the model in Exercise 17, find the run size where A'(q) = 0 and the cost per part there.
- Tesfay tracks the studio’s printers. One week they run 90 machine hours per week, rising by 6 per week each week, and turn out 300 parts per week, rising by 30 per week each week. At what rate is the number of machine hours per part changing?
- A large tank holds 40 liters of water for rinsing the printed parts. Tesfay lets in a concentrate holding 500 grams of cleaner per liter flows in at 2 liters per minute, and nothing flows out, so after t minutes the tank holds 1000t grams of cleaner in 40 + 2t liters. At what rate is the grams per liter changing at t = 10?
Reasoning
- Suppose \displaystyle Q = \frac{f}{g} is known to be differentiable. Apply the product rule to f = Qg and solve for Q' to get the quotient rule. Why does this argument alone not prove the rule?
- Explain why the quotient rule gives no derivative of \dfrac{x^2 - 4}{x - 2} at x = 2, even though the function equals x + 2 everywhere else.
- For positive f and g, show that \dfrac{(f/g)'}{f/g} = \dfrac{f'}{f} - \dfrac{g'}{g}.
- Show that the derivative of \dfrac{ax + b}{cx + d}, where cx + d \ne 0, is \dfrac{ad - bc}{(cx + d)^2}. What does the sign of ad - bc say about the graph?
Answers
- f'(x) = \dfrac{6}{(x + 2)^2}, x \ne -2. \dfrac{(x + 2) - (x - 4)}{(x + 2)^2}.
- g'(t) = \dfrac{3t^2 - 2t}{(3t - 1)^2}, t \ne \tfrac{1}{3}. \dfrac{2t(3t - 1) - 3t^2}{(3t - 1)^2}.
- y' = \dfrac{-4x}{(x^2 - 1)^2}, x \ne \pm 1. \dfrac{2x(x^2 - 1) - (x^2 + 1)(2x)}{(x^2 - 1)^2}.
- h'(x) = -\dfrac{5(3x^2 + 2)}{(x^3 + 2x)^2}, x \ne 0. The reciprocal rule with c = 5; x^3 + 2x = x(x^2 + 2) is 0 only at 0.
- y' = -5x^{-6}, x \ne 0. -\dfrac{5x^4}{x^{10}} = -\dfrac{5}{x^6}, the power rule with r = -5.
- \displaystyle y' = \dfrac{1 - x}{2\sqrt{x}\,(x + 1)^2}. \displaystyle \dfrac{\frac{1}{2\sqrt{x}}(x + 1) - \sqrt{x}}{(x + 1)^2}; multiply top and bottom by \displaystyle 2\sqrt{x}.
- y' = \dfrac{2x - x^2}{e^x}; horizontal at x = 0 and x = 2. \dfrac{2x e^x - x^2 e^x}{e^{2x}}, then cancel one e^x.
- f'(x) = \dfrac{2e^x}{(e^x + 1)^2}; f'(0) = \tfrac{1}{2}. Top e^x(e^x + 1) - (e^x - 1)e^x = 2e^x.
- g'(x) = \dfrac{1 - x\ln 3}{3^x}; g'(x) = 0 at x = \dfrac{1}{\ln 3} \approx 0.910. \dfrac{3^x - x\,3^x\ln 3}{(3^x)^2}.
- \tfrac{7}{4}. \dfrac{(5)(2) - (-3)(-1)}{2^2} = \dfrac{10 - 3}{4}.
- -\tfrac{7}{9}. \dfrac{(-1)(-3) - (2)(5)}{(-3)^2} = \dfrac{3 - 10}{9}.
- -\tfrac{5}{9}. -\dfrac{f'(4)}{f(4)^2} = -\dfrac{5}{9}.
- \tfrac{23}{16}. \dfrac{4f'(4) - f(4)}{4^2} = \dfrac{20 + 3}{16}.
- y = -x + 6. y' = \dfrac{-4}{(x - 1)^2}, so the slope at 3 is -1; the point is (3, 3).
- y = 2 + (2\ln 2 - 2)(x - 1), slope about -0.614. y' = \dfrac{2^x(x\ln 2 - 1)}{x^2}, which is 2(\ln 2 - 1) at 1; the point is (1, 2).
- \left(3, \tfrac{1}{6}\right) and \left(-3, -\tfrac{1}{6}\right). y' = \dfrac{9 - x^2}{(x^2 + 9)^2}.
- A'(100) = -0.05 dollars per part, per additional part. A'(q) = \dfrac{0.04q^2 - 900}{q^2}, and \dfrac{400 - 900}{10{,}000}.
- q = 150 parts, at 16 dollars per part. 0.04q^2 = 900 gives q^2 = 22{,}500; A(150) = \dfrac{2400}{150}.
- Falling at 0.01 machine hours per part each week. \dfrac{(6)(300) - (90)(30)}{300^2} = \dfrac{-900}{90{,}000}.
- About 11.1 grams per liter per minute (exactly \tfrac{100}{9}). c'(t) = \dfrac{1000(40 + 2t) - 1000t(2)}{(40 + 2t)^2} = \dfrac{40{,}000}{(40 + 2t)^2}, and (60)^2 = 3600.
- f' = Q'g + Qg', so \displaystyle Q' = \dfrac{f' - Qg'}{g} = \dfrac{f' - \frac{f}{g}g'}{g} = \dfrac{f'g - fg'}{g^2}. The product rule needs Q differentiable first, so this finds the formula only once that is known; the reciprocal step from the definition is what proves it.
- At x = 2 the bottom is 0, so the function is undefined there and cannot have a derivative. The rule needs g(2) \ne 0. The function x + 2 is a different function, defined at 2.
- Divide \dfrac{f'g - fg'}{g^2} by \dfrac{f}{g}, that is, multiply by \dfrac{g}{f}: \dfrac{f'g - fg'}{fg} = \dfrac{f'}{f} - \dfrac{g'}{g}.
- The derivative is \dfrac{ad - bc}{(cx + d)^2}: it is \dfrac{a(cx + d) - (ax + b)c}{(cx + d)^2}, and acx cancels, leaving ad - bc on top. The bottom is positive, so the derivative has the sign of ad - bc at every point: if ad - bc > 0 the graph rises on each interval of its domain, and if ad - bc < 0 it falls (Increasing, decreasing, constant, positive and negative intervals makes this reading exact). If ad - bc = 0 with c \ne 0, then c(ax + b) = acx + bc = acx + ad = a(cx + d), so the function is the constant \tfrac{a}{c} wherever it is defined; if c = 0, then d \ne 0 forces a = 0 and the function is the constant \tfrac{b}{d}.