Chain Rule

How do we take the derivative of sin⁡(3x)\sin(3x)? We know how to take the derivative of sin⁡(x)\sin(x), so it may seem like sin⁡(3x)\sin(3x) would just be cos⁡(3x)\cos(3x) — 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))

then:

f′(x)=df(x)dx=g′(h(x))h′(x)f'(x) = \frac{df(x)}{dx} = g'(h(x))h'(x)

In words, this means that the derivative of a function ff that equals gg of hh of xx, where hh and gg are any functions, equals g′g' evaluated at h(x)h(x), multiplied by 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⁡(3x)\sin(3x)?

Solution: Let f(x)=sin⁡(3x)=g(h(x))f(x) = \sin(3x) = g(h(x)) where g(x)=sin⁡(x)g(x) = \sin(x) and h(x)=3xh(x) = 3x. Then:

f′(x)=df(x)dx=g′(h(x))h′(x)=cos⁡(3x)⋅3=3cos⁡(3x)f'(x) = \frac{df(x)}{dx} = g'(h(x))h'(x) = \cos(3x) \cdot 3 = \boxed{3\cos(3x)}

since the derivative of sin⁡\sin is cos⁡\cos, and the derivative of 3x3x is 33.

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)))?

Solution: Let 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)

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)

=cos⁡(sin⁡(sin⁡(x)))⋅p′(q(x))⋅q′(x)= \cos(\sin(\sin(x))) \cdot p'(q(x)) \cdot q'(x)

=cos⁡(sin⁡(sin⁡(x)))⋅cos⁡(sin⁡(x))⋅cos⁡(x)= \boxed{\cos(\sin(\sin(x))) \cdot \cos(\sin(x)) \cdot \cos(x)}

Proof of the Chain Rule

We can express the derivative of f(g(x))f(g(x)) as:

(f(g(x)))′=lim⁡x→af(g(x))−f(g(a))x−a(f(g(x)))' = \lim_{x \to a} \frac{f(g(x)) - f(g(a))}{x - a}

Noting that g(x)≠g(a)g(x) \neq g(a) for xx near aa (unless the function is a horizontal line, in which case the chain rule is unnecessary):

=lim⁡x→af(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}

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).

Practice Problems

Example 3: A rocket has the position function r(t)=5t+0.5sin⁡(3t2+4t)r(t) = 5t + 0.5\sin(3t^2 + 4t). What is its velocity?

Solution: Taking the derivative using the chain rule:

v(t)=5+0.5cos⁡(3t2+4t)(6t+4)\boxed{v(t) = 5 + 0.5\cos(3t^2 + 4t)(6t + 4)}

Take the derivative of the following functions.

Problem 1: 4(5x+34)24(5x + 34)^2

Answer: 8(5x+34)⋅58(5x + 34) \cdot 5

Problem 2: 5(4x2+6x+38)25(4x^2 + 6x + 38)^2

Answer: 10(4x2+6x+38)(8x+6)10(4x^2 + 6x + 38)(8x + 6)

Problem 3: 6(2x+3)36(2x + 3)^3

Answer: 18(2x+3)2⋅218(2x + 3)^2 \cdot 2

Problem 4: sin⁡(4x2+3)\sin(4x^2 + 3)

Answer: cos⁡(4x2+3)⋅8x\cos(4x^2 + 3) \cdot 8x

Problem 5: tan⁡(3x+2)\tan(3x + 2)

Answer: sec⁡2(3x+2)⋅3\sec^2(3x + 2) \cdot 3

Problem 6: (4x−32x+1)2\left(\dfrac{4x - 3}{2x + 1}\right)^2

Answer: 2(4x−32x+1)((2x+1)(4)−(4x−3)(2)(2x+1)2)2\left(\dfrac{4x-3}{2x+1}\right)\left(\dfrac{(2x+1)(4) - (4x-3)(2)}{(2x+1)^2}\right)

Problem 7: sin⁡(cos⁡(4x2))\sin(\cos(4x^2))

Answer: cos⁡(cos⁡(4x2))⋅(−sin⁡(4x2))⋅8x\cos(\cos(4x^2)) \cdot (-\sin(4x^2)) \cdot 8x

Problem 8: sin⁡(10x)\sin(10x)

Answer: cos⁡(10x)⋅10\cos(10x) \cdot 10

Problem 9: tan⁡(3x2+4x)\tan(3x^2 + 4x)

Answer: sec⁡2(3x2+4x)⋅(6x+4)\sec^2(3x^2 + 4x) \cdot (6x + 4)

Problem 10: 3e3x3e^{3x}

Answer: 3e3x⋅3=9e3x3e^{3x} \cdot 3 = 9e^{3x}

Problem 11: 5e16x2+4x5e^{16x^2 + 4x}

Answer: 5e16x2+4x(32x+4)5e^{16x^2 + 4x}(32x + 4)

Problem 12: sin⁡ ⁣(5e16x2+4x)\sin\!\left(5e^{16x^2 + 4x}\right)

Answer: cos⁡ ⁣(5e16x2+4x)⋅5e16x2+4x⋅(32x+4)\cos\!\left(5e^{16x^2+4x}\right) \cdot 5e^{16x^2+4x} \cdot (32x + 4)

Problem 13: sin⁡(cos⁡(sin⁡(cos⁡(10x2+1))))\sin(\cos(\sin(\cos(10x^2 + 1))))

Answer: cos⁡(cos⁡(sin⁡(cos⁡(10x2+1))))⋅(−sin⁡(sin⁡(cos⁡(10x2+1))))⋅cos⁡(cos⁡(10x2+1))⋅(−sin⁡(10x2+1))⋅20x\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

StatusSourceProblem NameDifficultyTags
AIMEVery Hard
Show TagsCombinatorics, Recursion

Module Progress:

Join the Discord Community!

Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.