0:00 / 0:00

Chain Rule

When finding the derivative of a composite function, we need to use the chain rule. There are two ways for us to write out the chain rule--Lagrange & Leibniz notation.

Lagrange Notation:
If ff' and gg' both exist, then the derivative of the composite function h(x)=f(g(x))h\left(x\right)=f\left(g\left(x\right)\right) is h(x)=f(g(x))×g(x)h'\left(x\right)=f'\left(g\left(x\right)\right)\times g'\left(x\right).

Leibniz notation:
If yy is a function of uu, and uu is a function of xx, then the derivative of yy in terms of xx is dydx=dydu×dudx\displaystyle \frac{dy}{dx}=\frac{dy}{du}\times\frac{du}{dx}.

Wize Tip
We find the derivative of the outside function, then multiply by the derivative of the inside function.

Power of a Function rule
This is just a special case of the chain rule:
If h(x)=[f(x)]nh\left(x\right)=\left[f\left(x\right)\right]^n, then h(x)=n[f(x)]n1×f(x)h'\left(x\right)=n\left[f\left(x\right)\right]^{n-1}\times f'\left(x\right).

Example
Find the derivative of f(x)=(23x4)23f\left(x\right)=\sqrt[3]{\left(2-3x^4\right)^2}.

Rewrite: f(x)=(23x4)23f\left(x\right)=\left(2-3x^4\right)^{\frac{2}{3}}

Use the power of a function rule (special case of the chain rule) to find the derivative:
f(x)=23(23x4)13×(23x4)f'\left(x\right)=\frac{2}{3}\left(2-3x^4\right)^{-\frac{1}{3}}\times\orange{\left(2-3x^4\right)'}
f(x)=23(23x4)13×(12x3)f'\left(x\right)=\frac{2}{3}\left(2-3x^4\right)^{-\frac{1}{3}}\times\orange{\left(-12x^3\right)}

Simplify:
f(x)=8x3(23x4)13f'\left(x\right)=-8x^3\left(2-3x^4\right)^{-\frac{1}{3}}
f(x)=8x323x43f'\left(x\right)=-\frac{8x^3}{\sqrt[3]{2-3x^4}}
0:00 / 0:00

Example: Chain Rule & Product Rule

Find the derivative of y=1(2x)(x5x)\displaystyle y=\frac{1}{\left(2-x\right)\left(x^5-x\right)} at x=3x=3 by using the chain rule.

We first rewrite this as y=[(2x)(x5x)]1y=\left[\left(2-x\right)\left(x^5-x\right)\right]^{-1}.

Using chain rule:
y or dydx=1[(2x)(x5x)]2×[(2x)(x5x)]y'\ or\ \frac{dy}{dx}=-1\left[\left(2-x\right)\left(x^5-x\right)\right]^{-2}\times\left[\left(2-x\right)\left(x^5-x\right)\right]'
y or dydx=1[(2x)(x5x)]2×[(2x)(x5x)+(2x)(x5x)]y'\ or\ \frac{dy}{dx}=-1\left[\left(2-x\right)\left(x^5-x\right)\right]^{-2}\times\left[\left(2-x\right)'\left(x^5-x\right)+\left(2-x\right)\left(x^5-x\right)'\right]
y or dydx=1[(2x)(x5x)]2×[(1)(x5x)+(2x)(5x41)]y'\ or\ \frac{dy}{dx}=-1\left[\left(2-x\right)\left(x^5-x\right)\right]^{-2}\times\left[\left(-1\right)\left(x^5-x\right)+\left(2-x\right)\left(5x^4-1\right)\right]
y or dydx=1[(2x)(x5x)]2×[(x5x)+(2x)(5x41)]y'\ or\ \frac{dy}{dx}=-\frac{1}{\left[\left(2-x\right)\left(x^5-x\right)\right]^2}\times\left[-\left(x^5-x\right)+\left(2-x\right)\left(5x^4-1\right)\right]

At x=3x=3:
y(3)=1[(23)(353)]2×[(353)+(23)(5(3)41)]y'\left(3\right)=-\frac{1}{\left[\left(2-3\right)\left(3^5-3\right)\right]^2}\times\left[-\left(3^5-3\right)+\left(2-3\right)\left(5\left(3\right)^4-1\right)\right]
y(3)=1[(240)]2×[(240)(404)]y'\left(3\right)=-\frac{1}{\left[-\left(240\right)\right]^2}\times\left[-\left(240\right)-\left(404\right)\right]
y(3)=12402×(644)y'\left(3\right)=-\frac{1}{240^2}\times\left(-644\right)
y(3)=6442402y'\left(3\right)=\frac{644}{240^2}

Practice: Chain Rule & Quotient Rule

Find the equation of the tangent line to the curve y=xx2+3\displaystyle y=\sqrt{\frac{x}{x^2+3}} at x=1x=1.
0:00 / 0:00

Example: Chain Rule & Leibniz Notation

Given y=2u3u+1y=2u^3-\sqrt{u+1} and u=x21u=x^2-1, find dydx\frac{dy}{dx} at x=1x=1.

Using Leibniz notation:
dydx=dydu×dudx\frac{dy}{dx}=\orange{\frac{dy}{du}}\times\green{\frac{du}{dx}}
dydx=ddu[2u3(u+1)12]×ddx[x21]\frac{dy}{dx}=\orange{\frac{d}{du}\left[2u^3-\left(u+1\right)^{\frac{1}{2}}\right]}\times\green{\frac{d}{dx}\left[x^2-1\right]}
dydx=[6u212(u+1)12×(1)]×[2x]\frac{dy}{dx}=\orange{\left[6u^2-\frac{1}{2}\left(u+1\right)^{-\frac{1}{2}}\times\left(1\right)'\right]}\times\green{\left[2x\right]}

Sub in u=x21u=x^2-1:
dydx=[6(x21)12((x21)+1)12×(1)]×[2x]\frac{dy}{dx}=\left[6\left(x^2-1\right)-\frac{1}{2}\left(\left(x^2-1\right)+1\right)^{-\frac{1}{2}}\times\left(1\right)\right]\times\left[2x\right]

Simplify:
dydx=[6x2612(x2)12]×[2x]\frac{dy}{dx}=\left[6x^2-6-\frac{1}{2}\left(x^2\right)^{-\frac{1}{2}}\right]\times\left[2x\right]
dydx=[6x2612x]×[2x]\frac{dy}{dx}=\left[6x^2-6-\frac{1}{2x}\right]\times\left[2x\right]
dydx=12x312x1\frac{dy}{dx}=12x^3-12x-1

Sub in x=1x=1:
dydxx=1=12(1)312(1)1\frac{dy}{dx}|_{x=1}=12\left(1\right)^3-12\left(1\right)-1
dydxx=1=1\frac{dy}{dx}|_{x=1}=-1

Practice: Chain Rule & Leibniz Notation

Given y=u3y=\sqrt[3]{u} and u=2x4xu=2x^4-\sqrt x, find the derivative dydx\frac{dy}{dx} at x=1x=1.
0:00 / 0:00

Example: Multiple Chain Rules

a) Find the derivative of f(x)=x+(2x13)2f\left(x\right)=\sqrt{x+\left(2-x^{\frac{1}{3}}\right)^2} at x=1x=1
Rewrite: f(x)=[x+(2x13)2]12f\left(x\right)=\left[x+\left(2-x^{\frac{1}{3}}\right)^2\right]^{\frac{1}{2}}
Using chain rule:
f(x)=12[x+(2x13)2]12×[x+(2x13)2]f'\left(x\right)=\frac{1}{2}\left[x+\left(2-x^{\frac{1}{3}}\right)^2\right]^{-\frac{1}{2}} \times \orange{\left[x+\left(2-x^{\frac{1}{3}}\right)^2\right]'}
f(x)=12[x+(2x13)2]12×[1+[(2x13)2]]f'\left(x\right)=\frac{1}{2}\left[x+\left(2-x^{\frac{1}{3}}\right)^2\right]^{-\frac{1}{2}}\times\orange{\left[1+ \green{\left[\left(2-x^{\frac{1}{3}}\right)^2\right]'}\right]}
f(x)=12[x+(2x13)2]12×[1+[2(2x13)×(2x13)]]f'\left(x\right)=\frac{1}{2}\left[x+\left(2-x^{\frac{1}{3}}\right)^2\right]^{-\frac{1}{2}}\times \orange{\left[1+\green{\left[2\left(2-x^{\frac{1}{3}}\right)\times\red{\left(2-x^{\frac{1}{3}}\right)'}\right]}\right]}
f(x)=12[x+(2x13)2]12×[1+[2(2x13)×(13x23)]]f'\left(x\right)=\frac{1}{2}\left[x+\left(2-x^{\frac{1}{3}}\right)^2\right]^{-\frac{1}{2}}\times\orange{\left[1+\green{\left[2\left(2-x^{\frac{1}{3}}\right)\times\red{\left(-\frac{1}{3}x^{-\frac{2}{3}}\right)}\right]}\right]}
f(x)=12x+(2x13)2×[123x23(2x13)]\displaystyle f'\left(x\right)=\frac{1}{2\sqrt{x+\left(2-x^{\frac{1}{3}}\right)^2}}\times\left[1-\frac{2}{3}x^{-\frac{2}{3}}\left(2-x^{\frac{1}{3}}\right)\right]
f(x)=12x+(2x13)2×[12(2x13)3x23]\displaystyle f'\left(x\right)=\frac{1}{2\sqrt{x+\left(2-x^{\frac{1}{3}}\right)^2}}\times\left[1-\frac{2\left(2-x^{\frac{1}{3}}\right)}{3x^{\frac{2}{3}}}\right]

f(1)=121+(2113)2×[12(2113)3(1)23]\displaystyle f'\left(1\right)=\frac{1}{2\sqrt{1+\left(2-1^{\frac{1}{3}}\right)^2}}\times\left[1-\frac{2\left(2-1^{\frac{1}{3}}\right)}{3\left(1\right)^{\frac{2}{3}}}\right]
f(1)=122×[123]\displaystyle f'\left(1\right)=\frac{1}{2\sqrt{2}}\times\left[1-\frac{2}{3}\right]
f(1)=122×[13]\displaystyle f'\left(1\right)=\frac{1}{2\sqrt{2}}\times\left[\frac{1}{3}\right]
f(1)=162\displaystyle f'\left(1\right)=\frac{1}{6\sqrt{2}}
PAGE BREAK
b) Find the derivative dydx\frac{dy}{dx} at x=1x=1, given that y=u2+1y=\sqrt{u^2+1} and u=12(3x3)2u=\frac{1}{2-\left(3-x^3\right)^2}.
Using chain rule:
dydx=dydu×dudx\displaystyle \frac{dy}{dx}= \orange{\frac{dy}{du}}\times \green{\frac{du}{dx}}
dydx=ddu[u2+1]×ddx[12(3x3)2]\displaystyle \frac{dy}{dx}= \orange{\frac{d}{du}\left[\sqrt{u^2+1}\right]}\times \green{\frac{d}{dx}\left[\frac{1}{2-\left(3-x^3\right)^2}\right]}
dydx=ddu[(u2+1)12]×ddx[(2(3x3)2)1]\displaystyle \frac{dy}{dx}= \orange{\frac{d}{du}\left[\left(u^2+1\right)^{\frac{1}{2}}\right]}\times \green{\frac{d}{dx}\left[\left(2-\left(3-x^3\right)^2\right)^{-1}\right]}
dydx=[12(u2+1)12×(u2+1)]×[(2(3x3)2)2×(2(3x3)2)]\displaystyle \frac{dy}{dx}= \orange{\left[\frac{1}{2}\left(u^2+1\right)^{-\frac{1}{2}}\times\red{\left(u^2+1\right)'}\right]}\times \green{\left[-\left(2-\left(3-x^3\right)^2\right)^{-2}\times\blue{\left(2-\left(3-x^3\right)^2\right)'}\right]}
dydx=[12(u2+1)12×(2u)]×[(2(3x3)2)2×(02(3x3)×(3x3))]\displaystyle \frac{dy}{dx}= \orange{\left[\frac{1}{2}\left(u^2+1\right)^{-\frac{1}{2}}\times \red{\left(2u\right)}\right]} \times \green{\left[-\left(2-\left(3-x^3\right)^2\right)^{-2}\times\blue{\left(0-2\left(3-x^3\right)\times \purple{\left(3-x^3\right)'}\right)}\right]}
dydx=[12(u2+1)12×(2u)]×[(2(3x3)2)2×(2(3x3)×(3x2))]\displaystyle \frac{dy}{dx}= \orange{\left[\frac{1}{2}\left(u^2+1\right)^{-\frac{1}{2}}\times \red{\left(2u\right)}\right]} \times \green{\left[-\left(2-\left(3-x^3\right)^2\right)^{-2}\times\blue{\left(-2\left(3-x^3\right)\times \purple{\left(-3x^2\right)}\right)}\right]}
dydx=[uu2+1]×[6x2(3x2)[2(3x3)2]2]\displaystyle \frac{dy}{dx}=\left[\frac{u}{\sqrt{u^2+1}}\right]\times\left[-\frac{6x^2\left(3-x^2\right)}{\left[2-\left(3-x^3\right)^2\right]^2}\right]

When x=1x=1, u=12(313)2=12\displaystyle u=\frac{1}{2-\left(3-1^3\right)^2}=-\frac{1}{2}:
dydxx=1=[12(12)2+1]×[6(1)2(312)[2(313)2]2]\displaystyle \frac{dy}{dx}|_{x=1}=\left[\frac{-\frac{1}{2}}{\sqrt{\left(-\frac{1}{2}\right)^2+1}}\right]\times\left[-\frac{6\left(1\right)^2\left(3-1^2\right)}{\left[2-\left(3-1^3\right)^2\right]^2}\right]
dydxx=1=[1254]×[124]\displaystyle \frac{dy}{dx}|_{x=1}=\left[\frac{-\frac{1}{2}}{\sqrt{\frac{5}{4}}}\right]\times\left[-\frac{12}{4}\right]
dydxx=1=[1252]×[124]\displaystyle \frac{dy}{dx}|_{x=1}=\left[\frac{-\frac{1}{2}}{\frac{\sqrt{5}}{2}}\right]\times\left[-\frac{12}{4}\right]
dydxx=1=[15]×[3]\displaystyle \frac{dy}{dx}|_{x=1}=\left[-\frac{1}{\sqrt{5}}\right]\times\left[-3\right]
dydxx=1=35\displaystyle \frac{dy}{dx}|_{x=1}=\frac{3}{\sqrt{5}}

Practice: Multiple Chain Rules

Find the derivative of f(x)=x+x4+x3+x2+1f\left(x\right)=x+\sqrt{x^4+\sqrt{x^3+\sqrt{x^2+1}}} at x=0x=0


0:00 / 0:00

Example: Chain Rule

Given that g(x)=f([f(x)]2)g\left(x\right)=f\left(\left[f\left(x\right)\right]^2\right), f(1)=1f\left(1\right)=1 and f(1)=3f'\left(1\right)=3, find g(1)g'\left(1\right).

The g function is a function wrapped inside another, wrapped inside another, so we need chain rule:
g(x)=f([f(x)]2)×2f(x)×f(x)g'\left(x\right)= f'\left(\left[f\left(x\right)\right]^2 \right)\times 2f\left(x\right)\times f'\left(x\right)

Now we sub in x=1:
g(1)=f([f(1)]2)×2f(1)×f(1)g'\left(1\right)=f'\left(\left[f\left(1\right)\right]^2\right)\times2f\left(1\right)\times f'\left(1\right)

Now we substitute the known given values
g(1)=f([1]2)×2(1)×(3)g'\left(1\right)=f'\left(\left[\color{red}1\color{black}\right]^2\right)\times2\left(\color{red}{1}\right)\times\left(\color{blue}3\right)
g(1)=f(1)×2×3g'\left(1\right)=f'\left(1\right)\times2\times3
g(1)=3×2×3g'\left(1\right)=\color{blue}3\color{black}\times2\times3
g(1)=18g'\left(1\right)=18
Given this table of values for f, g, f, and gf,\ g,\ f',\ \text{and}\ g' below, answer the following questions.
xf(x)f(x)f(x)g(x)g(x)001523π2π104522410π23\begin{array}{|c|c|c|c|c|c|} \hline x&f(x)&f'(x)&f''(x)&g(x)&g'(x)\\ \hline 0&0&-1&-5&2&3\\ \hline \frac{\pi}{2}&\pi&1&0&4&5\\ \hline 2&-2&-4&10&\frac{\pi}{2}&-3\\ \hline \end{array}
If p(x)=f(g(x))p\left(x\right)=f\left(g\left(x\right)\right), then p(2)=p'\left(2\right)=