Educerie

Educerie · AP · Calculus

AP Calculus AB and BC 3.1

The Chain Rule

How do you differentiate a function that is not written in a simple, ready-made form, one that is nested, defined implicitly, or defined as an inverse?

What you will learn

  • Understand a composite function as an inner and an outer function
  • Know the chain rule in function and rate notation
  • Understand that each layer adds one factor
  • Know how to find the inner value first in a table or graph

You must be able to

  1. Differentiate powers, roots, trigonometric, exponential and log composites
  2. Handle three layers working from the outside in
  3. Combine the chain rule with the product and quotient rules
  4. Use tables and graphs, evaluating the outer derivative at the inner value
  5. Link two rates with the chain rule in context

In the exam. Section I multiple choice, Part A and Part B: a derivative of a nested function by hand, a derivative at a point from a table of f,f′,g,g′f, f', g, g', and a slope read from two graphs. In Section II the chain rule sits inside nearly every question that differentiates: a table question that asks for h′(a)h'(a) where h(x)=f(g(x))h(x) = f(g(x)) (the common pattern), a second derivative that needs the product and chain rules together, a rate in context, and the first step of related rates and implicit differentiation.

1Composite functions: inner and outer

Outer and inner = the two jobs in a composite. Ask: "if I had to evaluate this at a number, what would I do last?" That last step is the outer function.

Example: y=(3x2+1)5y = (3x^{2} + 1)^{5}. To evaluate it at x=2x = 2, you find 3(4)+1=133(4) + 1 = 13 first (inner), then raise it to the fifth power (outer).

u=g(x)=3x2+1inneru = g(x) = 3x^{2} + 1 \qquad \textcolor{#838c91}{\text{inner}}y=f(u)=u5outery = f(u) = u^{5} \qquad \textcolor{#838c91}{\text{outer}}
  • Words in the exam point to composites: "the square root of", "the sine of", "ee to the power", "the natural log of".
  • sin⁡2x\sin^{2} x means (sin⁡x)2(\sin x)^{2}: inner sin⁡x\sin x, outer "square it".
  • sin⁡(x2)\sin(x^{2}) is a different function: inner x2x^{2}, outer "sine".
  • A product such as xsin⁡xx\sin x is not a composite. It needs the product rule.

2The chain rule, in two notations

Function notation

ddx[f(g(x))]=f′(g(x))⋅g′(x)\dfrac{d}{dx}\bigl[f(g(x))\bigr] = f'(g(x))\cdot g'(x)

Read it as: derivative of the outer, evaluated at the inner, times derivative of the inner.

Leibniz notation. Let u=g(x)u = g(x) and y=f(u)y = f(u). Then:

dydx=dydu⋅dudx\dfrac{dy}{dx} = \dfrac{dy}{du}\cdot\dfrac{du}{dx}

The dudu looks as if it cancels. It is a memory aid for the pattern, not a proof.

Figure 1 shows the idea for g(x)=x22g(x) = \tfrac{x^{2}}{2} and f(u)=u24f(u) = \tfrac{u^{2}}{4} at x=2x = 2.

  • At x=2x = 2, g(2)=2g(2) = 2 and the slope of gg is g′(2)=2g'(2) = 2.
  • The inner output is u=2u = 2. At u=2u = 2, the slope of ff is f′(2)=1f'(2) = 1.
  • So yy changes by 11 per unit of uu, and uu changes by 22 per unit of xx. Then yy changes by 1×2=21 \times 2 = 2 per unit of xx.
Two graphs side by side. Left: g(x) = x squared over 2 with its tangent at x = 2, where g is 2 and the slope is 2. Right: f(u) = u squared over 4 with its tangent at u = 2, where f is 1 and the slope is 1. The slope of f of g at x = 2 is 1 times 2 = 2 (a) u = g(x) 1 2 3 1 2 3 4 0 u x g (2, 2) slope 2 Two graphs side by side. Left: g(x) = x squared over 2 with its tangent at x = 2, where g is 2 and the slope is 2. Right: f(u) = u squared over 4 with its tangent at u = 2, where f is 1 and the slope is 1. The slope of f of g at x = 2 is 1 times 2 = 2 (b) y = f(u) 1 2 3 4 1 2 3 4 0 y u f (2, 1) slope 1
Figure 1 · The slope of f(g(x)) at x = 2 is the slope of f at u = 2 times the slope of g at x = 2

Check it directly: f(g(x))=x416f(g(x)) = \dfrac{x^{4}}{16}, whose derivative is x34\dfrac{x^{3}}{4}, and that is 22 at x=2x = 2.

3Working through a derivative

The method, every time:

  1. Name the inner function uu and the outer function.
  2. Differentiate the outer function, with uu still inside it.
  3. Multiply by u′u'.

Powers. Example: y=(3x2+1)5y = (3x^{2} + 1)^{5}.

dydx=5(3x2+1)4⋅6x=30x(3x2+1)4outer: 5u4; inner derivative: 6x\frac{dy}{dx} = 5(3x^{2} + 1)^{4}\cdot 6x = 30x(3x^{2} + 1)^{4} \qquad \textcolor{#838c91}{\text{outer: }5u^{4}\text{; inner derivative: }6x}

Roots. Write the root as a power first, or use dduu=12u\dfrac{d}{du}\sqrt{u} = \dfrac{1}{2\sqrt{u}}.

y=x3+1y = \sqrt{x^{3} + 1}dydx=12x3+1⋅3x2=3x22x3+1\frac{dy}{dx} = \frac{1}{2\sqrt{x^{3} + 1}}\cdot 3x^{2} = \frac{3x^{2}}{2\sqrt{x^{3} + 1}}

Trigonometric, exponential and logarithmic outer functions. These come from Unit 2, and each needs the inner derivative on the end.

ddx[sin⁡(x3)]=cos⁡(x3)⋅3x2\frac{d}{dx}\bigl[\sin(x^{3})\bigr] = \cos(x^{3})\cdot 3x^{2}ddx[tan⁡5x]=sec⁡2(5x)⋅5=5sec⁡2(5x)\frac{d}{dx}\bigl[\tan 5x\bigr] = \sec^{2}(5x)\cdot 5 = 5\sec^{2}(5x)ddx[e−4x2]=e−4x2⋅(−8x)=−8x e−4x2\frac{d}{dx}\bigl[e^{-4x^{2}}\bigr] = e^{-4x^{2}}\cdot(-8x) = -8x\,e^{-4x^{2}}ddx[ln⁡(x2+5)]=1x2+5⋅2x=2xx2+5\frac{d}{dx}\bigl[\ln(x^{2} + 5)\bigr] = \frac{1}{x^{2} + 5}\cdot 2x = \frac{2x}{x^{2} + 5}
  • The log case is worth remembering as a pattern: ddx[ln⁡g(x)]=g′(x)g(x)\dfrac{d}{dx}\bigl[\ln g(x)\bigr] = \dfrac{g'(x)}{g(x)}.
  • The exponential case has a matching pattern: ddx[eg(x)]=g′(x) eg(x)\dfrac{d}{dx}\bigl[e^{g(x)}\bigr] = g'(x)\,e^{g(x)}.
  • For a base other than ee, ddx[ag(x)]=ag(x)ln⁡a⋅g′(x)\dfrac{d}{dx}\bigl[a^{g(x)}\bigr] = a^{g(x)}\ln a\cdot g'(x).

4More than two layers

Work from the outside in. Each layer gives one factor, and the factors multiply.

Example: y=sin⁡3(2x)y = \sin^{3}(2x), which is [sin⁡(2x)]3\bigl[\sin(2x)\bigr]^{3}. The layers are "cube", then "sine", then "2x2x".

dydx=3[sin⁡(2x)]2⋅cos⁡(2x)⋅2=6sin⁡2(2x)cos⁡(2x)\frac{dy}{dx} = 3\bigl[\sin(2x)\bigr]^{2}\cdot\cos(2x)\cdot 2 = 6\sin^{2}(2x)\cos(2x)

Example: y=esin⁡xy = e^{\sin x}. The layers are "ee to the power", then "sine".

dydx=esin⁡x⋅cos⁡x\frac{dy}{dx} = e^{\sin x}\cdot\cos x

Example: y=ln⁡(cos⁡3x)y = \ln(\cos 3x).

dydx=1cos⁡3x⋅(−sin⁡3x)⋅3=−3tan⁡3xthe log pattern g’/g\frac{dy}{dx} = \frac{1}{\cos 3x}\cdot(-\sin 3x)\cdot 3 = -3\tan 3x \qquad \textcolor{#838c91}{\text{the log pattern g'/g}}
  • A way to keep track: say the layers aloud, "derivative of the cube, times derivative of the sine, times derivative of 2x2x".
  • Each layer costs one factor. If you find yourself with fewer factors than layers, you have dropped one.

5With the product and quotient rules

Many problems need two rules. Decide the outermost operation first.

A product of two factors, one of them composite. Example: y=x(2x−1)4y = x(2x - 1)^{4}. The outermost operation is a product.

dydx=(1)(2x−1)4+x⋅4(2x−1)3⋅2product rule; chain rule inside the second term=(2x−1)3[(2x−1)+8x]=(2x−1)3(10x−1)\begin{aligned}\frac{dy}{dx} &= (1)(2x - 1)^{4} + x\cdot 4(2x - 1)^{3}\cdot 2 && \textcolor{#838c91}{\text{product rule; chain rule inside the second term}} \\[6pt] &= (2x - 1)^{3}\bigl[(2x - 1) + 8x\bigr] \\[6pt] &= (2x - 1)^{3}(10x - 1)\end{aligned}

A quotient with a composite part. Example: y=e2xx2+1y = \dfrac{e^{2x}}{x^{2} + 1}.

dydx=2e2x(x2+1)−e2x⋅2x(x2+1)2=2e2x(x2−x+1)(x2+1)2\frac{dy}{dx} = \frac{2e^{2x}(x^{2} + 1) - e^{2x}\cdot 2x}{(x^{2} + 1)^{2}} = \frac{2e^{2x}(x^{2} - x + 1)}{(x^{2} + 1)^{2}}

A composite whose inside is a product. Example: y=x exy = \sqrt{x\,e^{x}}. The outermost operation is the root.

dydx=12xex⋅(ex+xex)chain rule first; the product rule for the inside\frac{dy}{dx} = \frac{1}{2\sqrt{x e^{x}}}\cdot\bigl(e^{x} + x e^{x}\bigr) \qquad \textcolor{#838c91}{\text{chain rule first; the product rule for the inside}}
  • The order is set by the outside of the expression: outermost operation first, then work inwards.
  • On Section I you can usually stop at an unsimplified correct form that matches an option. Check whether the options are factored or expanded before you simplify.

6Values from tables and graphs

This is the form the exam likes best. You are not given a formula, so the rule is the only way in.

Example (invented). A table gives values of ff, gg and their derivatives.

xxf(x)f(x)f′(x)f'(x)g(x)g(x)g′(x)g'(x)
1253−1-1
23−2-216
31427

Let h(x)=f(g(x))h(x) = f(g(x)) and k(x)=g(f(x))k(x) = g(f(x)).

h′(1)=f′(g(1))⋅g′(1)=f′(3)⋅g′(1)=4×(−1)=−4g(1) = 3, so look up f’ at 3h'(1) = f'(g(1))\cdot g'(1) = f'(3)\cdot g'(1) = 4 \times (-1) = -4 \qquad \textcolor{#838c91}{\text{g(1) = 3, so look up f' at 3}}h′(2)=f′(g(2))⋅g′(2)=f′(1)⋅g′(2)=5×6=30h'(2) = f'(g(2))\cdot g'(2) = f'(1)\cdot g'(2) = 5 \times 6 = 30k′(1)=g′(f(1))⋅f′(1)=g′(2)⋅f′(1)=6×5=30the order of the functions swapsk'(1) = g'(f(1))\cdot f'(1) = g'(2)\cdot f'(1) = 6 \times 5 = 30 \qquad \textcolor{#838c91}{\text{the order of the functions swaps}}k′(2)=g′(f(2))⋅f′(2)=g′(3)⋅f′(2)=7×(−2)=−14k'(2) = g'(f(2))\cdot f'(2) = g'(3)\cdot f'(2) = 7 \times (-2) = -14
  • Step one is always the inner value: evaluate the inner function at the point, then look up the outer derivative at that number.
  • f(g(x))f(g(x)) and g(f(x))g(f(x)) are different functions, as the two answers show.
  • A power of a function is also a composite: for p(x)=[f(x)]3p(x) = \bigl[f(x)\bigr]^{3}, p′(2)=3[f(2)]2f′(2)=3(9)(−2)=−54p'(2) = 3\bigl[f(2)\bigr]^{2} f'(2) = 3(9)(-2) = -54.
  • Scaling the input is a composite too: for q(x)=f(2x)q(x) = f(2x), q′(1)=2f′(2)=−4q'(1) = 2f'(2) = -4.

Graphs. When the functions are given as graphs, read the inner value, read the slope of each graph at the right place, and multiply.

  • Figure 1 is exactly this: slopes of gg at x=2x = 2 and of ff at u=2u = 2, multiplied.
  • For graphs made of line segments, the slope is the slope of the segment that contains the point. State which segment you used.

7Rates in context

The chain rule is also how two rates link.

Example (invented). A circular ripple has radius r(t)=3+2tr(t) = 3 + 2t centimeters at time tt seconds. Its area is A=πr2A = \pi r^{2}.

dAdt=dAdr⋅drdt=2πr⋅2dr/dt = 2 cm/s\frac{dA}{dt} = \frac{dA}{dr}\cdot\frac{dr}{dt} = 2\pi r \cdot 2 \qquad \textcolor{#838c91}{\text{dr/dt = 2 cm/s}}At t=1:  r=5,    dAdt=2π(5)(2)=20π cm2 per second\text{At } t = 1:\; r = 5,\;\; \frac{dA}{dt} = 2\pi(5)(2) = 20\pi \text{ cm}^{2}\text{ per second}
  • The unit of dAdt\dfrac{dA}{dt} is the unit of AA per unit of tt, here cm2\text{cm}^{2} per second.
  • Always write the value of tt when you give the rate: it is the rate at one moment.
  • Unit 4 uses this pattern for related rates. A common source of confusion is that dAdr\dfrac{dA}{dr} is a different rate from dAdt\dfrac{dA}{dt}, and the units show which one you have.

Practice questions

30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.