Skip to main content

Section 2.5 Chain Rule of Derivatives

Standards
  • Calculate derivatives with the chain rule
An additional property of derivatives is the chain rule which addresses composition of functions. In addition to being useful for calculating derivatives it enables a variety of applications which will be presented in later sections.
Your goal by the end of this section is to be able to calculate a derivative requiring the chain rule.

Subsection 2.5.1 Illustrating the Chain Rule

In this example we can construct a function as a composition of two functions (coal to steam, steam to motion). We can then compare the rates of the two functions and their composition. This illustrates the chain rule for a pair of linear equations.

Activity 2.5.1. Illustration of Chain Rule.

Suppose for every shovel full of coal a steam engine produces 1000 psi, and for every 2000 psi the train travels one mile.

(c)

What is the rate of coal to miles? This is a unit conversion (ratio) question.
Solution.
\(\frac{1000 \text{ psi}}{1 \text{ shovel}} \cdot \frac{1 \text{ mile}}{2000 \text{ psi}} = \frac{1 \text{ mile}}{2 \text{ shovels}}. \)

(d)

Write a function that outputs psi given number of shovels of coal.
Solution.
\(\Psi(c \text{ shovels}) = \frac{1000 \text{ psi}}{1 \text{ shovel}} c \text{ shovels}. \)

(f)

Write a function that outputs miles given psi.
Solution.
\(s(p \text{ psi}) = \frac{1 \text{ mile}}{2000 \text{ psi}} p \text{ psi}. \)

(h)

Write a function that outputs miles given number of shovels of coal. This is the composition of the previous two functions.
Solution.
\(s(\Psi(c \text{ shovels}))=\frac{1 \text{ mile}}{2000 \text{ psi}} \left( \frac{1000 \text{ psi}}{1 \text{ shovel}} c \text{ shovels} \right)\)

(j)

Compare this derivative of the composition to the two previous derivatives.
Solution.
The derivative of the composition looks like the product of the two previous derivatives, which is just the product of the ratios. The ratios are the derivatives of the original functions because they are linear.

Example 2.5.2.

The lift equation from aerodynamics is
\begin{equation*} L = \frac{1}{2}\rho s C_L v^2 \end{equation*}
where
  • \(L\) is the lift in units of lbs or Newtons)
  • \(\rho\) is air density in units of slugs per cubic feet or kilograms per cubic meter
  • \(s\) surface area in units of square feet or square meters
  • \(C_L\) is the coefficient of lift which is unitless
  • \(v\) is velocity in units of feet per second or meters per second
Suppose for this example, the air density is 0.002378 slugs per cubic feet, surface area is 125 ft2, and \(C_L=1.5617\text{.}\) We want to know how much lift increases for an increase of one mile per hour.
Because the model is set up to work in feet per second, we must scale the input from miles per hour to feet per second. This conversion will be composed with (plugged into) the lift equation, resulting in a version of the lift equation accepting velocity in miles per hour. The unit conversion is
\begin{align*} v_f = \amp v_m \frac{\text{mi}}{\text{hr}} \cdot \frac{5280 \text{ ft}}{\text{mi}} \cdot \frac{\text{hr}}{3600 \text{ sec}}\\ = \amp \frac{5280 \text{ ft}}{3600 \text{ sec}}v_m\\ = \amp \frac{22 \text{ ft}}{15 \text{ sec}}v_m\text{.} \end{align*}
The lift equation in terms of miles per hour is
\begin{align*} L \amp = \frac{1}{2}(0.002378)(125)(1.5617) \left( \frac{22}{15}v_m \right)^2\\ \amp = (0.2321076625)\left( \frac{22}{15}v_m \right)^2\\ \amp = (0.2321076625)\left( \frac{484}{225} \right) v_m^2\text{.} \end{align*}
To determine the rate of change we calculate the derivative of this form.
\begin{align*} L^\prime = \amp 2(0.2321076625)\left( \frac{484}{225} \right) v_m\\ L^\prime = \amp 2(0.2321076625)\left( \frac{22}{15} v_m \right)\left( \frac{22}{15} \right)\text{.} \end{align*}
The final form above was chosen to show that this is the derivative of the original expression for \(L\) times the derivative of the conversion. This illustrates the pattern for derivatives of the composition of functions.

Subsection 2.5.2 Property and Example

Example 2.5.4.

Calculate the derivative of \(h(x)=\sqrt{x^2-1}.\)
Solution 1.
Note how each part of the chain rule is calculated and assembled.
\begin{align*} h(x) = \amp \sqrt{\color{red}{x^2-1}}\\ f(u) = \amp \sqrt{u}. \\ \color{red}{g(x)} = \amp \color{red}{x^2-1}. \\ f^\prime(u) = \amp \frac{1}{2}u^{-\frac{1}{2}}. \\ \color{red}{g^\prime(x)} = \amp \color{red}{2x}. \\ h^\prime(x) = \amp f^\prime({\color{red}{g(x)}})\color{red}{g^\prime(x)}\\ = \amp \frac{1}{2}({\color{red}{x^2-1}})^{-\frac{1}{2}}\color{red}{2x} \\ = \amp \frac{x}{\sqrt{x^2-1}}. \end{align*}
Solution 2.
This is the same solution using a different notation that some people find easy to use. It is designed to help us do one step at a time without losing track of where we are.
\begin{align*} f(u) = \amp \sqrt{u}. \\ g(x) = \amp x^2-1. \\ h^\prime(x) = \amp \frac{1}{2}(x^2-1)^{-\frac{1}{2}}[x^2-1]^\prime \\ h^\prime(x) = \amp \frac{1}{2}(x^2-1)^{-\frac{1}{2}}2x \\ = \amp \frac{x}{\sqrt{x^2-1}}. \end{align*}

Example 2.5.5.

Calculate the derivative of \(h(x)=\sin(2\pi x)\)
Solution.
\begin{align*} h(x) = \amp \sin(\color{red}{2\pi x})\\ f(u) = \amp \sin(u). \\ \color{red}{g(x)} = \amp \color{red}{2\pi x}. \\ f^\prime(u) = \amp \cos(u). \\ \color{red}{g^\prime(x)} = \amp \color{red}{2\pi}. \\ h^\prime(x) = \amp f^\prime({\color{red}{g(x)}})\color{red}{g^\prime(x)}\\ = \amp \cos({\color{red}{2\pi x}})\color{red}{2\pi} \\ = \amp 2\pi\cos(2\pi x). \end{align*}

Example 2.5.6.

Calculate the derivative of \(h(y)=\ln(\sin y + \cos y)\)
Solution.
\begin{align*} h(y) = \amp \ln(\color{red}{\sin y + \cos y})\\ f(u) = \amp \ln(u). \\ \color{red}{g(y)} = \amp \color{red}{\sin y + \cos y}. \\ f^\prime(u) = \amp \frac{1}{u}. \\ \color{red}{g^\prime(y)} = \amp \color{red}{\cos y - \sin y}. \\ h^\prime(y) = \amp f^\prime({\color{red}{g(y)}})\color{red}{g^\prime(y)}\\ = \amp \frac{1}{\color{red}{\sin y + \cos y}}\color{red}{\cos y - \sin y} \\ = \amp \frac{\cos y - \sin y}{\sin y + \cos y}. \end{align*}

Subsection 2.5.3 Implicit Differentiation

Sometimes we know an equation involving a function before we know what the function is. We can still calculate the derivative of this unknown function. This method (mostly a notation) is vital for SectionΒ 2.6

Example 2.5.7. First Use of Implicit Differentiation.

Calculate \(f^\prime(x)\) given \(f(x)^2+x^2 = 2x+3.\) Notice that this does not provide a rule for the function. Rather it shows us a relationship involving the function.
Solution 1.
\begin{align*} f(x)^2+x^2 = \amp 2x+3. \\ 2f(x)(f^\prime(x))+2x = \amp 2. \\ 2f(x)(f^\prime(x)) = \amp 2-2x. \\ f^\prime(x) = \amp \frac{2-2x}{2f(x)} \\ f^\prime(x) = \amp \frac{1-x}{f(x)}. \end{align*}
Solution 2.
The notation we used reminds us that \(f(x)\) is a function and thus we need to treat it differently. However, the notation is unnecessarily bulky. Here we replace it with \(y=f(x)\text{.}\) This notation is common in our application of implicit differentiation in this class and in future classes.
\begin{align*} y^2+x^2 = \amp 2x+3. \\ 2y(y^\prime)+2x = \amp 2. \\ 2y(y^\prime) = \amp 2-2x. \\ y^\prime = \amp \frac{2-2x}{2y} \\ y^\prime = \amp \frac{1-x}{y}. \end{align*}

Checkpoint 2.5.8.

Note in ExampleΒ 2.5.7 we can calculate the function from the first step. Do this then calculate the derivative. Compare this to the result above.

Example 2.5.9. Another Implicit Differentiation.

Calculate \(y^\prime\) given \(y\) is a function of \(x\) and \(y^2-5y+6=x.\)
Solution.
\begin{align*} e^y-5y+6 = \amp x. \\ e^y y^\prime -5y^\prime = \amp 1. \\ y^\prime(e^y-5) = \amp 1. \\ y^\prime = \amp \frac{1}{e^y-5}. \end{align*}