Free AP Calculus AB/ Differentiation: Composite, Implicit and Inverse Functions
AP Calculus AB · Differentiation: Composite, Implicit and Inverse Functions · free lesson
The Chain Rule
The idea, then worked examples solved step by step, then practice questions whose numbers change every time you try them.
The idea
A function inside a function
Many functions are built by putting one function inside another. In y=(2x+1)2 the inside function is u=2x+1 and the outside function squares it, y=u2. Such a function is a composition, written f(g(x)): here g(x)=2x+1 is the inside and f(u)=u2 the outside.
The power rule alone does not give its derivative. Multiply out first, and compare with the power rule applied as if 2x+1 were x:
dxd[(2x+1)2]=dxd[4x2+4x+1]=8x+4=4(2x+1)
The power rule as if 2x+1 were x gives 2(2x+1)=4x+2, only half of the true derivative 8x+4. The missing factor 2 is the derivative of the inside, 2x+1. The inside changes twice as fast as x, and that speed is passed on to the outside.
The chain rule
Rule.
If g is differentiable at x and f is differentiable at g(x), then f(g(x)) is differentiable at x, and
dxd[f(g(x))]=f′(g(x))g′(x)
In words: the derivative of the outside, taken at the inside (the inside left as it is), times the derivative of the inside.
With u=g(x) and y=f(u) the rule has a second form, Leibniz's:
dxdy=dudy⋅dxdu
Read it as rates. If u changes 3 times as fast as x, and y changes 2 times as fast as u, then y changes 3⋅2=6 times as fast as x. Below, x moves along the top line, u=3x along the middle one and y=2u along the bottom one. Watch how far each dot has gone: when x has moved 1, u has moved 3 and y has moved 6.
Back to the first example. With u=2x+1 and y=u2, dudy=2u and dxdu=2, so dxdy=2u⋅2=4(2x+1), the derivative found by multiplying out.
The inside sets the pace
The graph of y=sin3x (red) runs through the same values as y=sinx (blue), three times as fast. So it is three times as steep: by the chain rule, dxd[sin3x]=(cos3x)(3), which is 3 at x=0, while the slope of sinx there is 1. The dashed lines are the two tangent lines at the origin.
The usual forms
Each line below is the chain rule with a known outside function; u is any differentiable function of x and u′ its derivative.
Function
Derivative
For example
un
nun−1⋅u′
dxd(3x−2)4=12(3x−2)3
u
2u1⋅u′
dxdx2+9=x2+9x
sinu, cosu
cosu⋅u′, −sinu⋅u′
dxdcos5x=−5sin(5x)
eu
eu⋅u′
dxdex2=2xex2
lnu
u1⋅u′
dxdln(x2+1)=x2+12x
A power of a trigonometric function is a composition too: sin3x means (sinx)3, a cube outside and sinx inside, so its derivative is 3sin2x⋅cosx. With three layers, apply the rule from the outside in, one layer at a time: sin2(3x) is a square, of a sine, of 3x, so its derivative is 2sin(3x)⋅cos(3x)⋅3.
Drag the slider to move the point of tangency along y=sin(x2). The slope there is the outside's derivative cos(a2) times the inside's derivative 2a. Far from 0 the inside grows fast, and the curve swings more and more steeply.
Values from a table
The rule works with numbers as well. Suppose g(1)=3, g′(1)=4, f′(3)=−2 and f′(1)=5. Let h(x)=f(g(x)). Then f′ is taken at the inside value g(1)=3, not at 1:
h′(1)=f′(g(1))g′(1)=f′(3)g′(1)=(−2)(4)=−8
Warning.
Four slips cost marks. Leaving out the derivative of the inside. Taking the outside's derivative at x instead of at g(x): here f′(1)g′(1) in place of f′(g(1))g′(1). Writing f′(g′(x)), the outside's derivative at the inside's derivative. Stopping one layer early when there are three.
Note.
On the AP exam, a free-response answer from a table shows f′(g(a))g′(a) with the table's values put in, as above, and then the number. The chain rule is used in almost every later topic: implicit differentiation, inverse functions, related rates, and integration by substitution.
Worked examples
Worked examples
Each example is a kind of question the AP exam asks on the chain rule, most of them in the no-calculator part. First name the outside function and the inside function. Then differentiate the outside with the inside left as it is, and multiply by the derivative of the inside. Every number in the working is found by the engine.
Example.
1. A power of a polynomial. Find the derivative of y=(x2−3x)4.
The outside is the fourth power, y=u4, and the inside is u=x2−3x, with dxdu=2x−3. By the chain rule, dxdy=4u3⋅dxdu:
dxdy=4(x2−3x)3⋅(2x−3)=4(2x−3)(x2−3x)3
Multiplying out (x2−3x)4 first would also work, but it gives a polynomial of degree 8 and takes much longer. The usual slip is to stop at 4(x2−3x)3, without the factor 2x−3.
Example.
2. A logarithm of a function: where is the tangent horizontal? Let f(x)=ln(x2+4). Find f′(x) and the value of x where the line tangent to the graph of f is horizontal.
The outside is lnu, whose derivative is u1; the inside is u=x2+4, with derivative 2x. So
f′(x)=x2+41⋅(2x)=x2+42x
The bottom x2+4 is never 0, so f′(x)=0 only where the top is 0, at x=0. The tangent is horizontal there, at the lowest point (0,ln4). Note that x2+4>0 for every x, so f is defined everywhere.
Example.
3. Three layers. Let y=cos3(2x). Find dxdy and its value at x=8π.
Write cos3(2x) as (cos(2x))3. From the outside in, it is a cube, of a cosine, of 2x. Each layer gives one factor:
Stopping after two layers loses the factor 2 at the end; the middle layer's minus sign is the other common slip.
Example.
4. The line tangent to a composite curve. Find an equation of the line tangent to the graph of y=x2+9 at x=4.
The point of tangency is (4,42+9)=(4,5). The outside is u, with derivative 2u1, and the inside u=x2+9 has derivative 2x:
y′=2x2+91⋅2x=x2+9x
At x=4 the slope is m=54=54. The point-slope form y−5=54(x−4) gives the tangent line
y=54x+59
Example.
5. From a table. The differentiable functions f and g have the values in the table. Let h(x)=f(g(x)) and k(x)=g(f(x)). Find h′(1) and k′(1).
x
f(x)
f′(x)
g(x)
g′(x)
1
2
3
2
−2
2
−1
5
4
7
For h, the inside is g, and g(1)=2. The outside's derivative is taken there, at x=2, from the second row:
h′(1)=f′(g(1))g′(1)=f′(2)g′(1)=(5)(−2)=−10
For k, the inside is f, and f(1)=2:
k′(1)=g′(f(1))f′(1)=g′(2)f′(1)=(7)(3)=21
Using f′(1) in place of f′(g(1)) for h′(1) would give (3)(−2)=−6, the most common wrong answer. The order of a composition matters: h′(1) and k′(1) are different.
Example.
6. Rates that multiply, with units. A hiker climbs a trail, gaining altitude at 1200 feet per hour. Near the trail, the air temperature falls by 3.5 degrees Fahrenheit for each 1000 feet of altitude. At what rate is the temperature around the hiker changing?
Let h be the altitude in feet, t the time in hours and T the temperature in °F. The temperature depends on altitude, and the altitude on time, so by the chain rule in Leibniz's form
The feet cancel, as the du cancels in dudy⋅dxdu. The temperature around the hiker falls at 4.2 °F per hour. Checking the units is a good test that the two rates were put together the right way: dividing them instead would give degree-hours per square foot, which is not a rate of temperature.
Practice
Answer AP-style questions on the chain rule. Each answer is checked, with the full solution, and every try brings new numbers. Practice needs a free account: it keeps your progress.