Skip to content
Tutorials Center
My learning

Topics

Lesson 16 of 39 · Differentiation Rules

Product and Quotient Rules

Differentiate products and quotients of functions with the product rule and quotient rule, learn the common traps and verify results with SymPy.

The derivative of a sum is the sum of the derivatives. Products and quotients are different: the derivative of f·g is not f'·g'. Test it: x · x = x² has derivative 2x, but 1 · 1 = 1.

The product rule

(f g)' = f' g + f g'

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

Example. y = (x² + 1)(x³ - x).

  • f = x² + 1, f' = 2x
  • g = x³ - x, g' = 3x² - 1
  • y' = 2x (x³ - x) + (x² + 1)(3x² - 1)
  • Expand the second product: (x² + 1)(3x² - 1) = 3x⁴ + 2x² - 1, and 2x(x³ - x) = 2x⁴ - 2x².
  • Add: y' = 5x⁴ - 1.

Check by multiplying first: (x² + 1)(x³ - x) = x⁵ - x³ + x³ - x = x⁵ - x. Its derivative is 5x⁴ - 1. It matches.

The quotient rule

(f / g)' = (f' g - f g') / g²

A memory aid: "low d-high minus high d-low, over low squared", where f is high and g is low. The order of the subtraction matters.

Example. y = x / (x² + 1).

  • f = x, f' = 1; g = x² + 1, g' = 2x
  • y' = (1·(x² + 1) - x·2x) / (x² + 1)² = (1 - x²) / (x² + 1)²

At x = 1 the slope is 0: the function reaches a maximum of 1/2 there.

Python Verify rules with SymPy

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Numerical check of the rules

Python Numeric check of the product rule

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The numeric and rule columns agree; the "wrong" column does not.

When not to use them

Simplify first when you can. (x² + 4x)/x = x + 4 has derivative 1; no quotient rule needed. And a product with a constant is just the constant-multiple rule.

Common mistakes: using f'·g' for products, and reversing the numerator of the quotient rule (it is f'g - fg', not fg' - f'g).

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. The product rule says (fg)' equals

    Differentiate each factor in turn and add.
  2. 2. The quotient rule numerator is

    Numerator: (derivative of top × bottom) minus (top × derivative of bottom).
  3. 3. d/dx [x · x²] equals

    Either the product rule or x³ gives 3x².
  4. 4. For y = x/(x² + 1), y'(1) equals

    y' = (1 - x²)/(x² + 1)², which is 0 at x = 1.

Summary

  • Product rule: (fg)' = f'g + fg'.
  • Quotient rule: (f/g)' = (f'g - fg')/g².
  • Simplify first when possible; check with a numeric slope.

Next: The Chain Rule