Difference between revisions of "Chain Rule"

From Grad Wiki
Jump to navigation Jump to search
Line 32: Line 32:
 
!Solution:  
 
!Solution:  
 
|-
 
|-
|Using the Product Rule, we have
+
|Let &nbsp;<math>f(x)=\sin (x)</math>&nbsp; and &nbsp;<math>g(x)=3x.</math>
 
|-
 
|-
|
+
|Then, &nbsp;<math>f'(x)=\cos(x)</math>&nbsp; and &nbsp;<math>g'(x)=3.</math>
::<math>f'(x)=(x^2+x+1)(x^3+2x^2+4)'+(x^2+x+1)'(x^3+2x^2+4).</math>  
 
 
|-
 
|-
|Then, using the Power Rule, we have
+
|Now, &nbsp;<math>h(x)=f(g(x)).</math>
 
|-
 
|-
|
+
|Using the Chain Rule, we have
::<math>f'(x)=(x^2+x+1)(3x^2+4x)+(2x+1)(x^3+2x^2+4).</math>
 
|-
 
|-
 
|<u>NOTE:</u> It is not necessary to use the Product Rule to calculate the derivative of this function.
 
|-
 
|You can distribute the terms and then use the Power Rule.
 
|-
 
|In this case, we have
 
 
|-
 
|-
 
|
 
|
 
::<math>\begin{array}{rcl}
 
::<math>\begin{array}{rcl}
\displaystyle{f(x)} & = & \displaystyle{(x^2+x+1)(x^3+2x^2+4)}\\
+
\displaystyle{h'(x)} & = & \displaystyle{f'(g(x))\cdot g'(x)}\\
&&\\
 
& = & \displaystyle{x^2(x^3+2x^2+4)+x(x^3+2x^2+4)+1(x^3+2x^2+4)}\\
 
 
&&\\
 
&&\\
& = & \displaystyle{x^5+2x^4+4x^2+x^4+2x^3+4x+x^3+2x^2+4} \\
+
& = & \displaystyle{\cos (3x)\cdot 3}\\
 
&&\\
 
&&\\
& = & \displaystyle{x^5+3x^4+3x^3+6x^2+4x+4.}
+
& = & \displaystyle{3\cos (3x).}
 
\end{array}</math>
 
\end{array}</math>
|-
 
|Now, using the Power Rule, we get
 
|-
 
|
 
::<math>f'(x)=5x^4+12x^3+9x^2+12x+4.</math>
 
|-
 
|In general, calculating derivatives in this way is tedious. It would be better to use the Product Rule.
 
 
|}
 
|}
  
Line 71: Line 53:
 
!Final Answer: &nbsp;
 
!Final Answer: &nbsp;
 
|-
 
|-
|&nbsp; &nbsp; &nbsp; &nbsp;<math>f'(x)=(x^2+x+1)(3x^2+4x)+(2x+1)(x^3+2x^2+4)</math>
+
|&nbsp; &nbsp; &nbsp; &nbsp;<math>h'(x)=3\cos (3x)</math>
|-
 
|or equivalently
 
|-
 
|&nbsp; &nbsp; &nbsp; &nbsp;<math>f'(x)=x^5+3x^4+3x^3+6x^2+4x+4</math>
 
 
|}
 
|}
  
Line 83: Line 61:
 
!Solution: &nbsp;
 
!Solution: &nbsp;
 
|-
 
|-
|
+
|Let &nbsp;<math>f(x)=x^8</math>&nbsp; and &nbsp;<math>g(x)=x+1.</math>
Using the Quotient Rule, we have
 
 
|-
 
|-
|
+
|Then, &nbsp;<math>f'(x)=8x^7</math>&nbsp; and &nbsp;<math>g'(x)=1.</math>
::<math>f'(x)=\frac{x(x^2+x^3)'-(x^2+x^3)(x)'}{x^2}.</math>
 
|-
 
|Then, using the Power Rule, we have
 
|-
 
|
 
::<math>f'(x)=\frac{x(2x+3x^2)-(x^2+x^3)(1)}{x^2}.</math>
 
 
|-
 
|-
|<u>NOTE:</u> It is not necessary to use the Quotient Rule to calculate the derivative of this function.
+
|Now, &nbsp;<math>h(x)=f(g(x)).</math>
 
|-
 
|-
|You can divide and then use the Power Rule.
+
|Using the Chain Rule, we have
|-
 
|In this case, we have
 
 
|-
 
|-
 
|
 
|
 
::<math>\begin{array}{rcl}
 
::<math>\begin{array}{rcl}
\displaystyle{f(x)} & = & \displaystyle{\frac{x^2+x^3}{x}}\\
+
\displaystyle{h'(x)} & = & \displaystyle{f'(g(x))\cdot g'(x)}\\
 
&&\\
 
&&\\
& = & \displaystyle{\frac{x^2}{x}+\frac{x^3}{x}}\\
+
& = & \displaystyle{8(x+1)^7\cdot 1}\\
 
&&\\
 
&&\\
& = & \displaystyle{x+x^2.} \\
+
& = & \displaystyle{8(x+1)^7.}
 
\end{array}</math>
 
\end{array}</math>
|-
 
|Now, using the Power Rule, we get
 
|-
 
|
 
::<math>f'(x)=1+2x.</math>
 
 
|}
 
|}
  
Line 118: Line 82:
 
!Final Answer: &nbsp;
 
!Final Answer: &nbsp;
 
|-
 
|-
||&nbsp; &nbsp; &nbsp; &nbsp;<math>f'(x)=\frac{x(2x+3x^2)-(x^2+x^3)}{x^2}</math>
+
||&nbsp; &nbsp; &nbsp; &nbsp;<math>h'(x)=8(x+1)^7.</math>
|-
 
|or equivalently
 
|-
 
|&nbsp; &nbsp; &nbsp; &nbsp;<math>f'(x)=1+2x</math>
 
 
 
|-
 
 
|}
 
|}
  
Line 132: Line 90:
 
!Solution: &nbsp;
 
!Solution: &nbsp;
 
|-
 
|-
|Using the Quotient Rule, we get
+
|Let &nbsp;<math>f(x)=\ln (x)</math>&nbsp; and &nbsp;<math>g(x)=x^2.</math>
 +
|-
 +
|Then, &nbsp;<math>f'(x)=\frac{1}{x}</math>&nbsp; and &nbsp;<math>g'(x)=2x.</math>
 +
|-
 +
|Now, &nbsp;<math>h(x)=f(g(x)).</math>
 +
|-
 +
|Using the Chain Rule, we have
 
|-
 
|-
 
|
 
|
 
::<math>\begin{array}{rcl}
 
::<math>\begin{array}{rcl}
\displaystyle{f'(x)} & = & \displaystyle{\frac{\cos x(\sin x)'-\sin x (\cos x)'}{(\cos x)^2}}\\
+
\displaystyle{h'(x)} & = & \displaystyle{f'(g(x))\cdot g'(x)}\\
&&\\
 
& = & \displaystyle{\frac{\cos x(\cos x)-\sin x (-\sin x)}{(\cos x)^2}}\\
 
&&\\
 
& = & \displaystyle{\frac{\cos^2 x+\sin^2 x}{\cos^2 x}} \\
 
 
&&\\
 
&&\\
& = & \displaystyle{\frac{1}{\cos^2 x}}\\
+
& = & \displaystyle{\frac{1}{x^2}\cdot 2x}\\
 
&&\\
 
&&\\
& = & \displaystyle{\sec^2 x}
+
& = & \displaystyle{\frac{2}{x}.}
 
\end{array}</math>
 
\end{array}</math>
|-
 
|since &nbsp;<math style="vertical-align: -2px">\sin^2 x+\cos^2 x=1</math>&nbsp; and &nbsp;<math style="vertical-align: -13px">\sec x=\frac{1}{\cos x}.</math>
 
|-
 
|Since &nbsp;<math style="vertical-align: -14px">\frac{\sin x}{\cos x}=\tan x,</math>&nbsp; we have
 
|-
 
|
 
::<math>\frac{d}{dx}{\tan x}=\sec^2 x.</math>
 
 
|}
 
|}
  
Line 158: Line 111:
 
!Final Answer: &nbsp;
 
!Final Answer: &nbsp;
 
|-
 
|-
|&nbsp; &nbsp; &nbsp; &nbsp;<math>f'(x)=\sec^2 x</math>
+
|&nbsp; &nbsp; &nbsp; &nbsp;<math>h'(x)=\frac{2}{x}</math>
 
|-
 
|-
 
|}
 
|}

Revision as of 09:47, 9 October 2017

Introduction

It is relatively easy to calculate the derivatives of simple functions, like polynomials or trigonometric functions.

But, what about more complicated functions?

For example,    or  

Well, the key to calculating the derivatives of these functions is to recognize that these functions are compositions.

For  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle f(x)=\sin(3x),}   it is the composition of the function  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle y=3x}   with  

Similarly, for    it is the composition of  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle y=x+1}   and  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle y=x^{8}.}

So, how do we take the derivative of compositions?

The answer to this question is exactly the Chain Rule.

Chain Rule

Let  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle y=f(u)}   be a differentiable function of    and let    be a differentiable function of   

Then,    is a differentiable function of    and

Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle y'=f'(g(x))\cdot g'(x).}

Warm-Up

Calculate  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h'(x).}

1)   Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h(x)=\sin(3x)}

Solution:  
Let  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle f(x)=\sin(x)}   and  
Then,  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle f'(x)=\cos(x)}   and  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle g'(x)=3.}
Now,  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h(x)=f(g(x)).}
Using the Chain Rule, we have
Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle {\begin{array}{rcl}\displaystyle {h'(x)}&=&\displaystyle {f'(g(x))\cdot g'(x)}\\&&\\&=&\displaystyle {\cos(3x)\cdot 3}\\&&\\&=&\displaystyle {3\cos(3x).}\end{array}}}
Final Answer:  
       Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h'(x)=3\cos(3x)}

2)   Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h(x)=(x+1)^{8}}

Solution:  
Let  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle f(x)=x^{8}}   and  
Then,  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle f'(x)=8x^{7}}   and  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle g'(x)=1.}
Now,  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h(x)=f(g(x)).}
Using the Chain Rule, we have
Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle {\begin{array}{rcl}\displaystyle {h'(x)}&=&\displaystyle {f'(g(x))\cdot g'(x)}\\&&\\&=&\displaystyle {8(x+1)^{7}\cdot 1}\\&&\\&=&\displaystyle {8(x+1)^{7}.}\end{array}}}
Final Answer:  
       Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h'(x)=8(x+1)^{7}.}

3)   Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h(x)=\ln(x^{2})}

Solution:  
Let  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle f(x)=\ln(x)}   and  
Then,  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle f'(x)={\frac {1}{x}}}   and  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle g'(x)=2x.}
Now,  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h(x)=f(g(x)).}
Using the Chain Rule, we have
Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle {\begin{array}{rcl}\displaystyle {h'(x)}&=&\displaystyle {f'(g(x))\cdot g'(x)}\\&&\\&=&\displaystyle {{\frac {1}{x^{2}}}\cdot 2x}\\&&\\&=&\displaystyle {{\frac {2}{x}}.}\end{array}}}
Final Answer:  
       Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h'(x)={\frac {2}{x}}}

Exercise 1

Calculate the derivative of  

First, we need to know the derivative of    Recall

Now, using the Quotient Rule, we have

Using the Product Rule and Power Rule, we have

So, we have

Exercise 2

Calculate the derivative of  

Notice that the function    is the product of three functions.

We start by grouping two of the functions together. So, we have  Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle g(x)=(2x\sin x)\sec x.}

Using the Product Rule, we get

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{array}{rcl} \displaystyle{g'(x)} & = & \displaystyle{(2x\sin x)(\sec x)'+(2x\sin x)'\sec x}\\ &&\\ & = & \displaystyle{(2x\sin x)(\tan^2 x)+(2x\sin x)'\sec x.} \end{array}}

Now, we need to use the Product Rule again. So,

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{array}{rcl} \displaystyle{g'(x)} & = & \displaystyle{2x\sin x\tan^2 x+(2x(\sin x)'+(2x)'\sin x)\sec x}\\ &&\\ & = & \displaystyle{2x\sin x\tan^2 x+(2x\cos x+2\sin x)\sec x.} \end{array}}

So, we have

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle g'(x)=2x\sin x\tan^2 x+(2x\cos x+2\sin x)\sec x.}

But, there is another way to do this problem. Notice

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{array}{rcl} \displaystyle{g(x)} & = & \displaystyle{2x\sin x\sec x}\\ &&\\ & = & \displaystyle{2x\sin x\frac{1}{\cos x}}\\ &&\\ & = & \displaystyle{2x\tan x.} \end{array}}

Now, you would only need to use the Product Rule once instead of twice.

Exercise 3

Calculate the derivative of  Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle h(x)=\frac{x^2\sin x+1}{x^2\cos x+3}.}

Using the Quotient Rule, we have

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle h'(x)=\frac{(x^2\cos x+3)(x^2\sin x+1)'-(x^2\sin x+1)(x^2\cos x+3)'}{(x^2\cos x+3)^2}.}

Now, we need to use the Product Rule. So, we have

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{array}{rcl} \displaystyle{h'(x)} & = & \displaystyle{\frac{(x^2\cos x+3)(x^2(\sin x)'+(x^2)'\sin x)-(x^2\sin x+1)(x^2(\cos x)'+(x^2)'\cos x)}{(x^2\cos x+3)^2}}\\ &&\\ & = & \displaystyle{\frac{(x^2\cos x+3)(x^2\cos x+2x\sin x)-(x^2\sin x+1)(-x^2\sin x+2x\cos x)}{(x^2\cos x+3)^2}.} \end{array}}

So, we get

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle h'(x)=\frac{(x^2\cos x+3)(x^2\cos x+2x\sin x)-(x^2\sin x+1)(-x^2\sin x+2x\cos x)}{(x^2\cos x+3)^2}.}

Exercise 4

Calculate the derivative of  Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(x)=\frac{e^x}{x^2\sin x}.}

First, using the Quotient Rule, we have

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{array}{rcl} \displaystyle{f'(x)} & = & \displaystyle{\frac{x^2\sin x (e^x)'-e^x(x^2\sin x)'}{(x^2\sin x)^2}}\\ &&\\ & = & \displaystyle{\frac{x^2\sin x e^x - e^x(x^2\sin x)'}{x^4\sin^2 x}.} \end{array}}

Now, we need to use the Product Rule. So, we have

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{array}{rcl} \displaystyle{f'(x)} & = & \displaystyle{\frac{x^2\sin x e^x - e^x(x^2(\sin x)'+(x^2)'\sin x)}{x^4\sin^2 x}}\\ &&\\ & = & \displaystyle{\frac{x^2\sin x e^x - e^x(x^2\cos x+2x\sin x)}{x^4\sin^2 x}.} \end{array}}

So, we have

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f'(x)=\frac{x^2\sin x e^x - e^x(x^2\cos x+2x\sin x)}{x^4\sin^2 x}.}