Calculus · Grade 12 and undergraduate

The Product and Quotient Rules

Quick answer

The derivative of a product is not the product of the derivatives. The product rule is (fg)′ = f′g + fg′: each factor takes its turn changing while the other holds still, like the two strips added when both sides of a rectangle grow. The quotient rule is (f/g)′ = (f′g − fg′)/g². Applied to sin x / cos x and its relatives, the quotient rule gives the derivatives of tan, cot, sec and csc.

What you'll learn

  • Differentiate products with the product rule
  • Differentiate quotients with the quotient rule
  • Explain the two terms of the product rule
  • Differentiate tan x, cot x, sec x and csc x

The product rule

ddx(f(x) g(x))=f′(x) g(x)+f(x) g′(x)\frac{d}{dx}\big(f(x)\,g(x)\big) = f'(x)\,g(x) + f(x)\,g'(x)

In words: the derivative of the first times the second, plus the first times the derivative of the second.

Check it on x2⋅x3=x5x^2 \cdot x^3 = x^5: the rule gives 2x⋅x3+x2⋅3x2=2x4+3x4=5x42x \cdot x^3 + x^2 \cdot 3x^2 = 2x^4 + 3x^4 = 5x^4, which matches the power rule. Multiplying the derivatives instead gives 2x⋅3x2=6x32x \cdot 3x^2 = 6x^3, which does not.

Why a product has two terms

Picture f(x) g(x)f(x)\,g(x) as the area of a rectangle with sides ff and gg. Now let xx grow a little, so each side grows: ff by Δf\Delta f and gg by Δg\Delta g.

The new area is (f+Δf)(g+Δg)(f + \Delta f)(g + \Delta g). The rectangle gains three pieces:

  • a strip along one side, f Δgf\,\Delta g;
  • a strip along the other side, g Δfg\,\Delta f;
  • a tiny corner, Δf Δg\Delta f\,\Delta g.

Divide by Δx\Delta x and let Δx→0\Delta x \to 0. The strips give fg′f g' and gf′g f'. The corner gives Δf⋅ΔgΔx→0⋅g′=0\Delta f \cdot \tfrac{\Delta g}{\Delta x} \to 0 \cdot g' = 0. Each factor contributes its own change while the other holds still, and the change of both at once is too small to count.

The quotient rule

ddx(f(x)g(x))=f′(x) g(x)−f(x) g′(x)(g(x))2\frac{d}{dx}\left(\frac{f(x)}{g(x)}\right) = \frac{f'(x)\,g(x) - f(x)\,g'(x)}{\big(g(x)\big)^2}

The numerator looks like the product rule with a minus sign, so its order matters: derivative of the top first. A common way to remember it is “low d-high minus high d-low, over low squared.”

It follows from the product rule: write q=fgq = \tfrac{f}{g}, so f=qgf = qg and f′=q′g+qg′f' = q'g + qg'. Solving for q′q' gives q′=f′−qg′g=f′g−fg′g2q' = \tfrac{f' - qg'}{g} = \tfrac{f'g - fg'}{g^2}.

The other trigonometric functions

Apply the quotient rule to tan⁡x=sin⁡xcos⁡x\tan x = \tfrac{\sin x}{\cos x}:

ddxtan⁡x=cos⁡x⋅cos⁡x−sin⁡x⋅(−sin⁡x)cos⁡2x=1cos⁡2x=sec⁡2x\frac{d}{dx}\tan x = \frac{\cos x \cdot \cos x - \sin x \cdot (-\sin x)}{\cos^2 x} = \frac{1}{\cos^2 x} = \sec^2 x

The same method on cot⁡x\cot x, sec⁡x=1cos⁡x\sec x = \tfrac{1}{\cos x} and csc⁡x=1sin⁡x\csc x = \tfrac{1}{\sin x} completes the set:

f(x)f(x)tan⁡x\tan xcot⁡x\cot xsec⁡x\sec xcsc⁡x\csc x
f′(x)f'(x)sec⁡2x\sec^2 x−csc⁡2x-\csc^2 xsec⁡xtan⁡x\sec x \tan x−csc⁡xcot⁡x-\csc x \cot x

The “co” functions carry the minus signs, as cos⁡x\cos x does.

Worked examples

Common mistakes

Practice problems

  1. Differentiate y=x3exy = x^3 e^x.

    Answer

    y′=3x2ex+x3ex=x2ex(3+x)y' = 3x^2 e^x + x^3 e^x = x^2 e^x (3 + x)

    Full solution

    Product rule with f=x3f = x^3, g=exg = e^x: f′g+fg′=3x2ex+x3exf'g + fg' = 3x^2 e^x + x^3 e^x.

  2. Differentiate y=(2x+1)(x2−3)y = (2x + 1)(x^2 - 3) with the product rule, then check by expanding.

    Answer

    y′=6x2+2x−6y' = 6x^2 + 2x - 6

    Full solution

    Product rule: 2(x2−3)+(2x+1)(2x)=2x2−6+4x2+2x=6x2+2x−62(x^2 - 3) + (2x + 1)(2x) = 2x^2 - 6 + 4x^2 + 2x = 6x^2 + 2x - 6.

    Expanded, y=2x3+x2−6x−3y = 2x^3 + x^2 - 6x - 3, so y′=6x2+2x−6y' = 6x^2 + 2x - 6. They agree.

  3. Differentiate y=xx+1y = \tfrac{x}{x + 1}.

    Answer

    y′=1(x+1)2y' = \tfrac{1}{(x + 1)^2}

    Full solution

    1⋅(x+1)−x⋅1(x+1)2=1(x+1)2\tfrac{1 \cdot (x + 1) - x \cdot 1}{(x + 1)^2} = \tfrac{1}{(x + 1)^2}.

  4. Differentiate y=sin⁡xcos⁡xy = \sin x \cos x.

    Answer

    y′=cos⁡2x−sin⁡2xy' = \cos^2 x - \sin^2 x

    Full solution

    cos⁡x⋅cos⁡x+sin⁡x⋅(−sin⁡x)=cos⁡2x−sin⁡2x\cos x \cdot \cos x + \sin x \cdot (-\sin x) = \cos^2 x - \sin^2 x, which equals cos⁡2x\cos 2x.

  5. Differentiate y=exxy = \tfrac{e^x}{x}.

    Answer

    y′=ex(x−1)x2y' = \tfrac{e^x(x - 1)}{x^2}

    Full solution

    ex⋅x−ex⋅1x2=ex(x−1)x2\tfrac{e^x \cdot x - e^x \cdot 1}{x^2} = \tfrac{e^x(x - 1)}{x^2}.

  6. Show that ddxsec⁡x=sec⁡xtan⁡x\tfrac{d}{dx}\sec x = \sec x \tan x.

    Answer

    Apply the quotient rule to 1cos⁡x\tfrac{1}{\cos x}.

    Full solution

    0⋅cos⁡x−1⋅(−sin⁡x)cos⁡2x=sin⁡xcos⁡2x=1cos⁡x⋅sin⁡xcos⁡x=sec⁡xtan⁡x\tfrac{0 \cdot \cos x - 1 \cdot (-\sin x)}{\cos^2 x} = \tfrac{\sin x}{\cos^2 x} = \tfrac{1}{\cos x} \cdot \tfrac{\sin x}{\cos x} = \sec x \tan x.

  7. Differentiate y=xln⁡xy = x \ln x.

    Answer

    y′=ln⁡x+1y' = \ln x + 1

    Full solution

    1⋅ln⁡x+x⋅1x=ln⁡x+11 \cdot \ln x + x \cdot \tfrac{1}{x} = \ln x + 1.

  8. Find the tangent line to y=2xx2+1y = \tfrac{2x}{x^2 + 1} at x=0x = 0.

    Answer

    y=2xy = 2x

    Full solution

    y′=2(x2+1)−2x⋅2x(x2+1)2=2−2x2(x2+1)2y' = \tfrac{2(x^2 + 1) - 2x \cdot 2x}{(x^2 + 1)^2} = \tfrac{2 - 2x^2}{(x^2 + 1)^2}. At 00 the slope is 22 and the point is (0,0)(0, 0).

  9. If f(2)=3f(2) = 3, f′(2)=−1f'(2) = -1, g(2)=4g(2) = 4 and g′(2)=5g'(2) = 5, find (fg)′(2)(fg)'(2) and (fg)′(2)\left(\tfrac{f}{g}\right)'(2).

    Answer

    1111 and −1916-\tfrac{19}{16}

    Full solution

    (fg)′(2)=(−1)(4)+(3)(5)=11(fg)'(2) = (-1)(4) + (3)(5) = 11.

    (fg)′(2)=(−1)(4)−(3)(5)42=−1916\left(\tfrac{f}{g}\right)'(2) = \tfrac{(-1)(4) - (3)(5)}{4^2} = -\tfrac{19}{16}.

  10. A student writes ddxx2sin⁡x=2xcos⁡x\tfrac{d}{dx}\tfrac{x^2}{\sin x} = \tfrac{2x}{\cos x}. What went wrong, and what is the right derivative?

    Hint

    A quotient is not differentiated top and bottom separately.

    Answer

    The student differentiated top and bottom separately. The derivative is 2xsin⁡x−x2cos⁡xsin⁡2x\tfrac{2x \sin x - x^2 \cos x}{\sin^2 x}.

    Full solution

    The quotient rule gives 2x⋅sin⁡x−x2⋅cos⁡xsin⁡2x\tfrac{2x \cdot \sin x - x^2 \cdot \cos x}{\sin^2 x}.

    Dividing the derivatives, 2xcos⁡x\tfrac{2x}{\cos x}, has no justification, in the same way that (fg)′≠f′g′(fg)' \ne f'g'.

Frequently asked questions

What is the product rule?

(fg)′ = f′g + fg′: the derivative of the first times the second, plus the first times the derivative of the second.

What is the quotient rule?

(f/g)′ = (f′g − fg′)/g². The order in the numerator matters, because of the minus sign.

Why is the derivative of a product not the product of the derivatives?

When both factors change, the product changes by f times the change in g plus g times the change in f. Multiplying the two changes together captures neither.

What is the derivative of tan x?

sec² x. It follows from the quotient rule applied to sin x / cos x.

Do I always need the quotient rule for a fraction?

No. If the denominator is a single power of x, dividing first and using the power rule is faster.

What to learn next