3.5: The Chain Rule


How about taking the derivative of a composition of functions?

Chain Rule
If $h(x) = f(g(x))$, then \[h'(x) = \dfrac{d}{dx}f(g(x)) = f'(g(x))\cdot g'(x)\] If we write $u = g(x)$, meaning $y = h(x) = f(g(x)) = f(u)$, then \[\dfrac{dy}{dx} = \dfrac{dy}{du}\cdot \dfrac{du}{dx}\]

In other words, $h'(x)$ is the derivative of the outside function evaluated at the inside function, then multiplied by the derivative of inside.

Let $F(x) = (3x+1)^2$.
  1. Find $F'(x)$ using the chain rule.
  2. Find $F'(x)$ without using the chain rule.
Differentiate the following:
  1. $F(x) = \sqrt{x^2 + 1}$
  2. $F(x) = \sin(x^2)$
  3. $F(x) = \sin^2(x)$

The chain rule is used when a function is taken to a power, for example \[(2x+5)^5 \qquad \sqrt{4x^2 + 2x + 1} \qquad (4x^5 + 3x^2 + 1)^{6/5}\] This means the outside function $f(x) = x^n$ sometimes! Thus:

The General Power Rule
If $g$ is differentiable and $h(x) = [g(x)]^n$, then \[h'(x) = \dfrac{d}{dx}[g(x)]^n = n[g(x)]^{n-1}g'(x)\]
Differentiate $y = (x^3-1)^{100}$.
Differentiate the following:
  1. $F(x) = \dfrac{1}{(4x^2 - 7)^2}$
  2. $H(t) = \left(\dfrac{t - 2}{2t + 1}\right)^9$
  3. $F(x) = e^{\sin x}$

Exponential Functions with Arbitrary Bases

We know the derivative of $f(x) = e^x$ is just $e^x$. How about arbitrary bases?

\[\dfrac{d}{dx}b^x = b^x \ln b\]
Differentiate $f(x) = 2^x$.

Longer Chains

Suppose $y = f(g(h(t)))$. Assigning $y = f(u), u = g(x), x = h(t)$, what is $\dfrac{dy}{dt}$?

Differentiate the following:
  1. $F(x) = \sin(\cos(\tan(x)))$
  2. $y= e^{\csc 3\theta}$

Differentiating Implicitly


Thus far, we have been given functions in the form $y = f(x)$, such as \[ y = x^2 \qquad y = \dfrac{x + 1}{x-1} \qquad y = \sqrt{36 - x}\]

Not all functions are of the form $y = f(x)$. Consider \[x^2y + y - x^2 + 1 = 0\] In thi form, $y$ is not explicitly a function of $x$, meaning $y$ is not isolated on one side. We call this an implicit equation.

Sometimes it is possible to convert an implicit equation into an explicit equation. From above we see that \begin{align} x^2y + y - x^2 + 1 &= 0 \\ y(x^2 + 1) &= x^2 - 1 \\ y &= \dfrac{x^2 - 1}{x^2 + 1} \end{align} and we have converted the implicit equation into an explicit equation.

This is not always possible. Consider \[y^4 - y^3 - y + 2x^3 - x = 8\] There is no way to isolate a single $y$ on one side.

In this case, we want to assume we can take $y = f(x)$ under suitable conditions. These suitable conditions usually mean to force the implicit equation to pass the vertical line test by chopping it up into multiple functions:

Finding the derivative of an implicit equation is called implicit differentiation.

Given $y^2 = x$, find $\dfrac{dy}{dx}$.

In general:

Finding $\dfrac{dy}{dx}$ with Implicit Differentiation
  1. Apply $\dfrac{d}{dx}$ to both sides.
  2. Use the chain rule on terms involving $y$.
  3. Differentiate terms involving $x$ normally.
  4. Solve the equation for $\dfrac{dy}{dx}$.
Given \[y^3 - y + 2x^3 - x = 8\] find $\dfrac{dy}{dx}$.
Given $x^2 + y^2 = 4$:
  1. Find $\dfrac{dy}{dx}$ using implicit differentiation.
  2. Find the slope of the tangent line at $(1, \sqrt{3})$ in the above graph.

Sometimes we need to use the product rule on terms involving both $x$ and $y$, such as $x^2y^3$.

Find $\dfrac{dy}{dx}$ for the following equation \[x^2y^3 + 6x^2 = y + 12\]

The next two problems involves product and chain rules.

Find the tangent line to the equation \[x^3 + y^3 = 6xy\] at $(3,3)$.
Find $dy/dx$ for the equation \[\sqrt{xy} = x + y\]
First, convert the square root into an exponent. Applying $\dfrac{d}{dx}$ gives \begin{align} \dfrac{d}{dx}\left[(xy)^{\frac{1}{2}}\right] &= \dfrac{d}{dx}\left[x + y\right] \\\dfrac{1}{2}(xy)^{-\frac{1}{2}}\cdot \dfrac{d}{dx}[xy] &= \dfrac{d}{dx}[x] + \dfrac{d}{dx}[y] \\\dfrac{1}{2}(xy)^{-\frac{1}{2}}(x\dfrac{d}{dx}[y] + y \dfrac{d}{dx}[x]) &= 1 + 1\cdot \dfrac{dy}{dx} \\\dfrac{1}{2}(xy)^{-\frac{1}{2}}(x\cdot 1\cdot \dfrac{dy}{dx} + y\cdot 1) &= 1 + \dfrac{dy}{dx} \\\dfrac{1}{2}(xy)^{-\frac{1}{2}}x\dfrac{dy}{dx} + \dfrac{1}{2}(xy)^{-\frac{1}{2}}y &= 1 + \dfrac{dy}{dx} \\\dfrac{1}{2}(xy)^{-\frac{1}{2}}x\dfrac{dy}{dx} - \dfrac{dy}{dx} &= 1 - \dfrac{1}{2}(xy)^{-\frac{1}{2}}y \\\dfrac{dy}{dx}\left(\dfrac{1}{2}(xy)^{-\frac{1}{2}}x - 1\right) &= 1 - \dfrac{1}{2}(xy)^{-\frac{1}{2}}y \\\dfrac{dy}{dx} &= \dfrac{1 - \dfrac{1}{2}\frac{1}{(xy)^{1/2}}y}{\dfrac{1}{2}\frac{1}{(xy)^{1/2}}x - 1} \\\dfrac{dy}{dx} &= \dfrac{1 - \dfrac{y}{2\sqrt{xy}}}{\dfrac{x}{2\sqrt{xy}} - 1}\cdot{\color{yellow} \dfrac{2\sqrt{xy}}{2\sqrt{xy}}} \\\dfrac{dy}{dx} &= \dfrac{2\sqrt{xy} - y}{x - 2\sqrt{xy}} \end{align}

Related Rates


Imagine pumping air into a balloon.

Two quantities are changing with respect to time.: the volume and the radius of the balloon.

It is easier to measure the rate of change of volume due to being able to measure how much air you are pumping in.

It is not as easy to measure the rate of change of the radius with respect to time.

Related rates problems are typically in the above setup. The rate of change of one quantity is easier to measure, and that rate will also tell us something about the harder to measure rate of change.

In general, two quantities $x$ and $y$ will depend on a third quantity $t$. Given $dx/dt$, can we find $dy/dt$?

Solving related rates problems
  1. Assign a variable to each quantity that are functions of time. Draw a diagram to help you if needed.
  2. Write out the given information and the required rate in terms of derivatives.
  3. If no equation is given, write an equation that relates the various quantities of the problem.
  4. Implicitly differentiate both sides of the equation with respect to time.
  5. If necessary, use the information given to eliminate variables from the original equation with substitution.
  6. Solve for the unknown rate.
Air is being pumped into a spherical balloon so that it volume increases at a rate of 100 cm$^3$/s. How fast is the radius of the balloon increasing when the diameter is 50 cm?
When the diameter of a spherical tumor is 16mm it is growing at a rate of 0.4 mm a day. How fast is the volume of the tumor changing at that time?
At a distance of 4000 feet from the launch site, a spectator is observing a rocket being launched. If the rocket lifts off vertically and is rising at a speed of 600 feet/second when it is at an altitude of 3000 feet, how fast is the distance between the rocket and the spectator changing at that instant?