AP Calculus AB · Topic 2.9 · Reading guide, about 5 min

Differentiating a ratio of two functions

The quotient rule (f/g)' = (f'g - fg')/g^2: order in the numerator, when to rewrite instead, and table-based use.

In one minute

A ratio of two functions, like 3x−2x2+1\frac{3x-2}{x^2+1} or xex\frac{x}{e^x}, is differentiated with the quotient rule: (fg)′=f′g−fg′g2\left(\frac fg\right)'=\frac{f'g-fg'}{g^2}. The numerator is the product rule with a minus sign, and the denominator is the old denominator squared.

Order matters in the numerator, so a good memory aid and a consistent layout save points. Sometimes the best move is to avoid the rule altogether by simplifying or rewriting the ratio first.

Key terms

Quotient rule
ddxfg=f′g−fg′g2\frac{d}{dx}\frac{f}{g}=\frac{f'g-fg'}{g^2} wherever g(x)≠0g(x)\neq 0.
Numerator function
The top function ff; it is differentiated in the first term of the numerator and left alone in the second.
Denominator function
The bottom function gg; it is squared in the denominator of the result and must not equal zero.
Low d-high minus high d-low
A memory aid for the numerator: the bottom times the derivative of the top, minus the top times the derivative of the bottom.
Negative power rewrite
Writing fg\frac{f}{g} as f⋅g−1f\cdot g^{-1} so the product rule and the chain rule can be used instead.
Simplify first
Reducing the ratio by canceling common factors or splitting the numerator before differentiating, often removing the need for the rule.
Horizontal tangent of a ratio
A point where the numerator of the derivative is 00 and the denominator is not.
Value table
A table with ff, gg, f′f' and g′g' at particular inputs, turning the quotient rule into arithmetic.

The rule and its structure

Write the rule as: derivative of the top times the bottom, minus the top times the derivative of the bottom, all over the bottom squared. The first product starts with f′f' and the second with ff. If you swap the two terms in the numerator you get the opposite sign for the whole derivative, which is a common source of lost points.

The rule comes from the product rule applied to f⋅g−1f\cdot g^{-1}, together with the derivative of the reciprocal. You can see the structure in the special case 1g\frac{1}{g}: with f=1f=1 and f′=0f'=0, the rule gives 0⋅g−1⋅g′g2=−g′g2\frac{0\cdot g-1\cdot g'}{g^2}=-\frac{g'}{g^2}. So reciprocals always have a negative sign and a squared denominator.

The derivative exists only where g(x)≠0g(x)\neq 0. A zero in the denominator signals a hole or vertical asymptote, as in topic 1.14, and there is no tangent line at that input.

When not to use the quotient rule

Look at the denominator before you start. If it is a single term and the numerator has several, split the fraction and use linearity and the power rule. For x3+4xx\frac{x^3+4x}{x}, write x2+4x^2+4 and differentiate to get 2x2x. If the numerator is a constant, rewrite with a negative power: 5x3=5x−3\frac{5}{x^3}=5x^{-3} has derivative −15x−4-15x^{-4}.

Check with the quotient rule: for 5x3\frac{5}{x^3}, f=5f=5 and g=x3g=x^3, so f′g−fg′=0⋅x3−5⋅3x2=−15x2f'g-fg'=0\cdot x^3-5\cdot 3x^2=-15x^2, and dividing by x6x^6 gives −15x−4-15x^{-4}. Both routes agree, and the rewrite is shorter. The quotient rule is the right tool when the denominator has several terms or a transcendental function.

Quotient rule on common ratios
RatioNumerator f'g - fg'Result
xex\frac{x}{e^x}1⋅ex−x⋅ex1\cdot e^x-x\cdot e^x1−xex\frac{1-x}{e^x}
ln⁡xx\frac{\ln x}{x}1x⋅x−ln⁡x⋅1\frac1x\cdot x-\ln x\cdot 11−ln⁡xx2\frac{1-\ln x}{x^2}
sin⁡xx\frac{\sin x}{x}cos⁡x⋅x−sin⁡x⋅1\cos x\cdot x-\sin x\cdot 1xcos⁡x−sin⁡xx2\frac{x\cos x-\sin x}{x^2}
x2x+1\frac{x^2}{x+1}2x(x+1)−x2⋅12x(x+1)-x^2\cdot 1x2+2x(x+1)2\frac{x^2+2x}{(x+1)^2}

A fully worked example

Problem: let y=3x−2x2+1y=\frac{3x-2}{x^2+1}. Find y′y', the tangent line at x=1x=1, and where the tangent is horizontal.

Setup: f=3x−2f=3x-2, f′=3f'=3; g=x2+1g=x^2+1, g′=2xg'=2x.

Apply the rule: y′=3(x2+1)−(3x−2)(2x)(x2+1)2y'=\frac{3(x^2+1)-(3x-2)(2x)}{(x^2+1)^2}. Expand the numerator: 3x2+3−(6x2−4x)=3x2+3−6x2+4x=−3x2+4x+33x^2+3-(6x^2-4x)=3x^2+3-6x^2+4x=-3x^2+4x+3. So y′=−3x2+4x+3(x2+1)2y'=\frac{-3x^2+4x+3}{(x^2+1)^2}.

Tangent at x=1x=1: y′(1)=−3+4+3(1+1)2=44=1y'(1)=\frac{-3+4+3}{(1+1)^2}=\frac{4}{4}=1. The point is y(1)=3−21+1=12y(1)=\frac{3-2}{1+1}=\frac12. The tangent line is y−12=x−1y-\frac12=x-1, or y=x−12y=x-\frac12.

Horizontal tangent: the denominator (x2+1)2(x^2+1)^2 is never zero, so set the numerator to zero: −3x2+4x+3=0-3x^2+4x+3=0, which is 3x2−4x−3=03x^2-4x-3=0. The quadratic formula gives x=4±16+366=4±2136=2±133x=\frac{4\pm\sqrt{16+36}}{6}=\frac{4\pm 2\sqrt{13}}{6}=\frac{2\pm\sqrt{13}}{3}. Both values are valid because the function is defined for every real xx.

Tables, graphs and verification

Suppose f(1)=4f(1)=4, f′(1)=2f'(1)=2, g(1)=2g(1)=2 and g′(1)=−3g'(1)=-3. Then (fg)′(1)=f′(1)g(1)−f(1)g′(1)g(1)2=2⋅2−4⋅(−3)22=4+124=4\left(\frac fg\right)'(1)=\frac{f'(1)g(1)-f(1)g'(1)}{g(1)^2}=\frac{2\cdot 2-4\cdot(-3)}{2^2}=\frac{4+12}{4}=4. Notice the double negative in the numerator: a negative g′g' makes the second term add. Swapping the two terms would give −4-4, an easy trap.

For graphs, read values and slopes at the same input. Confirm that g(a)≠0g(a)\neq 0 before you use the rule; if g(a)=0g(a)=0 the derivative of the ratio does not exist.

A quick sanity check is a sign test. If a ratio is increasing across a point on the graph, the computed derivative there should be positive. The result for xex\frac{x}{e^x} is 1−xex\frac{1-x}{e^x}, which is positive for x<1x<1 and negative for x>1x>1, matching a graph that rises, peaks at x=1x=1, and then falls.

How it connects

  • Back to 2.8: the quotient rule is built from the product rule and has a similar two-term numerator.
  • Back to 2.5: negative powers let you rewrite many ratios and skip the rule.
  • Back to 1.14: a zero in the denominator gives a hole or a vertical asymptote, so no derivative there.
  • Forward to 2.10: tangent, cotangent, secant and cosecant derivatives are all found with this rule.
  • Forward to 3.1: with the chain rule you will differentiate ratios whose parts are composite.

Common mistakes

  • Reversing the numerator. It is f′g−fg′f'g-fg', not fg′−f′gfg'-f'g. Keep the top function's derivative first.
  • Forgetting to square the denominator. The result is divided by g2g^2, not gg.
  • Differentiating top and bottom separately. f′g′\frac{f'}{g'} is not the derivative of fg\frac fg.
  • Using the rule when simplifying is easier. x2+5xx\frac{x^2+5x}{x} is just x+5x+5, with derivative 11.
  • **Dropping the minus sign when g′g' is negative.** Write the signed number in parentheses before multiplying.

How it shows up on the exam

  • Formula derivatives of a ratio of polynomials, or a ratio involving a trig, exponential or log function, followed by a tangent line or a horizontal tangent.
  • Table or graph questions with ff, gg, f′f' and g′g' at a single input, asking for the derivative of a ratio there.
  • Short justification asking where a ratio is increasing, using the sign of the numerator of the derivative.

Check yourself

  1. Which term comes first in the numerator, and how would you remember it?
  2. What is the derivative of 1x2+4\frac{1}{x^2+4}, and why is it negative for positive xx?
  3. How can you tell that x3+xx\frac{x^3+x}{x} does not need the quotient rule?
  4. Why can a ratio fail to have a derivative at an input where the denominator is zero?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.