Difference between revisions of "Chain Rule"

From Grad Wiki
Jump to navigation Jump to search
Line 134: Line 134:
 
== Exercise 2 ==
 
== Exercise 2 ==
  
Calculate the derivative of &nbsp;<math style="vertical-align: -5px">g(x)=2x\sin x \sec x.</math>
+
Calculate the derivative of &nbsp;<math style="vertical-align: -6px">h(x)=\sin^3(2x^2+x+1).</math>
  
Notice that the function &nbsp;<math style="vertical-align: -5px">g(x)</math>&nbsp; is the product of three functions.
+
First, notice &nbsp;<math style="vertical-align: -6px">h(x)=(\sin(2x^2+x+1))^3.</math>  
  
We start by grouping two of the functions together. So, we have &nbsp;<math style="vertical-align: -5px">g(x)=(2x\sin x)\sec x.</math>
+
Using the Chain Rule, we have
  
Using the Product Rule, we get
+
::<math>h'(x)=3(\sin(2x^2+x+1))^2 \cdot (\sin(2x^2+x+1))'.</math>
  
::<math>\begin{array}{rcl}
+
Now, we need to use the Chain Rule a second time. So, we get
\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}</math>
 
 
 
Now, we need to use the Product Rule again. So,
 
  
 
::<math>\begin{array}{rcl}
 
::<math>\begin{array}{rcl}
\displaystyle{g'(x)} & = & \displaystyle{2x\sin x\tan^2 x+(2x(\sin x)'+(2x)'\sin x)\sec x}\\
+
\displaystyle{h'(x)} & = & \displaystyle{3(\sin(2x^2+x+1))^2 \cos(2x^2+x+1)\cdot (2x^2+x+1)'}\\
 
&&\\
 
&&\\
& = & \displaystyle{2x\sin x\tan^2 x+(2x\cos x+2\sin x)\sec x.}
+
& = & \displaystyle{3\sin^2(2x^2+x+1) \cos(2x^2+x+1)(4x+1).}
 
\end{array}</math>
 
\end{array}</math>
  
 
So, we have  
 
So, we have  
::<math>g'(x)=2x\sin x\tan^2 x+(2x\cos x+2\sin x)\sec x.</math>
+
::<math>h'(x)=3\sin^2(2x^2+x+1) \cos(2x^2+x+1)(4x+1).</math>
 
 
But, there is another way to do this problem. Notice
 
 
 
::<math>\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}</math>
 
 
 
Now, you would only need to use the Product Rule once instead of twice.
 
  
 
== Exercise 3 ==
 
== Exercise 3 ==

Revision as of 09:14, 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,  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle f(x)=\sin(3x)}   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    with  

Similarly, for  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle g(x)=(x+1)^{8},}   it is the composition of    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  

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    and  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle g(x)=3x.}
Then,    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:  
       

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  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle g(x)=x+1.}
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:  
       

3)  

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  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle g(x)=x^{2}.}
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
Final Answer:  
       

Exercise 1

Calculate the derivative of  

Using the Chain Rule, we have

So, we have

Exercise 2

Calculate the derivative of  

First, notice  

Using the Chain Rule, we have

Now, we need to use the Chain Rule a second time. So, we get

So, we have

Exercise 3

Calculate the derivative of  Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\displaystyle h(x)={\frac {x^{2}\sin x+1}{x^{2}\cos x+3}}.}

Using the Quotient Rule, we have

Now, we need to use the Product Rule. So, 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 {\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 (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. Server problem."): {\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  

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

So, we have