AP Calculus AB · Lesson 1

The chain rule

Know Know it

A composite function f(g(x))f(g(x)) feeds the output of the inner function gg into the outer function ff. The chain rule says ddxf(g(x))=f′(g(x))⋅g′(x)\frac{d}{dx}f(g(x)) = f'(g(x)) \cdot g'(x): differentiate the outer function, leave the inside alone, then multiply by the derivative of the inside.

In Leibniz form, with u=g(x)u = g(x): dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}.

The common patterns: ddx[g(x)]n=n[g(x)]n−1g′(x)\frac{d}{dx}[g(x)]^n = n[g(x)]^{n-1}g'(x); ddxeg(x)=eg(x)g′(x)\frac{d}{dx}e^{g(x)} = e^{g(x)}g'(x); ddxln⁡g(x)=g′(x)g(x)\frac{d}{dx}\ln g(x) = \frac{g'(x)}{g(x)}; ddxsin⁡(g(x))=cos⁡(g(x)) g′(x)\frac{d}{dx}\sin(g(x)) = \cos(g(x))\,g'(x). For another base, ddxbx=bxln⁡b\frac{d}{dx}b^x = b^x\ln b.

Worked example Easy

What is ddx(x2+5)3\frac{d}{dx}(x^2 + 5)^3?

  1. 3(x2+5)23(x^2 + 5)^2
  2. 6x(x2+5)26x(x^2 + 5)^2Answer
  3. 6x(x2+5)36x(x^2 + 5)^3
  4. 3(2x)23(2x)^2

How to solve it

  1. Outer function u3u^3, inner function u=x2+5u = x^2 + 5.
  2. Outer derivative at the inside: 3(x2+5)23(x^2 + 5)^2. Inner derivative: 2x2x.
  3. Multiply: 6x(x2+5)26x(x^2 + 5)^2.

Why each choice is right or wrong

  • A. Incorrect. 3(x2+5)23(x^2 + 5)^2 differentiates the outer power but forgets to multiply by the derivative of the inside, 2x2x.
  • B. Correct. Outer: u3→3u2u^3 \to 3u^2, giving 3(x2+5)23(x^2 + 5)^2. Inner: x2+5→2xx^2 + 5 \to 2x. Multiply: 6x(x2+5)26x(x^2 + 5)^2.
  • C. Incorrect. 6x(x2+5)36x(x^2 + 5)^3 keeps the exponent at 3; the power rule lowers it to 2.
  • D. Incorrect. 3(2x)23(2x)^2 replaces the inside with its derivative; the chain rule keeps the inside and multiplies by its derivative.

Worked example Medium

If y=ln⁡(cos⁡x)y = \ln(\cos x), what is the derivative dydx\frac{dy}{dx}?

  1. 1cos⁡x\frac{1}{\cos x}
  2. −1sin⁡x-\frac{1}{\sin x}
  3. −tan⁡x-\tan xAnswer
  4. tan⁡x\tan x

How to solve it

  1. Outer function ln⁡u\ln u, inner function u=cos⁡xu = \cos x.
  2. dduln⁡u=1u\frac{d}{du}\ln u = \frac{1}{u}, so the outer part is 1cos⁡x\frac{1}{\cos x}; the inner derivative is −sin⁡x-\sin x.
  3. Multiply: −sin⁡xcos⁡x=−tan⁡x\frac{-\sin x}{\cos x} = -\tan x.

Why each choice is right or wrong

  • A. Incorrect. 1cos⁡x\frac{1}{\cos x} differentiates ln⁡\ln but forgets to multiply by the derivative of the inside, −sin⁡x-\sin x.
  • B. Incorrect. −1sin⁡x-\frac{1}{\sin x} puts the derivative of the inside in the denominator; it belongs on top: −sin⁡xcos⁡x\frac{-\sin x}{\cos x}.
  • C. Correct. ddxln⁡(cos⁡x)=1cos⁡x⋅(−sin⁡x)=−sin⁡xcos⁡x=−tan⁡x\frac{d}{dx}\ln(\cos x) = \frac{1}{\cos x} \cdot (-\sin x) = -\frac{\sin x}{\cos x} = -\tan x.
  • D. Incorrect. tan⁡x\tan x loses the minus sign: the derivative of cos⁡x\cos x is −sin⁡x-\sin x, not sin⁡x\sin x.

Explain Explain it

Task verbs: calculate, explain

With a table, the chain rule is a lookup in two steps. For h(x)=f(g(x))h(x) = f(g(x)) at x=ax = a: first find g(a)g(a) in the table, then find f′f' at that input, and multiply by g′(a)g'(a). So h′(a)=f′(g(a))⋅g′(a)h'(a) = f'(g(a)) \cdot g'(a).

Several layers just mean more factors. For sin⁡3(4x)\sin^3(4x), the layers are a cube, a sine and 4x4x, so the derivative is 3sin⁡2(4x)⋅cos⁡(4x)⋅43\sin^2(4x) \cdot \cos(4x) \cdot 4.

The chain rule also gives higher derivatives of composites. For e5xe^{5x}, each derivative brings out another factor of 5, so the second derivative is 25e5x25e^{5x}.

Trap Evaluate the outer derivative at the inside

For h(x)=f(g(x))h(x) = f(g(x)), h′(2)h'(2) is f′(g(2))⋅g′(2)f'(g(2)) \cdot g'(2), not f′(2)⋅g′(2)f'(2) \cdot g'(2). The outer derivative is read at the inner function's output, so look up g(2)g(2) first.

Worked example Hard

Here ff and gg are differentiable everywhere, and the table gives a few values of each function and of its derivative.

Values of ff, gg and their derivatives

xxf(x)f(x)f′(x)f'(x)g(x)g(x)g′(x)g'(x)
14-235
3761-1

Let h(x)=f(g(x))h(x) = f(g(x)). What is h′(1)h'(1)?

  1. −10-10
  2. −6-6
  3. −1-1
  4. 3030Answer

How to solve it

  1. Find the inside first: g(1)=3g(1) = 3.
  2. Read the outer derivative at that input: f′(3)=6f'(3) = 6. Read g′(1)=5g'(1) = 5.
  3. Multiply: h′(1)=6⋅5=30h'(1) = 6 \cdot 5 = 30.

Why each choice is right or wrong

  • A. Incorrect. −10-10 is f′(1)⋅g′(1)f'(1) \cdot g'(1): it reads f′f' at 1 instead of at g(1)=3g(1) = 3.
  • B. Incorrect. −6-6 is f′(3)⋅g′(3)f'(3) \cdot g'(3): it uses the right f′f' but takes g′g' at 3 instead of at 1.
  • C. Incorrect. −1-1 is g′(3)g'(3) alone, read from the wrong row; the answer needs f′(g(1))f'(g(1)) times g′(1)g'(1).
  • D. Correct. g(1)=3g(1) = 3, so h′(1)=f′(g(1))⋅g′(1)=f′(3)⋅g′(1)=6⋅5=30h'(1) = f'(g(1)) \cdot g'(1) = f'(3) \cdot g'(1) = 6 \cdot 5 = 30.

Explain Your turn

A student finds the derivative of sin⁡(x3)\sin(x^3) as cos⁡(3x2)\cos(3x^2). Give the correct derivative, and explain the mistake the student made.

Write it, then compare. Nothing you type here is saved or graded.

Compare with a model answer

A full answer does this

  • Gives the correct derivative, 3x2cos⁡(x3)3x^2\cos(x^3)
  • Explains that the student replaced the inside with its derivative instead of keeping the inside and multiplying by its derivative

Model answer

The correct derivative is cos⁡(x3)⋅3x2=3x2cos⁡(x3)\cos(x^3) \cdot 3x^2 = 3x^2\cos(x^3). The student put the derivative of the inside, 3x23x^2, inside the cosine. The chain rule keeps the inside as it is, cos⁡(x3)\cos(x^3), and multiplies by the derivative of the inside, 3x23x^2.

Apply Apply it

Calculator On the exam

A graphing calculator is required in multiple-choice Part B and free-response Part A of the exam, and it is not allowed in multiple-choice Part A or free-response Part B. In the calculator parts it can find a derivative at a point as a decimal, which is a quick check on a chain rule answer. Most of the multiple-choice section, 29 of its 42 questions, is in the no-calculator part, so learn these rules by hand.

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