Kim’s Math NotesCourse index

The Chain Rule with Tables and Graphs

Which table row do I use for the outer derivative in the chain rule?

Use the chain rule with tables and graphs: find the inside value first, then read the outside's slope there.

The outside's slope at the inside value

Common mistake h=f(g(x)): h′(1)=f′(1)⋅g′(1)=(−2)(5)=−10.

Correction f′ at g(1)=3, not at 1: h′(1)=f′(3)⋅g′(1)=7⋅5=35.

Inside first: the baton, and the order

Think of a composite like a relay race. Quick reminder of the chain rule: h prime of x is f prime of g of x, times g prime of x. The outside's derivative, at the inside. Now plug in two. Where does the two go first?

It runs into g first, and out comes a number, g of two.

Watch this part of the concept lesson

Read the rest of this scene

That's the baton. g hands it to f prime, so f prime only sees what g hands it: g of two, whatever number that is. So h prime of two is f prime of g of two, times g prime of two. Find g of two first, then read f prime at that number. For example, if g of two is five, you read f prime of five. Not f prime of two.

That number, g of two, has a name: the inside value. f prime is always read at the inside value. And in a relay, the lineup matters. f of g of x and g of f of x are usually different functions. For f of g, f is outside.

So it's f prime at g of x, times g prime of x. For g of f, now g is outside. So it's g prime at f of x, times f prime of x. Same letters, different lineup. So read from the left: the letter written first, on the far left, is the outside function.

Even if the letters are p and q. And the same letter twice, f of f of x? Same rule. The inside is f of x. So f prime at f of x, times f prime of x. For example, if f of two is three, the derivative at two is f prime of three, times f prime of two.

Not f prime of two, squared.

Look-alikes: find the inside

Before a real table, two pairs of look-alikes. f of x squared... and f of x, all squared. They look almost the same. They are not. In f of x squared, the x squared is tucked inside. That's the inside.

So f prime of x squared, times two x.

Watch this part of the concept lesson

Read the rest of this scene

In f of x, all squared, now the square is the outside, and f of x is the inside. The square comes down: two times f of x, the inside left as it is. Then times the inside's derivative, f prime of x. Same story with a three. In f of three x, the three x is trapped inside.

So f prime of three x, times three. But three f of x has no inside at all. The three is just a constant multiple out front. Three f prime of x. The three lands in a different place.

They look like twins, but they're not even related. So when two things look alike, ask one question: what's on the inside? That one question sorts them all.

Structure first (and how AP scores it)

One habit before the first table. Say you want h prime of one. Write the letters first: h prime of one equals f prime of g of one, times g prime of one. Two empty boxes. Then fill them from the table, one number at a time, inside first.

This line has a name: the structure line.

Watch this part of the concept lesson

Read the rest of this scene

Why so strict? On the 2023 AP exam, on a composite from a table, the structure and the table values were scored separately. And on the 2026 exam, the answer point went only to students who earned the structure point. A number all by itself couldn't even get the answer point. So it's letters first, numbers second. Let's try it on a real table.

Example 1: a table

Example one. f and g are differentiable, with values in the table. h is f of g of x: find h prime of one. k is g of f of x: find k prime of two. And write the tangent line to h at x equals one.

Part a. The plan: write the structure first, then read the inside value first.

Watch this part of the concept lesson

Read the rest of this scene

h prime of one is f prime of g of one, times g prime of one. That line already protects your point. Inside first. Go to x equals one, down to the g row: g of one is three. Pass the baton: put three in for g of one. Now it's f prime of three, times g prime of one.

From the table: f prime of three is seven, g prime of one is five. Seven times five... thirty-five.

Common mistake: f′ at the wrong value

Wait. Look at what you just dodged in part a. Without the structure line, this feels so natural, right? One in, one out. h prime of one equals... f prime of one, times g prime of one. Negative two times five... negative ten.

So write this down: f prime is evaluated at the inside value, g of one, which is three.

Watch this part of the concept lesson

Read the rest of this scene

Not at one. So h prime of one is f prime of three, times five... thirty-five. Part b flips the order: k is g of f of x. Try its structure before I do. Now g is the outside. k prime of two is g prime of f of two... times f prime of two.

Inside first again. x equals two, down to the f row: f of two is three. So g prime of three, times f prime of two. From the table: g prime of three is two, f prime of two is six. Two times six... twelve.

This time g is on the outside, so g prime comes first. The order matters. Part c wants a tangent line, and you already have its slope. Part c. A tangent line needs two things: a point and a slope. The point first. No derivatives here, just plain values.

h of one is f of g of one... g of one is three, so it's f of three, which is two. The slope is h prime of one, thirty-five, from part a. The point is one, two, and the slope is thirty-five. So the tangent line: y equals two, plus thirty-five times x minus one.

Example 2: a graph

Tables are done. What if they give you a graph instead? Example two. f is made of two line segments, as shown. g of x is x squared, and h is f of g of x. Find h prime of two... and h prime of zero.

Part a. The plan: the chain rule.

Watch this part of the concept lesson

Read the rest of this scene

h prime of x is f prime of g of x, times g prime of x... and g prime of x is two x. Now, how a graph talks. A value, like f of a, is a height. A derivative, f prime of a, is a slope. For a line segment, just its slope.

The structure: h prime of two is f prime of g of two, times g prime of two. Inside first. g of two is two squared... four. At x equals four, the height is three. But we need a slope, not a height. We're on the right segment: it rises one for every one, so f prime of four is one.

And g prime of two is two times two, four. So h prime of two is f prime of four, times g prime of two. One times four... four. Part b looks just like it, so find its inside value before I do. Part b. Same structure, new inside value.

h prime of zero is f prime of g of zero, times g prime of zero. Inside first: g of zero is zero. At x equals zero, we're on the left segment: it falls two for every one, so f prime of zero is negative two. So the answer is negative two, right? Wait. Don't forget the tail of the chain rule: times g prime of zero.

g prime of zero is two times zero... zero. So g is perfectly flat at zero. So h prime of zero is negative two, times zero... zero. The flat inside wins. Zero is the mute button: a flat inside makes the whole product zero, no matter how steep the outside is.

Example 3: multiple choice

Example three, multiple choice, with the same table. q of x is x times g of x squared. What is q prime of two? The plan: zoom out. It's a product, x times g of x squared.

And inside the second factor, g of x squared, a chain. Product first, so the product rule: u prime v, plus u v prime. The first factor is x, and its derivative is one: one times g of x squared.

Watch this part of the concept lesson

Read the rest of this scene

Plus x times the derivative of g of x squared, which is g prime of x squared, times two x. Don't drop that two x. The numbers are yours now: plug in two, and check the table. The plan: plug in x equals two. Then x squared is four, and two x is four, too.

So q prime of two is g of four, plus two times g prime of four, times four. From the table, at x equals four: g of four is two, and g prime of four is one half. Two, plus two times one half times four... two plus four. Six. So the answer is C.

Worked examples

Example 1

f and g are differentiable; values are in the table.
(a) Let h(x)=f(g(x)). Find h′(1).
(b) Let k(x)=g(f(x)). Find k′(2).
(c) Write an equation of the tangent line to the graph of h at x=1.
x1234
f(x)432-1
f′(x)-2673
g(x)3142
g′(x)5-1212
Hint

The structure first, the inside value first.

Answer and solution
  1. 35
  2. 12
  3. y=2+35(x−1)
  1. h′(1)=f′(g(1))⋅g′(1)=f′(3)⋅g′(1)=7⋅5=35
  2. k′(2)=g′(f(2))⋅f′(2)=g′(3)⋅f′(2)=2⋅6=12
  3. h(1) = f(g(1)) = f(3) = 2, so the tangent line is y = 2 + 35(x - 1).

Example 2

The graph of f is made of two line segments. Let g(x)=x2 and h(x)=f(g(x)).
(a) Find h′(2).
(b) Find h′(0).
xy12341234
Graph of f(x)
Hint

Find the inside value g(a) first, then the slope of f there.

Answer and solution
  1. 4
  2. 0
  1. h'(x) = f'(g(x)) g'(x), with g'(x) = 2x.
  2. h′(2)=f′(g(2))⋅g′(2)=f′(4)⋅4=1⋅4=4
  3. h′(0)=f′(g(0))⋅g′(0)=f′(0)⋅0=(−2)⋅0=0
  4. A zero inside slope makes the product 0.

Example 3

Using the table of Example 1, let q(x)=xg(x2). What is q′(2)?
  1. 3
  2. 4
  3. 6
  4. −6
Hint

Product first, the chain rule inside.

Answer and solution

Answer C. 6

  1. q′(x)=1⋅g(x2)+x⋅g′(x2)⋅2x
  2. q′(2)=g(4)+2⋅g′(4)⋅4=2+2⋅12⋅4=6
  3. Answer C.

Workbook

Problem 1

Values of f, f′, g, and g′ are given in the table. Let h(x)=f(g(x)) and k(x)=g(f(x)). (a) Find h′(2). (b) Find k′(3).
x1234
f(x)3412
f′(x)-253-1
g(x)2431
g′(x)6-324
Hint

Inside value first: g(2). Then read f′ there.

Answer and solution
  1. h′(2)=f′(g(2))⋅g′(2)=f′(4)(−3)=(−1)(−3)=3
  2. k′(3)=g′(f(3))⋅f′(3)=g′(1)(3)=(6)(3)=18
  1. h′(2)=f′(g(2))⋅g′(2)=f′(4)⋅(−3)=(−1)(−3)=3
  2. k′(3)=g′(f(3))⋅f′(3)=g′(1)⋅3=(6)(3)=18

Common mistake Reading f' at 2 instead of at the inside value g(2) = 4.

Watch the worked solution to Problem 1

Problem 2

Values of f, f′, g, and g′ are given in the table. Let p(x)=[f(x)]3 and r(x)=f(2x). (a) Find p′(1). (b) Find r′(2).
x1234
f(x)3412
f′(x)-253-1
g(x)2431
g′(x)6-324
Hint

p′(x)=3[f(x)]2f′(x) and r′(x)=f′(2x)⋅2.

Answer and solution
  1. p′(1)=3[f(1)]2f′(1)=3(9)(−2)=−54
  2. r′(2)=f′(4)⋅2=(−1)(2)=−2
  1. p′(x)=3[f(x)]2f′(x),p′(1)=3(3)2(−2)=−54
  2. r′(x)=f′(2x)⋅2,r′(2)=f′(4)⋅2=−2

Common mistake Writing 3[f(x)]^2 without the f'(x), or f'(2x) without the 2.

Watch the worked solution to Problem 2

Problem 3

Values of f, f′, g, and g′ are given in the table. Let m(x)=ln(g(x)). Write an equation of the line tangent to the graph of m at x=3.
x1234
f(x)3412
f′(x)-253-1
g(x)2431
g′(x)6-324
Hint

m′(x)=g′(x)g(x). The point uses m(3)=lng(3).

Answer and solution

Answer y=ln3+23(x−3)

  1. m(3)=lng(3)=ln3
  2. m′(x)=g′(x)g(x),m′(3)=23
  3. y=ln3+23(x−3)

Common mistake Using g'(3) alone as the slope, or a point with g(3) instead of ln g(3).

Watch the worked solution to Problem 3

Problem 4

The graph of f is made of line segments from (0,1) to (2,5) and from (2,5) to (5,−1). Let h(x)=[f(x)]2. What is h′(3)?
xy12345-112345
Graph of f(x)
  1. −12
  2. −4
  3. 4
  4. 6
Hint

h′(x)=2f(x)f′(x): a height and a slope, both at x=3.

Answer and solution

Answer A. −12

  1. h′(x)=2f(x)⋅f′(x)
  2. h′(3)=2(3)(−2)=−12
  3. Answer A.

Common mistake Squaring the slope: [f'(3)]^2 instead of 2 f(3) f'(3).

Watch the worked solution to Problem 4

Problem 5

The functions f and g are differentiable, with g(1)=2, g′(1)=3, f′(1)=4, f′(2)=−1, and f(2)=5. If h(x)=f(g(x)), what is h′(1)?
  1. −3
  2. −1
  3. 12
  4. 15
Hint

h′(1)=f′(g(1))⋅g′(1): f′ at 2, not at 1.

Answer and solution

Answer A. −3

  1. h′(1)=f′(g(1))⋅g′(1)=f′(2)⋅3
  2. =(−1)(3)=−3
  3. Answer A.

Common mistake Using f'(1), the value at x instead of at g(1) = 2.

Watch the worked solution to Problem 5

Problem 6

Values of f and f′ are given in the table. If h(x)=f(f(x)), what is h′(1)?
x1234
f(x)3412
f′(x)-253-1
g(x)2431
g′(x)6-324
  1. −6
  2. 3
  3. 4
  4. 9
Hint

The same letter twice: h′(1)=f′(f(1))⋅f′(1).

Answer and solution

Answer A. −6

  1. h′(1)=f′(f(1))⋅f′(1)=f′(3)⋅(−2)
  2. =(3)(−2)=−6
  3. Answer A.

Common mistake Reading f' at 1 twice instead of at f(1) = 3.

Watch the worked solution to Problem 6

Problem 7

The number of fish in a lake is F(T), where T is the water temperature in degrees Celsius. The water temperature is T(t) degrees Celsius on day t; values are in the table. Also F′(15)=−50 and F′(20)=−80. Let N(t)=F(T(t)).
t (days)510
T(t)1520
T′(t)0.81.2
  1. Find N′(5). Indicate units of measure.
  2. Explain the meaning of N′(5) in context.
  3. Is the number of fish increasing or decreasing on day 10? Give a reason.
Hint

N′(t)=F′(T(t))⋅T′(t). Units: fish per degree times degrees per day.

Answer and solution
  1. N′(5)=F′(T(5))⋅T′(5)=F′(15)(0.8)=−40 fish per day
  2. on day 5, the number of fish in the lake is decreasing at a rate of 40 fish per day
  3. decreasing, because N′(10)=F′(20)(1.2)=−96<0
  1. N′(5)=F′(T(5))⋅T′(5)=F′(15)(0.8)=−40
  2. (a) -40 fish per day. (b) On day 5, the number of fish in the lake is decreasing at 40 fish per day.
  3. (c) N'(10) = F'(T(10)) T'(10) = F'(20)(1.2) = -96 < 0, so the number of fish is decreasing on day 10.

Common mistake Multiplying F'(15) by T(5) instead of T'(5); no units.

Watch the worked solution to Problem 7

Problem 8

The graph of f is made of line segments from (−1,4) to (1,0) and from (1,0) to (4,6). Let k(x)=f(x) and h(x)=f(2x+1).
xy-11234123456
Graph of f(x)
  1. Find k′(3).
  2. Find h′(1).
  3. Is h differentiable at x=0? Explain.
Hint

k′=f′2f. For (c), find the inside value at x=0 and look at the graph there.

Answer and solution
  1. k′(3)=f′(3)2f(3)=22⋅2=12
  2. h′(1)=f′(3)⋅2=4
  3. no: the inside value is 2(0)+1=1, a corner of f; the slopes of h are (−2)(2)=−4 on the left and (2)(2)=4 on the right
  1. k′(3)=f′(3)2f(3)=224=12
  2. h′(1)=f′(2⋅1+1)⋅2=f′(3)⋅2=4
  3. (c) At x = 0 the inside is 2(0) + 1 = 1, a corner of f: slope -2 on the left, 2 on the right. So h has slopes -4 and 4 there: not differentiable.

Common mistake Using f(3) where f'(3) belongs; calling h differentiable at x = 0 without looking at the corner of f at 1.

Watch the worked solution to Problem 8

Problem 9

Values of f, f′, g, and g′ are given in the table. Let w(x)=x2g(2x). Find w′(1).
x1234
f(x)3412
f′(x)-253-1
g(x)2431
g′(x)6-324
Hint

Product rule first, then the chain in g(2x): w′=2xg(2x)+x2g′(2x)⋅2.

Answer and solution

Answer 2

  1. w′(x)=2x⋅g(2x)+x2⋅g′(2x)⋅2
  2. w′(1)=2⋅g(2)+1⋅g′(2)⋅2=2(4)+(−3)(2)=2

Common mistake Writing the product rule without the chain's 2 for g(2x).

Watch the worked solution to Problem 9