Source codeVideos

Command Palette

Search for a command to run...

Derivative Functions

Chain Rule in Derivative

Understanding Composite Functions

Imagine you have a machine that transforms a number (the first function), and its result is immediately fed into another machine to be processed again (the second function). This process is called a composite function. Mathematically, if we have g(x)g(x) as the inner function and f(u)f(u) as the outer function, their composition is y=f(g(x))y = f(g(x)).

The chain rule is a method for finding the derivative of functions like this, where one function is "nested" inside another.

The Chain Rule Theorem

To differentiate a composite function, we can't just differentiate it piece by piece. There's an elegant rule that connects the derivative of the outer function with the derivative of the inner function.

If y=f(g(x))y = f(g(x)), then its derivative is the product of the derivative of the outer function with respect to the inner function and the derivative of the inner function itself.

Formally, if we let u=g(x)u = g(x), then y=f(u)y = f(u). Its derivative is defined as:

dydx=dydududx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}

This formula is known as the chain rule. Essentially, we differentiate from the outermost "layer" to the innermost layer and then multiply the results.

Applying the Chain Rule

Let's try applying this theorem to a few cases to get a better feel for it.

Power Form Functions

Find the first derivative of y=(x24x2)8y = (x^2 - 4x - 2)^8.

Solution:

First, we need to break this function down into two parts: an outer function and an inner function.

  • Inner function (uu) is the expression inside the parentheses: u=x24x2u = x^2 - 4x - 2.
  • Outer function (yy) is the power operation: y=u8y = u^8.

Next, we find the derivative of each function:

  • Derivative of the inner function: dudx=2x4\frac{du}{dx} = 2x - 4.
  • Derivative of the outer function: dydu=8u7\frac{dy}{du} = 8u^7.

Now, we can combine them using the chain rule:

dydx=dydududx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}
dydx=8u7(2x4)\frac{dy}{dx} = 8u^7 \cdot (2x - 4)

Finally, we substitute uu back in and simplify the expression:

dydx=8(x24x2)7(2x4)\frac{dy}{dx} = 8(x^2 - 4x - 2)^7 (2x - 4)
dydx=(16x32)(x24x2)7\frac{dy}{dx} = (16x - 32)(x^2 - 4x - 2)^7

Trigonometric Functions

Find the first derivative of y=cos4(34x)y = \cos^4(3 - 4x).

Solution:

We can rewrite this function as y=(cos(34x))4y = (\cos(3 - 4x))^4. This is a case where we need to apply the chain rule more than once because there are three layers of functions.

  • Innermost function: v=34xv = 3 - 4x
  • Middle function: u=cos(v)u = \cos(v)
  • Outermost function: y=u4y = u^4

Then, we differentiate each layer:

  • Derivative of the outermost function: dydu=4u3\frac{dy}{du} = 4u^3
  • Derivative of the middle function: dudv=sin(v)\frac{du}{dv} = -\sin(v)
  • Derivative of the innermost function: dvdx=4\frac{dv}{dx} = -4

Combine them all using the chain rule:

dydx=dydududvdvdx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dv} \cdot \frac{dv}{dx}
dydx=(4u3)(sin(v))(4)\frac{dy}{dx} = (4u^3) \cdot (-\sin(v)) \cdot (-4)

Now, substitute uu and vv back in step-by-step to get the final result:

dydx=(4cos3(v))(sin(v))(4)\frac{dy}{dx} = (4\cos^3(v)) \cdot (-\sin(v)) \cdot (-4)
dydx=16cos3(v)sin(v)\frac{dy}{dx} = 16\cos^3(v)\sin(v)
dydx=16cos3(34x)sin(34x)\frac{dy}{dx} = 16\cos^3(3 - 4x)\sin(3 - 4x)

Exercises

  1. Find the first derivative of y=(3x21)3y = (3x^2 - 1)^3.
  2. Find the first derivative of y=sin3(2x)y = \sin^3(2x).

Answer Key

  1. Solution for y=(3x21)3y = (3x^2 - 1)^3

    Step 1: Identify the functions

    • Inner function: u=3x21u = 3x^2 - 1
    • Outer function: y=u3y = u^3

    Step 2: Find the derivative of each

    • dudx=6x\frac{du}{dx} = 6x
    • dydu=3u2\frac{dy}{du} = 3u^2

    Step 3: Combine with the chain rule

    dydx=dydududx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}
    dydx=3u26x=18xu2\frac{dy}{dx} = 3u^2 \cdot 6x = 18x \cdot u^2

    Step 4: Don't forget to substitute back

    dydx=18x(3x21)2\frac{dy}{dx} = 18x(3x^2 - 1)^2
  2. Solution for y=sin3(2x)y = \sin^3(2x)

    This function is y=(sin(2x))3y = (\sin(2x))^3. We'll use the multi-layered chain rule.

    Step 1: Identify the functions

    • Innermost function: v=2xv = 2x
    • Middle function: u=sin(v)u = \sin(v)
    • Outermost function: y=u3y = u^3

    Step 2: Find the derivative of each

    • dvdx=2\frac{dv}{dx} = 2
    • dudv=cos(v)\frac{du}{dv} = \cos(v)
    • dydu=3u2\frac{dy}{du} = 3u^2

    Step 3: Combine with the chain rule

    dydx=dydududvdvdx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dv} \cdot \frac{dv}{dx}
    dydx=(3u2)(cos(v))(2)\frac{dy}{dx} = (3u^2) \cdot (\cos(v)) \cdot (2)

    Step 4: Substitute back and simplify

    dydx=6u2cos(v)\frac{dy}{dx} = 6u^2 \cos(v)
    dydx=6sin2(v)cos(v)\frac{dy}{dx} = 6\sin^2(v) \cos(v)
    dydx=6sin2(2x)cos(2x)\frac{dy}{dx} = 6\sin^2(2x) \cos(2x)