PAGE 1

3.7 The Chain Rule (part 2)

Remember, all basic rules remain the same, just need the extra \(\frac{du}{dx}\) to account for the fact that \(u\) is not just \(x\).

Examples of General Rules

  • \[\frac{d}{dx} u^n = n u^{n-1} \cdot \frac{du}{dx}\]
  • \[\frac{d}{dx} \sin(u) = \cos(u) \cdot \frac{du}{dx}\]
  • \[\frac{d}{dx} e^u = e^u \cdot \frac{du}{dx}\]

Example

\[y = \sqrt{3x + 2e^{8x}} = (3x + 2e^{8x})^{1/2}\]

In the form of \(u^n\), deriv. is \(n u^{n-1} \cdot \frac{du}{dx}\)

\[y' = \frac{1}{2} (3x + 2e^{8x})^{-1/2} \cdot \frac{d}{dx} (3x + 2e^{8x})\]

\[= \frac{1}{2} (3x + 2e^{8x})^{-1/2} \cdot (3 + 2 \frac{d}{dx} e^{8x})\]

Another chain rule:

Form \(e^u\), deriv. is \(e^u \frac{du}{dx}\)

\[= \frac{1}{2} (3x + 2e^{8x})^{-1/2} \cdot (3 + 2 \cdot e^{8x} \cdot 8)\]

PAGE 2

\[= \frac{1}{2} (3x + 2e^{8x})^{-1/2} (3 + 16e^{8x}) = \frac{3 + 16e^{8x}}{2 \sqrt{3x + 2e^{8x}}}\]


Example

\[y = [(x+8)(x^2+6)]^8\]

Form: \(u^8\), deriv. \(8u^7 \cdot \frac{du}{dx}\)

\[y' = 8 [(x+8)(x^2+6)]^7 \cdot \frac{d}{dx} [(x+8)(x^2+6)]\]

Product rule or multiply out first then differentiate

\[= 8 [(x+8)(x^2+6)]^7 \cdot [(x+8) \frac{d}{dx}(x^2+6) + (x^2+6) \frac{d}{dx}(x+8)]\]

\[= 8 [(x+8)(x^2+6)]^7 \cdot [(x+8)(2x) + (x^2+6)(1)]\]

\[= 8 [(x+8)(x^2+6)]^7 \cdot [2x^2 + 16x + x^2 + 6]\]

\[= 8 [(x+8)(x^2+6)]^7 (3x^2 + 16x + 6)\]

PAGE 3

Example: Chain Rule Application

If \( f(-8) = -9 \), \( f'(-8) = 7 \) and \( g(x) = \sin(\pi f(x)) \).

Find \( g'(-8) \).

\( g(x) = \sin(\underbrace{\pi f(x)}_{u}) \)

Form: \( \sin(u) \)    deriv. is \( \cos(u) \cdot \frac{du}{dx} \)

Let's find \( g'(x) \):

\[ g'(x) = \cos(\pi f(x)) \cdot \frac{d}{dx}[\pi f(x)] \]\[ g'(x) = \cos(\pi f(x)) \cdot \pi f'(x) \]

Now, evaluate at \( x = -8 \):

\[ g'(-8) = \cos(\pi \cdot \underbrace{f(-8)}_{-9}) \cdot \pi \underbrace{f'(-8)}_{7} \]\[ = \cos(-9\pi) \cdot 7\pi \]\[ = (-1) \cdot 7\pi = -7\pi \]
PAGE 4

Example: Nested Chain Rule

\[ y = \tan^5(\sin(9x)) \]\[ = [\underbrace{\tan(\sin(9x))}_{u}]^5 \]

Form: \( u^5 \)    deriv. \( 5u^4 \cdot \frac{du}{dx} \)

\[ y' = 5[\tan(\sin(9x))]^4 \cdot \underbrace{\frac{d}{dx}[\tan(\sin(9x))]}_{\text{form: } \tan(u) \text{ deriv. } \sec^2(u) \cdot \frac{du}{dx}} \]\[ = 5[\tan(\sin(9x))]^4 \cdot \sec^2(\sin(9x)) \cdot \underbrace{\frac{d}{dx} \sin(9x)}_{\text{form: } \sin(u) \text{ deriv. } \cos(u) \cdot \frac{du}{dx}} \]\[ = 5[\tan(\sin(9x))]^4 \cdot \sec^2(\sin(9x)) \cdot \cos(9x) \cdot 9 \]

Final Simplified Answer

\[ = 45 \tan^4(\sin(9x)) \cdot \sec^2(\sin(9x)) \cos(9x) \]
PAGE 5

Example: Nested Exponential Functions

If \( f(x) = e^{e^{e^x}} \), find \( f'(0) \).

\( f(x) = e^{(e^{e^x})} \)

Form: \( e^u \) where \( u = e^{e^x} \). The derivative is \( e^u \cdot \frac{du}{dx} \).

\( f'(x) = e^{e^{e^x}} \cdot \frac{d}{dx}(e^{e^x}) \)

Inner form: \( e^u \) where \( u = e^x \). The derivative is \( e^u \cdot \frac{du}{dx} \).

\( = e^{e^{e^x}} \cdot e^{e^x} \cdot \frac{d}{dx}(e^x) \)

\( f'(x) = e^{e^{e^x}} \cdot e^{e^x} \cdot e^x \)

Evaluating at \( x = 0 \)

\( f'(0) = e^{e^{e^0}} \cdot e^{e^0} \cdot e^0 \)

\( = e^{e^1} \cdot e^1 \cdot 1 \)

\( = e^e \cdot e \)

\( = e^{e+1} \)

PAGE 6

How do we know when to use the Chain Rule?

Technical answer: with any composite functions (functions of functions).

More practical answer: if you wonder if chain rule is needed, it is because if you use the chain rule even when you don't have to, the answer is still right.

Example 1: Simple Function

For example, \( y = \sin(x) \)

Form: \( \sin(u) \), derivative is \( \cos(u) \cdot \frac{du}{dx} \)

\( = \sin(u) \) with \( u = x \)

\( y' = \cos(u) \cdot \frac{du}{dx} = \cos(u) \cdot \frac{d}{dx}(x) \)

\( = \cos(x) \cdot (1) = \cos(x) \) as expected.

Example 2: Composite Function

But if chain rule is needed but you don't use it, the answer is wrong.

For example, \( y = \sin(x^2) \)

\( u = x^2 \), Form: \( \sin(u) \)

\( y' = \cos(u) \cdot \frac{du}{dx} = \cos(x^2) \cdot (2x) \)

Note: \( 2x \) will be missing if Chain Rule is not used.

When in doubt, Chain it out.
PAGE 7

Example: Product Rule and Chain Rule

Given the function:

\[ y = \sec(9x^3 + x^2) e^{9x^3} \]

Form: Product of two functions \( f(x) \cdot g(x) \)

  • \( f(x) = \sec(9x^3 + x^2) \)
  • \( g(x) = e^{9x^3} \)

Applying the product rule \( y' = f(x)g'(x) + g(x)f'(x) \):

\[ y' = \sec(9x^3 + x^2) \cdot \frac{d}{dx}(e^{9x^3}) + e^{9x^3} \cdot \frac{d}{dx}(\sec(9x^3 + x^2)) \]

Chain Rule Annotations:

  • For \( e^u \): \( \frac{d}{dx}(e^u) = e^u \frac{du}{dx} \)
  • For \( \sec(u) \): \( \frac{d}{dx}(\sec(u)) = \sec(u)\tan(u) \frac{du}{dx} \)

Differentiating the inner functions:

\[ = \sec(9x^3 + x^2) \cdot e^{9x^3} \cdot \frac{d}{dx}(9x^3) + e^{9x^3} \cdot \sec(9x^3 + x^2) \tan(9x^3 + x^2) \cdot \frac{d}{dx}(9x^3 + x^2) \]

Final result after computing inner derivatives:

\[ = \sec(9x^3 + x^2) \cdot e^{9x^3} \cdot 27x^2 + e^{9x^3} \cdot \sec(9x^3 + x^2) \tan(9x^3 + x^2) (27x^2 + 2x) \]
PAGE 8

Example: Quotient Rule and Nested Chain Rule

Given the function:

\[ y = \frac{e^{3x^2+2}}{\cos(\sin(x^2))} \]

Strategy: Use the quotient rule to start.

Applying the quotient rule:

\[ y' = \frac{\cos(\sin(x^2)) \cdot \frac{d}{dx}(e^{3x^2+2}) - e^{3x^2+2} \cdot \frac{d}{dx}(\cos(\sin(x^2)))}{[\cos(\sin(x^2))]^2} \]

Note: For the second term in the numerator, use the chain rule for \( \cos(u) \) where \( u = \sin(x^2) \).

Expanding the derivatives:

\[ = \frac{\cos(\sin(x^2)) \cdot e^{3x^2+2} \cdot 6x - e^{3x^2+2} \cdot (-\sin(\sin(x^2))) \cdot \frac{d}{dx}(\sin(x^2))}{[\dots]^2} \]

Inner Chain Rule:

\[ \frac{d}{dx}(\sin(u)) = \cos(u) \cdot \frac{du}{dx} \]

\[ = \cos(x^2) \cdot 2x \]