Calculus - Lesson 15: Chain Rule (Part 2)

Applying Chain Rule with Function Tables

When working with composite functions where function values are given in tables rather than formulas, we can still apply the chain rule using the tabulated data.

Graph Description: A piecewise linear graph of function \(g(x)\) showing connected line segments. The graph starts at the origin, rises to a peak at point \((1, 4)\) with slope 2, then descends to point \((2, 2)\), and continues descending with slope -4 to reach \((3, 0)\). Key values include \(g(1) = 2\), \(g(2) = 4\), and \(g(3) = 0\). The slopes at various points represent \(g'(x)\) values, with \(g'(3) = -4\) indicated.

Example 1: Chain Rule with Function Tables

Given the following function values and derivatives:

\(x\) 1 2 3
\(f(x)\) 3 2 1
\(f'(x)\) 4 5 6

From the graph: \(g(1) = 2\), \(g(2) = 4\), \(g(3) = 0\), \(g'(1) = 2\), \(g'(2)\) = DNE, \(g'(3) = -4\)

Define \(h(x) = f(g(x))\) and \(k(x) = g(f(x))\). Find \(h'(1)\) and \(k'(3)\).

Solution for \(h'(1)\):

Using the chain rule: \(h'(x) = f'(g(x)) \cdot g'(x)\)

\[h'(1) = f'(g(1)) \cdot g'(1)\]

From the table and graph: \(g(1) = 2\), so \(f'(g(1)) = f'(2) = 5\)

Also, \(g'(1) = 2\)

\[h'(1) = f'(2) \cdot g'(1) = 5 \cdot 2 = 10\]

Solution for \(k'(3)\):

Using the chain rule: \(k'(x) = g'(f(x)) \cdot f'(x)\)

\[k'(3) = g'(f(3)) \cdot f'(3)\]

From the table: \(f(3) = 1\), so \(g'(f(3)) = g'(1) = 2\)

Also, \(f'(3) = 6\)

\[k'(3) = g'(1) \cdot f'(3) = 2 \cdot 6 = 12\]

More Chain Rule Examples

Example 2: Exponential Function

Find \(\frac{dy}{dx}\) for \(y = e^{5x^2 - 8}\)

Solution:

Let \(u = 5x^2 - 8\) (inside function)

\(\frac{du}{dx} = 10x\)

Applying the chain rule:

\[\frac{dy}{dx} = \frac{d}{dx}[e^u] = \frac{de^u}{du} \cdot \frac{du}{dx}\] \[= e^u \cdot \frac{du}{dx}\] \[= e^{5x^2 - 8} \cdot 10x\]
Example 3: Nested Exponential and Sine

Find \(\frac{dy}{dx}\) for \(y = \sin(e^{3x})\)

Solution:

This requires applying the chain rule twice.

Let \(u = e^{3x}\) (inside function)

\[\frac{dy}{dx} = \frac{d}{dx}[\sin u] = \frac{d\sin u}{du} \cdot \frac{du}{dx}\] \[= \cos u \cdot \frac{du}{dx}\] \[= \cos(e^{3x}) \cdot \frac{d}{dx}[e^{3x}]\]

Now apply the chain rule again to \(\frac{d}{dx}[e^{3x}]\):

Let \(v = 3x\), so \(\frac{dv}{dx} = 3\)

\[\frac{d}{dx}[e^{3x}] = \frac{de^v}{dv} \cdot \frac{dv}{dx} = e^v \cdot 3 = e^{3x} \cdot 3\]

Therefore:

\[\frac{dy}{dx} = \cos(e^{3x}) \cdot e^{3x} \cdot 3\]
Example 4: Cosecant of Cosine

Find \(\frac{dy}{dx}\) for \(y = \csc(\cos(x^3 + 5))\)

Solution:

This requires multiple applications of the chain rule.

Let \(u = \cos(x^3 + 5)\)

\[\frac{dy}{dx} = \frac{d}{dx}[\csc u] = \frac{d\csc u}{du} \cdot \frac{du}{dx}\] \[= -\csc u \cot u \cdot \frac{du}{dx}\] \[= -\csc(\cos(x^3 + 5)) \cot(\cos(x^3 + 5)) \cdot \frac{d}{dx}[\cos(x^3 + 5)]\]

Now find \(\frac{d}{dx}[\cos(x^3 + 5)]\):

Let \(v = x^3 + 5\), so \(\frac{dv}{dx} = 3x^2\)

\[\frac{d}{dx}[\cos v] = \frac{d\cos v}{dv} \cdot \frac{dv}{dx} = -\sin v \cdot 3x^2 = -\sin(x^3 + 5) \cdot 3x^2\]

Putting it all together:

\[\frac{dy}{dx} = -\csc(\cos(x^3 + 5)) \cot(\cos(x^3 + 5)) \cdot (-\sin(x^3 + 5)) \cdot 3x^2\] \[= \csc(\cos(x^3 + 5)) \cot(\cos(x^3 + 5)) \cdot \sin(x^3 + 5) \cdot 3x^2\]

General Formula Extension

Extended Chain Rule for Nested Compositions:

For a composition of three functions \(f(g(h(x)))\):

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

In Leibniz notation, with \(u = g(h(x))\):

\[\frac{d}{dx}[f(u)] = \frac{df}{du} \cdot \frac{du}{dx}\]
Example 5: Product with Chain Rule

Find \(\frac{dy}{dx}\) for \(y = [\sec(x^2) \cdot (x^2 + 9)]^{3/4}\)

Solution:

Let \(u = \sec(x^2) \cdot (x^2 + 9)\)

Applying the chain rule:

\[\frac{dy}{dx} = \frac{d}{dx}[u^{3/4}] = \frac{3}{4}u^{-1/4} \cdot \frac{du}{dx}\] \[= \frac{3}{4}[\sec(x^2)(x^2 + 9)]^{-1/4} \cdot \frac{d}{dx}[\sec(x^2)(x^2 + 9)]\]

Now apply the product rule to find \(\frac{du}{dx}\):

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

For \(\frac{d}{dx}[\sec(x^2)]\), use the chain rule with \(v = x^2\):

\[\frac{d}{dx}[\sec v] = \sec v \tan v \cdot \frac{dv}{dx} = \sec(x^2)\tan(x^2) \cdot 2x\]

Therefore:

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

Final answer:

\[\frac{dy}{dx} = \frac{3}{4}[\sec(x^2)(x^2 + 9)]^{-1/4} \left[\sec(x^2)\tan(x^2) \cdot 2x \cdot (x^2 + 9) + \sec(x^2) \cdot 3x^2\right]\]
Example 6: Quotient with Chain Rule

Find \(\frac{dy}{dx}\) for \(y = \frac{\tan(x^3 + 5)}{e^{\sin x}}\)

Solution:

Let \(N = \tan(x^3 + 5)\) and \(D = e^{\sin x}\)

Using the quotient rule:

\[y' = \frac{N'D - ND'}{D^2}\]

Find \(N'\) using the chain rule:

\[N' = \frac{d}{dx}[\tan(x^3 + 5)] = \sec^2(x^3 + 5) \cdot 3x^2\]

Find \(D'\) using the chain rule:

\[D' = \frac{d}{dx}[e^{\sin x}] = e^{\sin x} \cdot \cos x\]

Therefore:

\[y' = \frac{\sec^2(x^3 + 5) \cdot 3x^2 \cdot e^{\sin x} - \tan(x^3 + 5) \cdot e^{\sin x} \cos x}{(e^{\sin x})^2}\] \[= \frac{e^{\sin x}[\sec^2(x^3 + 5) \cdot 3x^2 - \tan(x^3 + 5) \cos x]}{e^{2\sin x}}\] \[= \frac{\sec^2(x^3 + 5) \cdot 3x^2 - \tan(x^3 + 5) \cos x}{e^{\sin x}}\]
Example 7: Composition with Multiple Functions

Given \(g(x) = \cos(\pi + f(x))\), where \(f(1) = \frac{1}{2}\) and \(f'(1) = 3\), find \(g'(1)\).

Solution:

Using the chain rule:

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

Let \(u = \pi + f(x)\), so \(\frac{du}{dx} = f'(x)\)

\[g'(x) = \frac{d\cos u}{du} \cdot \frac{du}{dx} = -\sin u \cdot f'(x)\] \[= -\sin(\pi + f(x)) \cdot f'(x)\]

Evaluate at \(x = 1\):

\[g'(1) = -\sin(\pi + f(1)) \cdot f'(1)\] \[= -\sin\left(\pi + \frac{1}{2}\right) \cdot 3\] \[= -\sin\left(\frac{3\pi}{2}\right) \cdot 3\] \[= -(-1) \cdot 3 = 3\]

Alternatively, using the product-to-sum identity \(\pi \frac{d}{dv}v^2 = \pi \frac{dv^2}{dv} \cdot \frac{dv}{dx}\):

\[= -\pi(2v) \cdot v'\] \[= -\pi \cdot 2f(x) \cdot f'(x)\] \[g'(1) = -\pi \cdot 2 \cdot \frac{1}{2} \cdot 3 = 2\pi f(x) \cdot f'(x)\]

Key Takeaway: When applying the chain rule multiple times, work from the outside in. Identify the outermost function first, then systematically work through each nested function, multiplying the derivatives as you go.