The Chain Rule
When do we use the Chain Rule?Answer: Composition! |
The Formula
If s(x)=f(g(x)), and if g is differentiable at x and f is differentiable at g(x) then
$$s'(x)=f'(g(x))g'(x)$$
What is composition? |
This figure shows g(x) evalualted in f(x) .
Suppose $f(x)=\sqrt{x}$ and $g(x)=2x-3$. Then: $$f(g(x))=\sqrt{2x-3}$$ Similarly, $$g(f(x))=2\sqrt{x-3}$$
Now the question is can we find the derivative of $s(x)$ given $s(x)=f(g(x))$? More specifically can we express the first derivative of s in terms of the first derivatives of f and g? The answer is yes, and the \textit{chain rule} help us accomplish this. In fact, the chain rule will make the differentiation of many functions a lot easier.
Identifying the composition of two functions
However, before we begin taking the derivative of functions using the chain rule, if is helpful for us to practice identifying the composition of functions. We will start off with one function inside another (f(gx)) and then progress into the composition of three functions h(f(g(x))). Once we become comfortable recognizing the order of the composition (inner most, next inner most, $\cdots$, outer most), taking the derivative with the chain rule becomes rather straight forward.
Practice Identifying Composition of functions
Function | Inside | Outisde | Composition |
$sin(2x)$ | $2x$ | $sin(x)$ | $f(g(x))$ |
$e^{5x+1}$ | $(5x+1)$ | $e^x$ | $f(g(x))$ |
$\sqrt{3x^5}$ | $3x^5$ | $\sqrt{x}$ | $f(g(x))$ |
$(5x^2+ln(x))^{10}$ | $5x^2+ln(x)$ | $x^{10}$ | $f(g(x))$ |
$ln\big(\frac{x}{sin(x)}\big)$ | $\frac{x}{sin(x)}$ | $ln(x)$ | $f(g(x))$ |
$\big(\frac{2x-5}{1-x^2}\big)^-5$ | $\frac{2x-5}{1-x^2}$ | $x^-5$ | $f(g(x))$ |
$tan^2(x)$ | $ tan(x) $ | $x^2$ | $f(g(x))$ |
Identifying the composition of three functions
h(f(g(x))) | g(x) | f(x) | h(x) | Composition |
$ln(\sqrt{4x})$ | $4x$ | $\sqrt{x}$ | $ln(x)$ | $h(f(g(x)) $ |
$cos^4(3x+2)$ | $(3x+2)$ | $cos(x)$ | $ x^4 $ | $h(f(g(x)) $ |
$tan\big((6x)^{10}\big)$ | $6x$ | $x^{10}$ | $tan(x)$ | $h(f(g(x))$ |
$e^{e^{\pi x}}$ | $\pi x$ | $e^x$ | $e^x$ | $h(f(g(x))$ |
$csc(\sqrt[3]{1-sin(x)})$ | $sin(x)$ | $\sqrt[3]{x}$ | $csc(x)$ | $h(f(g(x)))$ |
What is the chain rule? |
If s(x)=f(g(x)), and if g is differentiable at x and f is differentiable at g(x) then
$$s'(x)=f'(g(x))g'(x)$$
The Chain Rule in Words
To find the derivative of s(x), find the derivative of the outside function $(f')$ evaluated at the inside function left alone $f'(g(x))$ times the derivative of the inside function $f'(g(x))g'(x)$. $$\frac{d}{dx}[f(g(x))]=f'(g(x))$$ Basically, we start with the outer most function take it derivative, leave everything else the same, multiplied by the derivative of the next outer most function. If there are multipliable functions, we keep work from outside to inside using the same technique .Examples of the Chain Rule
Example 1$$s(x)=(3x^2+1)^5$$
Answer |
$$s(x)=({\color{Red}3x^2+1})^{{\color{Blue}5}}$$
$$s'(x)={\color{Blue}5}\underbrace{({\color{Red}3x^2+1})^{\color{Blue}4}}_\text{The inside left alone}(\frac{d}{dx}{\color{Red}3x^2+1})$$
$$s'(x)={\color{Blue}5}({\color{Red}3x^2+1})^{\color{Blue}4}(3)$$
$\boxed{s'(x)=15(3x^2+1)^4}$
$$s(x)=sin^3(x)$$
Answer |
Whenever you are working with a trigonometry that is raised to a power, you should re-write it.
$$s(x)=({\color{Red}{sin(x)}})^{{\color{Blue}3}}$$
$$s'(x)={\color{Blue}3}\underbrace{({\color{Red}{sin(x)}})^{\color{Blue}2}}_\text{The inside left alone}(\frac{d}{dx}{\color{Red}{sin(x)}})$$
$$s'(x)={\color{Blue}3}({\color{Red}{sin(x)}})^{\color{Blue}2}(cos(x))$$
$\boxed{s'(x)=3cos(x)sin^2(x)}$
$$s(x)=\sqrt{ln(x)}$$
Answer |
Whenever you are working with a trigonometry that is raised to a power, you should re-write it.
$$
s(x)=({\color{Red}{ln(x)}})^{\frac{1}{2}}
\\
s'(x)={\color{Blue}{\frac{1}{2}}}\underbrace{({\color{Red}{ln(x)}})^{{\color{Blue}{-\frac{1}{2}}}}}_\text{The inside left alone}(\frac{d}{dx}{\color{Red}{ln(x)}})
\\
s'(x)={\color{blue}{\frac{1}{2}}} ({\color{Red}{ln(x)}})^{{\color{Blue}{-\frac{1}{2}}}}(\frac{1}{x})
\\
\boxed{s'(x)=\frac{1}{2x\sqrt{ln(x)}}}
$$
$$s(x)=e^{x^2}$$
Answer |
Whenever you are working with a trigonometry that is raised to a power, you should re-write it.
$$s(x)={\color{Red}e}^{{\color{Blue}x^2}}$$
In this case $s(x)=f(g(x))$, where $f(x)=e^x$ and $g(x)=x^2$. Remember the derivative of $e^x=e^x$ so $f'(x)=e^x$ and $f'(g(x))=f'(x^2)=e^{x^2}$:
$$s'(x)={\color{Red}e}^{{\color{Blue}x^2}}(\frac{d}{dx}{\color{Blue}x^2})$$
$$s'(x)={\color{Red}e}^{{\color{Blue}x^2}}({\color{Blue}2x})$$
$\boxed{s'(x)=2xe^{x^2}}$
$$s(x)=\big(\frac{3x+4}{6x-1}\big)^3$$
Answer |
Whenever you are working with a trigonometry that is raised to a power, you should re-write it.
$$
s(x)=(\color{Red}{\frac{3x+4}{6x-1}})^{\color{Blue}3}
\\
s'(x)=\color{Blue}3\underbrace{\Big({ \color{Red}{ \frac{3x+4}{6x-1}}\Big)^{\color{Blue}2} } }_\text{The inside left alone}\frac{d}{dx}\big(\color{Red}{\frac{3x+4}{6x-1}}\big)
$$
$$
s'(x)=\color{Blue}3 \Big({ \color{Red}{ \frac{3x+4}{6x-1}}\Big)^{\color{Blue}2}}\Big({\color{Red}{ \frac{(6x-1)(3)-(3x+4)(6)}{(6x-1)^2}}}\Big)
$$
$$
\color{Blue}3\Big( \color{Red}{\frac{3x+4}{6x-1}}\Big)^{\color{Blue}2}\Big(\color{Red}{ \frac{-27}{(6x-1)^2} }\Big)
$$
$\boxed{s'(x)=\frac{-81(3x+4)^2}{(6x-1)^4}}$