📚

 > 

♾️ 

 > 

🤙🏽

3.1 The Chain Rule

2 min readjune 18, 2024

Dalia Savy

Dalia Savy

Dalia Savy

Dalia Savy

3.1 The Chain Rule

Welcome to the first key topic of Unit 3! In this key topic, we’ll learn more about taking derivatives of functions within functions, also known as composite functions. If you need a review on how to take derivatives, review Unit 2!

🔄 Composite Functions

Yep! Composite functions are functions within functions, but what does this mean?

Given two functions f(x)f(x) and g(x)g(x), the composite function (fg)(x)\ (f \circ g)(x) is formed by applying function ff to the output of function gg.

Mathematically, the composite function is expressed as: (fg)(x)=f(g(x))\ (f \circ g)(x) = f(g(x)). You can basically think of g(x)g(x) as the “inner function” and f(x)f(x) as the “outer function.”

Composite Function Example

Let’s consider the following two functions:

f(x)=x2\textcolor{red}{f(x)=x^2}
g(x)=3x+1\textcolor{blue}{g(x)=3x+1}

If we’re taking a look at the composite function f(g(x)f(g(x), we have to be able to identify the inner function and the outer function. Let’s do that now! ⬇️

  • The function g(x)g(x) acts as the inner function. It takes xx, multiplies it by 3, and adds 1 to the result.
  • The function f(x)f(x) acts as the outer function. It takes the output of g(x)g(x) and squares it.

Therefore, we can think of this example as the following:

f(g(x))=(3x+1)2f(g(x))=\textcolor{red}{(}\textcolor{blue}{3x+1}\textcolor{red}{)^2}

Understanding how composite functions work is crucial in the chain rule. Now let’s get into it!


🔗 Definition of The Chain Rule

The Chain Rule is a method of differentiation, just like the Power Rule, Product Rule, and Quotient Rule from the previous unit. There are two notations for the Chain Rule.

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

Let’s go through each piece of this:

  • dydx\frac{dy}{dx} represents the overall derivative you are trying to find.
  • uu is your inner function.
  • dydu\frac{dy}{du} represents the derivative of the “outer” function with respect to the inner function.
  • dudx\frac{du}{dx} represents the derivative of the “inner” function with respect to xx.

The next notation will make this all clearer! 🙏🏿

ddt(f(g(x)))=f(g(x))g(x)\frac{d}{dt}(f(g(x))) = f'(g(x)) \cdot g'(x)

As you can see, in order to take the derivative of the composite function, you are taking the derivative from the outside ⬅️ to the inside ➡️. This will repeat if there is another function within g(x)g(x).

🪜Steps to Chain Rule

To help break the chain rule down, follow these steps:

  1. 🤔 Define your inner and outer functions.
  2. ⬅️ Take the derivative of the outer function only!
  3. ➡️ Take the derivative of the inner function with respect to xx.
  4. ✖️ Multiply the two derivatives to get your final answer!

Here’s a little graphic as well to help you visualize the chain rule.

Untitled

Image Courtesy of Geeks for Geeks


🔢 The Chain Rule: Practice Problems

The Chain Rule: Example 1

Find the derivative of the following function with respect to xx.

y=(x2+3x1)2y=(x^2+3x-1)^2

1️⃣ Define your inner and outer functions.

The inner function is u=x2+3x1u=x^2+3x-1. The outer function is y=u2y=u^2.

2️⃣ Take the derivative of the outer function only!

dydu=2u=2(x2+3x1)\frac{dy}{du} = 2u = 2(x^2+3x-1)

As you can see, we have not taken the derivative of the inner function uu yet.

3️⃣ Take the derivative of the inner function with respect to xx.

dudx=2x+3\frac{du}{dx} = 2x + 3

4️⃣ Now multiply the two derivatives to get your final answer!

dydx=dydududx=2(x2+3x1)(2x+3)\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = 2(x^2+3x-1) \cdot (2x+3)

The Chain Rule: Example 2

Let f(x)=exf(x)=e^x and g(x)=ln(x)g(x)= \ln(x). Find the derivative of y=f(g(x))y=f(g(x)) with respect to xx.

1️⃣ Define your inner and outer functions.

In this problem, they are more explicit! f(x)f(x) is the outer function and g(x)g(x) is the inner function.

2️⃣ Take the derivative of the outer function.

f(g(x))=eg(x)=eln(x)f'(g(x))=e^{g(x)}=e^{\ln(x)}

The derivative of exe^x is just exe^x!

3️⃣ Take the derivative of the inner function with respect to xx.

g(x)=1xg'(x)=\frac{1}{x}

4️⃣ Then multiply the two derivatives to get your final answer!

f(g(x)g(x)=eln(x)1xf'(g(x)\cdot g'(x)=e^{\ln(x)} \cdot \frac{1}{x}

The Chain Rule: Example 3

Find the derivative of the following function; this one may be a bit tougher!

y=4(5x3+2x2+6)2y=4(5x^3+2x^2+6)^2

1️⃣ Define your inner and outer functions.

The inner function is u=5x3+2x2+6u=5x^3+2x^2+6 and the outer function is y=4u2y=4u^2.

2️⃣ Take the derivative of the outer function.

dydu=8u=8(5x3+2x2+6)\frac{dy}{du}=8u=8(5x^3+2x^2+6)

3️⃣ Take the derivative of the inner function with respect to xx.

dudx=15x2+4x\frac{du}{dx} = 15x^2+4x

4️⃣ Now multiply the two derivatives to get your final answer!

dydx=dydududx=8(5x3+2x2+6)(15x2+4x)\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = 8(5x^3+2x^2+6) \cdot (15x^2+4x)

The Chain Rule: Example 4

How about a function with a square root?

y=7x2y=\sqrt{7x^2}

1️⃣ Define your inner and outer functions.

The inner function is u=7x2u=7x^2 and the outer function is y=uy=\sqrt{u}.

2️⃣ Take the derivative of the outer function.

dydu=12u12=12(7x2)12\frac{dy}{du} = \frac{1}{2}u^{-\frac{1}{2}}=\frac{1}{2}(7x^2)^{-\frac{1}{2}}

3️⃣ Take the derivative of the inner function with respect to xx.

dudx=14x\frac{du}{dx} = 14x

4️⃣ Now multiply the two derivatives to get your final answer!

dydx=dydududx=12(7x2)12(14x)\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = \frac{1}{2}(7x^2)^{-\frac{1}{2}} \cdot (14x)

The Chain Rule: Example 5

Try taking the derivative of the following function yourself!

f(x)=cos2(3x)f(x) = \cos^2(3x)

To help you out a little, the inner function is u=cos3xu=\cos3x and the outer function is f(x)=u2f(x)=u^2.

Here’s the answer:

f(x)=2(cos3x)3sin(3x)f'(x)=2(\cos 3x)\cdot -3\sin(3x)

📕 Closing

You made it through the first section of the unit! From now to the rest of your AP Calculus journey, the Chain Rule will accompany you and with practice, you will get to perfection! 🌟

<< Hide Menu

📚

 > 

♾️ 

 > 

🤙🏽

3.1 The Chain Rule

2 min readjune 18, 2024

Dalia Savy

Dalia Savy

Dalia Savy

Dalia Savy

3.1 The Chain Rule

Welcome to the first key topic of Unit 3! In this key topic, we’ll learn more about taking derivatives of functions within functions, also known as composite functions. If you need a review on how to take derivatives, review Unit 2!

🔄 Composite Functions

Yep! Composite functions are functions within functions, but what does this mean?

Given two functions f(x)f(x) and g(x)g(x), the composite function (fg)(x)\ (f \circ g)(x) is formed by applying function ff to the output of function gg.

Mathematically, the composite function is expressed as: (fg)(x)=f(g(x))\ (f \circ g)(x) = f(g(x)). You can basically think of g(x)g(x) as the “inner function” and f(x)f(x) as the “outer function.”

Composite Function Example

Let’s consider the following two functions:

f(x)=x2\textcolor{red}{f(x)=x^2}
g(x)=3x+1\textcolor{blue}{g(x)=3x+1}

If we’re taking a look at the composite function f(g(x)f(g(x), we have to be able to identify the inner function and the outer function. Let’s do that now! ⬇️

  • The function g(x)g(x) acts as the inner function. It takes xx, multiplies it by 3, and adds 1 to the result.
  • The function f(x)f(x) acts as the outer function. It takes the output of g(x)g(x) and squares it.

Therefore, we can think of this example as the following:

f(g(x))=(3x+1)2f(g(x))=\textcolor{red}{(}\textcolor{blue}{3x+1}\textcolor{red}{)^2}

Understanding how composite functions work is crucial in the chain rule. Now let’s get into it!


🔗 Definition of The Chain Rule

The Chain Rule is a method of differentiation, just like the Power Rule, Product Rule, and Quotient Rule from the previous unit. There are two notations for the Chain Rule.

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

Let’s go through each piece of this:

  • dydx\frac{dy}{dx} represents the overall derivative you are trying to find.
  • uu is your inner function.
  • dydu\frac{dy}{du} represents the derivative of the “outer” function with respect to the inner function.
  • dudx\frac{du}{dx} represents the derivative of the “inner” function with respect to xx.

The next notation will make this all clearer! 🙏🏿

ddt(f(g(x)))=f(g(x))g(x)\frac{d}{dt}(f(g(x))) = f'(g(x)) \cdot g'(x)

As you can see, in order to take the derivative of the composite function, you are taking the derivative from the outside ⬅️ to the inside ➡️. This will repeat if there is another function within g(x)g(x).

🪜Steps to Chain Rule

To help break the chain rule down, follow these steps:

  1. 🤔 Define your inner and outer functions.
  2. ⬅️ Take the derivative of the outer function only!
  3. ➡️ Take the derivative of the inner function with respect to xx.
  4. ✖️ Multiply the two derivatives to get your final answer!

Here’s a little graphic as well to help you visualize the chain rule.

Untitled

Image Courtesy of Geeks for Geeks


🔢 The Chain Rule: Practice Problems

The Chain Rule: Example 1

Find the derivative of the following function with respect to xx.

y=(x2+3x1)2y=(x^2+3x-1)^2

1️⃣ Define your inner and outer functions.

The inner function is u=x2+3x1u=x^2+3x-1. The outer function is y=u2y=u^2.

2️⃣ Take the derivative of the outer function only!

dydu=2u=2(x2+3x1)\frac{dy}{du} = 2u = 2(x^2+3x-1)

As you can see, we have not taken the derivative of the inner function uu yet.

3️⃣ Take the derivative of the inner function with respect to xx.

dudx=2x+3\frac{du}{dx} = 2x + 3

4️⃣ Now multiply the two derivatives to get your final answer!

dydx=dydududx=2(x2+3x1)(2x+3)\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = 2(x^2+3x-1) \cdot (2x+3)

The Chain Rule: Example 2

Let f(x)=exf(x)=e^x and g(x)=ln(x)g(x)= \ln(x). Find the derivative of y=f(g(x))y=f(g(x)) with respect to xx.

1️⃣ Define your inner and outer functions.

In this problem, they are more explicit! f(x)f(x) is the outer function and g(x)g(x) is the inner function.

2️⃣ Take the derivative of the outer function.

f(g(x))=eg(x)=eln(x)f'(g(x))=e^{g(x)}=e^{\ln(x)}

The derivative of exe^x is just exe^x!

3️⃣ Take the derivative of the inner function with respect to xx.

g(x)=1xg'(x)=\frac{1}{x}

4️⃣ Then multiply the two derivatives to get your final answer!

f(g(x)g(x)=eln(x)1xf'(g(x)\cdot g'(x)=e^{\ln(x)} \cdot \frac{1}{x}

The Chain Rule: Example 3

Find the derivative of the following function; this one may be a bit tougher!

y=4(5x3+2x2+6)2y=4(5x^3+2x^2+6)^2

1️⃣ Define your inner and outer functions.

The inner function is u=5x3+2x2+6u=5x^3+2x^2+6 and the outer function is y=4u2y=4u^2.

2️⃣ Take the derivative of the outer function.

dydu=8u=8(5x3+2x2+6)\frac{dy}{du}=8u=8(5x^3+2x^2+6)

3️⃣ Take the derivative of the inner function with respect to xx.

dudx=15x2+4x\frac{du}{dx} = 15x^2+4x

4️⃣ Now multiply the two derivatives to get your final answer!

dydx=dydududx=8(5x3+2x2+6)(15x2+4x)\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = 8(5x^3+2x^2+6) \cdot (15x^2+4x)

The Chain Rule: Example 4

How about a function with a square root?

y=7x2y=\sqrt{7x^2}

1️⃣ Define your inner and outer functions.

The inner function is u=7x2u=7x^2 and the outer function is y=uy=\sqrt{u}.

2️⃣ Take the derivative of the outer function.

dydu=12u12=12(7x2)12\frac{dy}{du} = \frac{1}{2}u^{-\frac{1}{2}}=\frac{1}{2}(7x^2)^{-\frac{1}{2}}

3️⃣ Take the derivative of the inner function with respect to xx.

dudx=14x\frac{du}{dx} = 14x

4️⃣ Now multiply the two derivatives to get your final answer!

dydx=dydududx=12(7x2)12(14x)\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = \frac{1}{2}(7x^2)^{-\frac{1}{2}} \cdot (14x)

The Chain Rule: Example 5

Try taking the derivative of the following function yourself!

f(x)=cos2(3x)f(x) = \cos^2(3x)

To help you out a little, the inner function is u=cos3xu=\cos3x and the outer function is f(x)=u2f(x)=u^2.

Here’s the answer:

f(x)=2(cos3x)3sin(3x)f'(x)=2(\cos 3x)\cdot -3\sin(3x)

📕 Closing

You made it through the first section of the unit! From now to the rest of your AP Calculus journey, the Chain Rule will accompany you and with practice, you will get to perfection! 🌟