Guides / Derivatives

Product, quotient and chain rules: which rule when, and the inner derivative you can't drop

Almost every derivative you will take by hand comes from three rules and a short table: the product rule for two functions multiplied together, the quotient rule for one divided by another, and the chain rule for one function inside another. The work rarely goes wrong because a rule is unknown. It goes wrong because the inner derivative of a chain is left off, the quotient rule's numerator is written the wrong way around, or a product is differentiated as if it were a sum.

Short answer

Look at the last operation in the expression. If it is a product, (uv)′ = u′v + uv′. If it is a quotient, (u/v)′ = (u′v − uv′)/v2, with the u′ term first. If it is a function applied to something other than x, it is a chain: f(g(x))′ = f′(g(x)) · g′(x), the outer derivative with the inside left alone, times the derivative of the inside. Then apply the same question to each piece until only table derivatives are left.

Why it works

Think of uv as the area of a rectangle with sides u and v. When x changes a little, u grows by about u′ dx and v by about v′ dx, and the area gains two strips, u′dx · v and u · v′dx, plus a tiny corner that is too small to count. That is the product rule: both terms, added, never the two derivatives multiplied. The quotient rule is the product rule applied to u · v−1; the minus sign belongs to the derivative of v−1, which is why it sits on the uv′ term.

For the chain rule, rates multiply. If g changes 6 times as fast as x, and f changes 5 times as fast as g, then f changes 30 times as fast as x. The outer derivative f′(g(x)) is the rate of f with respect to its input, and g′(x) converts that into a rate with respect to x. In (sin x)′ = cos x the inside is x itself, with derivative 1, which is why the second factor never shows up in the table.

Example 1: the product rule

Differentiate x2 sin x.

  1. u = x2, v = sin x, u′ = 2x, v′ = cos xThe last operation is a multiplication, so name the two factors and differentiate each one.
  2. (x2 sin x)′ = 2x sin x + x2 cos xu′v + uv′: each term differentiates one factor and keeps the other as it was.

Example 2: the quotient rule

Differentiate x2 + 1x − 3.

  1. u = x2 + 1, v = x − 3, u′ = 2x, v′ = 1u is the numerator and v the denominator.
  2. 2x(x − 3) − (x2 + 1)(1)(x − 3)2u′v first, then minus uv′, all over v². A way to remember the order: the numerator starts with the derivative of the numerator.
  3. x2 − 6x − 1(x − 3)2Expand: 2x² − 6x − x² − 1. Leave the denominator squared; expanding it only hides the factor x − 3.

Example 3: the chain rule

Differentiate (3x2 + 1)5.

  1. outer: u5, inner: u = 3x2 + 1The last operation is the fifth power, applied to something that is not just x.
  2. 5(3x2 + 1)4 · 6xThe outer derivative 5u⁴ with the inside left alone, times the inner derivative (3x² + 1)′ = 6x.
  3. 30x(3x2 + 1)4Multiply the constants. Expanding the fifth power first would give the same answer after a lot more work.

Example 4: rules inside rules

Differentiate x e−x², then cos3(2x).

  1. (x e−x²)′ = 1 · e−x² + x · (e−x²)′The last operation is a product, so the product rule comes first. One of its pieces needs the chain rule.
  2. (e−x²)′ = e−x² · (−2x)The outer function is eu, whose derivative is itself, and the inner derivative is −2x.
  3. (x e−x²)′ = e−x² − 2x2e−x² = e−x²(1 − 2x2)Factor out the exponential, which is never 0, so the derivative is 0 only where 1 − 2x² = 0.
  4. cos3(2x) = (cos(2x))3Three layers: a cube, of a cosine, of 2x. Peel them from the outside in.
  5. 3cos2(2x) · (−sin(2x)) · 2 = −6 cos2(2x) sin(2x)One factor for each layer: the cube, the cosine, and the 2x. A chain of three functions gives a product of three derivatives.

Common mistakes, and the exact line they happen on

1. Leaving off the inner derivative

The function from Example 3.

  1. outer: u5, inner: u = 3x2 + 1Right so far.
  2. ((3x2 + 1)5)′ = 5(3x2 + 1)4This is the mistake. This is the power rule used as if the inside were x. The inner derivative 6x is missing, and the answer is 30x(3x² + 1)⁴. At x = 1 the two differ by a factor of 6: 1280 written, 7680 correct. A quick check: the function is even, so its derivative must be odd and 0 at x = 0. The wrong line gives 5 there.

2. The quotient rule's numerator the wrong way around

The function from Example 2.

  1. u′ = 2x, v′ = 1Right so far.
  2. (x2 + 1)(1) − 2x(x − 3)(x − 3)2This is the mistake. That is uv′ − u′v. A difference written backwards changes sign, so the whole answer comes out negated: +1/9 at x = 0 where the true slope is −1/9. In the product rule the order doesn't matter because the terms are added; in the quotient rule it does.

3. Multiplying the derivatives of a product

The function from Example 1.

  1. u′ = 2x, v′ = cos xRight so far.
  2. (x2 sin x)′ = 2x cos xThis is the mistake. The derivative of a sum is the sum of the derivatives, but the derivative of a product is not the product of the derivatives. At x = π this gives −2π, while the true derivative 2x sin x + x² cos x is −π². The simplest check: x · x = x² has derivative 2x, not 1 · 1 = 1.

Practice

  1. Differentiate x ln x.

    Show answer

    Product rule: 1 · ln x + x · 1x = ln x + 1.

  2. Differentiate exx2.

    Show answer

    (ex · x2 − ex · 2x)/x4 = ex(x − 2)x3, after canceling one factor of x.

  3. Differentiate tan(5x).

    Show answer

    5 sec2(5x): the outer derivative sec²u at u = 5x, times the inner derivative 5.

  4. Differentiate √(x2 + 9) and evaluate the derivative at x = 4.

    Show answer

    12√(x2 + 9) · 2x = x√(x2 + 9), which is 45 at x = 4.

  5. Differentiate e2x sin x.

    Show answer

    Product rule with a chain inside: 2e2x sin x + e2x cos x = e2x(2 sin x + cos x).