Chain Rule
How do we take the derivative of sin ( 3 x ) \sin(3x) sin ( 3 x ) ? We know how to take the derivative of sin ( x ) \sin(x) sin ( x ) , so it may seem like sin ( 3 x ) \sin(3x) sin ( 3 x ) would just be cos ( 3 x ) \cos(3x) cos ( 3 x ) — but it's not. Instead, we have to apply the chain rule. The chain rule is a simple yet incredibly important rule in calculus that allows us to take the derivative of more advanced functions more easily.
At its most basic level, the chain rule states that if:
f ( x ) = g ( h ( x ) ) f(x) = g(h(x)) f ( x ) = g ( h ( x ))
then:
f ′ ( x ) = d f ( x ) d x = g ′ ( h ( x ) ) h ′ ( x ) f'(x) = \frac{df(x)}{dx} = g'(h(x))h'(x) f ′ ( x ) = d x df ( x ) = g ′ ( h ( x )) h ′ ( x )
In words, this means that the derivative of a function f f f that equals g g g of h h h of x x x , where h h h and g g g are any functions, equals g ′ g' g ′ evaluated at h ( x ) h(x) h ( x ) , multiplied by h ′ ( x ) h'(x) h ′ ( x ) . This may initially seem strange or abstract, and makes more sense with an example.
Example 1: What is the derivative of sin ( 3 x ) \sin(3x) sin ( 3 x ) ?
Solution: Let f ( x ) = sin ( 3 x ) = g ( h ( x ) ) f(x) = \sin(3x) = g(h(x)) f ( x ) = sin ( 3 x ) = g ( h ( x )) where g ( x ) = sin ( x ) g(x) = \sin(x) g ( x ) = sin ( x ) and h ( x ) = 3 x h(x) = 3x h ( x ) = 3 x . Then:
f ′ ( x ) = d f ( x ) d x = g ′ ( h ( x ) ) h ′ ( x ) = cos ( 3 x ) ⋅ 3 = 3 cos ( 3 x ) f'(x) = \frac{df(x)}{dx} = g'(h(x))h'(x) = \cos(3x) \cdot 3 = \boxed{3\cos(3x)} f ′ ( x ) = d x df ( x ) = g ′ ( h ( x )) h ′ ( x ) = cos ( 3 x ) ⋅ 3 = 3 cos ( 3 x )
since the derivative of sin \sin sin is cos \cos cos , and the derivative of 3 x 3x 3 x is 3 3 3 .
This principle can be extended to even more complex functions, as in the example below.
Example 2: What is the derivative of sin ( sin ( sin ( x ) ) ) \sin(\sin(\sin(x))) sin ( sin ( sin ( x ))) ?
Solution: Let f ( x ) = sin ( sin ( sin ( x ) ) ) = g ( h ( x ) ) f(x) = \sin(\sin(\sin(x))) = g(h(x)) f ( x ) = sin ( sin ( sin ( x ))) = g ( h ( x )) where:
g ( x ) = sin ( x ) , h ( x ) = p ( q ( x ) ) = sin ( sin ( x ) ) , p ( x ) = sin ( x ) , q ( x ) = sin ( x ) g(x) = \sin(x), \quad h(x) = p(q(x)) = \sin(\sin(x)), \quad p(x) = \sin(x), \quad q(x) = \sin(x) g ( x ) = sin ( x ) , h ( x ) = p ( q ( x )) = sin ( sin ( x )) , p ( x ) = sin ( x ) , q ( x ) = sin ( x )
Then, applying the chain rule repeatedly:
f ′ ( x ) = g ′ ( h ( x ) ) ⋅ h ′ ( x ) = cos ( sin ( sin ( x ) ) ) ⋅ h ′ ( x ) f'(x) = g'(h(x)) \cdot h'(x) = \cos(\sin(\sin(x))) \cdot h'(x) f ′ ( x ) = g ′ ( h ( x )) ⋅ h ′ ( x ) = cos ( sin ( sin ( x ))) ⋅ h ′ ( x )
= cos ( sin ( sin ( x ) ) ) ⋅ p ′ ( q ( x ) ) ⋅ q ′ ( x ) = \cos(\sin(\sin(x))) \cdot p'(q(x)) \cdot q'(x) = cos ( sin ( sin ( x ))) ⋅ p ′ ( q ( x )) ⋅ q ′ ( x )
= cos ( sin ( sin ( x ) ) ) ⋅ cos ( sin ( x ) ) ⋅ cos ( x ) = \boxed{\cos(\sin(\sin(x))) \cdot \cos(\sin(x)) \cdot \cos(x)} = cos ( sin ( sin ( x ))) ⋅ cos ( sin ( x )) ⋅ cos ( x )
Proof of the Chain Rule
We can express the derivative of f ( g ( x ) ) f(g(x)) f ( g ( x )) as:
( f ( g ( x ) ) ) ′ = lim x → a f ( g ( x ) ) − f ( g ( a ) ) x − a (f(g(x)))' = \lim_{x \to a} \frac{f(g(x)) - f(g(a))}{x - a} ( f ( g ( x )) ) ′ = x → a lim x − a f ( g ( x )) − f ( g ( a ))
Noting that g ( x ) ≠ g ( a ) g(x) \neq g(a) g ( x ) = g ( a ) for x x x near a a a (unless the function is a horizontal line, in which case the chain rule is unnecessary):
= lim x → a f ( g ( x ) ) − f ( g ( a ) ) g ( x ) − g ( a ) ⋅ g ( x ) − g ( a ) x − a = \lim_{x \to a} \frac{f(g(x)) - f(g(a))}{g(x) - g(a)} \cdot \frac{g(x) - g(a)}{x - a} = x → a lim g ( x ) − g ( a ) f ( g ( x )) − f ( g ( a )) ⋅ x − a g ( x ) − g ( a )
Since the limit of a product is the product of the limits, and using the definition of a derivative, this equals the familiar result f ′ ( g ( x ) ) ⋅ g ′ ( x ) f'(g(x)) \cdot g'(x) f ′ ( g ( x )) ⋅ g ′ ( x ) .
Practice Problems
Example 3: A rocket has the position function r ( t ) = 5 t + 0.5 sin ( 3 t 2 + 4 t ) r(t) = 5t + 0.5\sin(3t^2 + 4t) r ( t ) = 5 t + 0.5 sin ( 3 t 2 + 4 t ) . What is its velocity?
Solution: Taking the derivative using the chain rule:
v ( t ) = 5 + 0.5 cos ( 3 t 2 + 4 t ) ( 6 t + 4 ) \boxed{v(t) = 5 + 0.5\cos(3t^2 + 4t)(6t + 4)} v ( t ) = 5 + 0.5 cos ( 3 t 2 + 4 t ) ( 6 t + 4 )
Take the derivative of the following functions.
Problem 1: 4 ( 5 x + 34 ) 2 4(5x + 34)^2 4 ( 5 x + 34 ) 2
Answer: 8 ( 5 x + 34 ) ⋅ 5 8(5x + 34) \cdot 5 8 ( 5 x + 34 ) ⋅ 5
Problem 2: 5 ( 4 x 2 + 6 x + 38 ) 2 5(4x^2 + 6x + 38)^2 5 ( 4 x 2 + 6 x + 38 ) 2
Answer: 10 ( 4 x 2 + 6 x + 38 ) ( 8 x + 6 ) 10(4x^2 + 6x + 38)(8x + 6) 10 ( 4 x 2 + 6 x + 38 ) ( 8 x + 6 )
Problem 3: 6 ( 2 x + 3 ) 3 6(2x + 3)^3 6 ( 2 x + 3 ) 3
Answer: 18 ( 2 x + 3 ) 2 ⋅ 2 18(2x + 3)^2 \cdot 2 18 ( 2 x + 3 ) 2 ⋅ 2
Problem 4: sin ( 4 x 2 + 3 ) \sin(4x^2 + 3) sin ( 4 x 2 + 3 )
Answer: cos ( 4 x 2 + 3 ) ⋅ 8 x \cos(4x^2 + 3) \cdot 8x cos ( 4 x 2 + 3 ) ⋅ 8 x
Problem 5: tan ( 3 x + 2 ) \tan(3x + 2) tan ( 3 x + 2 )
Answer: sec 2 ( 3 x + 2 ) ⋅ 3 \sec^2(3x + 2) \cdot 3 sec 2 ( 3 x + 2 ) ⋅ 3
Problem 6: ( 4 x − 3 2 x + 1 ) 2 \left(\dfrac{4x - 3}{2x + 1}\right)^2 ( 2 x + 1 4 x − 3 ) 2
Answer: 2 ( 4 x − 3 2 x + 1 ) ( ( 2 x + 1 ) ( 4 ) − ( 4 x − 3 ) ( 2 ) ( 2 x + 1 ) 2 ) 2\left(\dfrac{4x-3}{2x+1}\right)\left(\dfrac{(2x+1)(4) - (4x-3)(2)}{(2x+1)^2}\right) 2 ( 2 x + 1 4 x − 3 ) ( ( 2 x + 1 ) 2 ( 2 x + 1 ) ( 4 ) − ( 4 x − 3 ) ( 2 ) )
Problem 7: sin ( cos ( 4 x 2 ) ) \sin(\cos(4x^2)) sin ( cos ( 4 x 2 ))
Answer: cos ( cos ( 4 x 2 ) ) ⋅ ( − sin ( 4 x 2 ) ) ⋅ 8 x \cos(\cos(4x^2)) \cdot (-\sin(4x^2)) \cdot 8x cos ( cos ( 4 x 2 )) ⋅ ( − sin ( 4 x 2 )) ⋅ 8 x
Problem 8: sin ( 10 x ) \sin(10x) sin ( 10 x )
Answer: cos ( 10 x ) ⋅ 10 \cos(10x) \cdot 10 cos ( 10 x ) ⋅ 10
Problem 9: tan ( 3 x 2 + 4 x ) \tan(3x^2 + 4x) tan ( 3 x 2 + 4 x )
Answer: sec 2 ( 3 x 2 + 4 x ) ⋅ ( 6 x + 4 ) \sec^2(3x^2 + 4x) \cdot (6x + 4) sec 2 ( 3 x 2 + 4 x ) ⋅ ( 6 x + 4 )
Problem 10: 3 e 3 x 3e^{3x} 3 e 3 x
Answer: 3 e 3 x ⋅ 3 = 9 e 3 x 3e^{3x} \cdot 3 = 9e^{3x} 3 e 3 x ⋅ 3 = 9 e 3 x
Problem 11: 5 e 16 x 2 + 4 x 5e^{16x^2 + 4x} 5 e 16 x 2 + 4 x
Answer: 5 e 16 x 2 + 4 x ( 32 x + 4 ) 5e^{16x^2 + 4x}(32x + 4) 5 e 16 x 2 + 4 x ( 32 x + 4 )
Problem 12: sin ( 5 e 16 x 2 + 4 x ) \sin\!\left(5e^{16x^2 + 4x}\right) sin ( 5 e 16 x 2 + 4 x )
Answer: cos ( 5 e 16 x 2 + 4 x ) ⋅ 5 e 16 x 2 + 4 x ⋅ ( 32 x + 4 ) \cos\!\left(5e^{16x^2+4x}\right) \cdot 5e^{16x^2+4x} \cdot (32x + 4) cos ( 5 e 16 x 2 + 4 x ) ⋅ 5 e 16 x 2 + 4 x ⋅ ( 32 x + 4 )
Problem 13: sin ( cos ( sin ( cos ( 10 x 2 + 1 ) ) ) ) \sin(\cos(\sin(\cos(10x^2 + 1)))) sin ( cos ( sin ( cos ( 10 x 2 + 1 ))))
Answer: cos ( cos ( sin ( cos ( 10 x 2 + 1 ) ) ) ) ⋅ ( − sin ( sin ( cos ( 10 x 2 + 1 ) ) ) ) ⋅ cos ( cos ( 10 x 2 + 1 ) ) ⋅ ( − sin ( 10 x 2 + 1 ) ) ⋅ 20 x \cos(\cos(\sin(\cos(10x^2+1)))) \cdot (-\sin(\sin(\cos(10x^2+1)))) \cdot \cos(\cos(10x^2+1)) \cdot (-\sin(10x^2+1)) \cdot 20x cos ( cos ( sin ( cos ( 10 x 2 + 1 )))) ⋅ ( − sin ( sin ( cos ( 10 x 2 + 1 )))) ⋅ cos ( cos ( 10 x 2 + 1 )) ⋅ ( − sin ( 10 x 2 + 1 )) ⋅ 20 x
Status Source Problem Name Difficulty Tags
AIME Very Hard Show Tags Combinatorics, Recursion