MA 261 - Lesson 12: Chain Rule (Section 15.4)

This lesson covers the multivariable chain rule, including applications to functions of two or more variables, tree diagrams for visualizing dependencies, and implicit differentiation techniques.


Page 1

Page 1: Lesson 12 title, review example of partial derivatives
Original handwritten page 1

Review Example: Partial Derivatives

Example: Find partial derivatives of \(F(x, y, z) = e^{2y^2z^3}\)

To find each partial derivative, we treat the other variables as constants.

Finding \(\frac{\partial F}{\partial x}\):

When differentiating with respect to \(x\), both \(y\) and \(z\) are treated as constants. Since the function \(e^{2y^2z^3}\) contains no \(x\) terms:

\[\frac{\partial}{\partial x}\left(e^{2y^2z^3}\right) = 0\]

Finding \(\frac{\partial F}{\partial y}\):

When differentiating with respect to \(y\), we treat \(x\) and \(z\) as constants. Using the chain rule:

\[\frac{\partial}{\partial y}\left(e^{2y^2z^3}\right) = e^{2y^2z^3} \cdot \frac{\partial}{\partial y}(2y^2z^3) = e^{2y^2z^3} \cdot 4yz^3 = 4yz^3e^{2y^2z^3}\]

Finding \(\frac{\partial F}{\partial z}\):

When differentiating with respect to \(z\), we treat \(x\) and \(y\) as constants:

\[\frac{\partial}{\partial z}\left(e^{2y^2z^3}\right) = e^{2y^2z^3} \cdot \frac{\partial}{\partial z}(2y^2z^3) = e^{2y^2z^3} \cdot 6y^2z^2 = 6y^2z^2e^{2y^2z^3}\]

Additionally, there is a single-variable derivative example shown:

\[\frac{d}{dx}\left(e^{5x}\right) = e^{5x} \cdot 5 = 5e^{5x}\]

Page 2

Page 2: Review of single-variable chain rule with tree diagram
Original handwritten page 2

Review: Single-Variable Chain Rule

Example: Composite function with parameter \(t\)

Given \(f(x) = e^x\), \(g(t) = 3t^2\), and \(h(t) = f(g(t))\), find \(h'(t)\).

We have:

\(f(x) = e^x\), so \(f'(x) = e^x\)

\(g(t) = 3t^2\), so \(g'(t) = 6t\)

Using the chain rule:

\[h'(t) = f'(g(t)) \cdot g'(t) = e^{3t^2} \cdot 6t = 6te^{3t^2}\]

Tree Diagram Description: A dependency tree is shown with \(h\) at the top, an arrow pointing down to \(f\), which has two branches: one labeled \(\frac{df}{dx}\) pointing to \(x\), and from \(x\) an arrow labeled \(\frac{dx}{dt}\) pointing to \(t\) at the bottom. This illustrates the chain of dependencies in the composite function.

Tree with a Branch: The chain rule can be visualized as a product of derivatives that appear on the branches of the dependency tree.


Page 3

Page 3: Chain rule for two or more variables with tree diagram
Original handwritten page 3

Chain Rule: Two or More Variables

Example: \(z = x^2 - y^2\), \(x = \tan t\), \(y = \sec t\), find \(\frac{dz}{dt}\)

We have:

\(\frac{\partial z}{\partial x} = 2x\), \(\frac{\partial z}{\partial y} = -2y\)

\(\frac{dx}{dt} = \sec^2 t\), \(\frac{dy}{dt} = \sec t \tan t\)

Tree Diagram Description: At the top is \(z\), with two branches descending. The left branch goes to \(x\) (labeled \(\frac{\partial z}{\partial x}\)), and the right branch goes to \(y\) (labeled \(\frac{\partial z}{\partial y}\)). From both \(x\) and \(y\), arrows labeled \(\frac{dx}{dt}\) and \(\frac{dy}{dt}\) respectively point down to \(t\) at the bottom.

Chain Rule (1-Variable Case): Apply the single-variable chain rule along each of the branches and add them:

\[\frac{dz}{dt} = \frac{\partial z}{\partial x} \cdot \frac{dx}{dt} + \frac{\partial z}{\partial y} \cdot \frac{dy}{dt}\]

Solution:

\[\frac{dz}{dt} = (2x)(\sec^2 t) + (-2y)(\sec t \tan t)\] \[= 2\tan t \sec^2 t - 2\sec^2 t \tan t = 0\]

Page 4

Page 4: Example with z equals x squared y plus 3xy to the fourth power
Original handwritten page 4
Example: Find \(\frac{dz}{dt}\) at \(t = 0\)

Given: \(z = x^2y + 3xy^4\), \(x = \sin t\), \(y = \cos t\)

Tree Diagram Description: At the top is \(z\), with two branches going to \(x\) (labeled \(\frac{\partial z}{\partial x}\)) and \(y\) (labeled \(\frac{\partial z}{\partial y}\)). From \(x\), an arrow labeled \(\frac{dx}{dt}\) points to \(t\). From \(y\), an arrow labeled \(\frac{dy}{dt}\) points to \(t\). The note "at \(t = 0\)" with \(x = 0\), \(y = 1\) appears in the upper right.

Solution:

Using the chain rule:

\[\frac{dz}{dt} = \frac{\partial z}{\partial x} \cdot \frac{dx}{dt} + \frac{\partial z}{\partial y} \cdot \frac{dy}{dt}\]

Computing partial derivatives:

\(\frac{\partial z}{\partial x} = 2xy + 3y^4\)

\(\frac{\partial z}{\partial y} = x^2 + 12xy^3\)

Computing derivatives with respect to \(t\):

\(\frac{dx}{dt} = \cos t\), \(\frac{dy}{dt} = -\sin t\)

Therefore:

\[\frac{dz}{dt} = (2xy + 3y^4)\cos t + (x^2 + 12xy^3)(-\sin t)\]

At \(t = 0\), we have \(x = \sin(0) = 0\) and \(y = \cos(0) = 1\):

\[\frac{dz}{dt}\bigg|_{t=0} = (2 \cdot 0 \cdot 1 + 3 \cdot 1^4)\cos(0) + (0^2 + 12 \cdot 0 \cdot 1^3)(-\sin(0))\] \[= (0 + 3)(1) + (0 + 0)(0) = 3\]

Page 5

Page 5: Example with z equals e to the x sine y, finding partial derivatives
Original handwritten page 5
Example: Find \(\frac{\partial z}{\partial s}\) and \(\frac{\partial z}{\partial t}\)

Given: \(z = e^{x} \sin y\), \(x = st^2\), \(y = s^2t\)

Tree Diagram Description (for \(\frac{\partial z}{\partial s}\)): At the top is \(z\), with branches to \(x\) and \(y\). From \(x\), branches go to both \(s\) and \(t\). From \(y\), branches go to both \(s\) and \(t\). The relevant paths for \(\frac{\partial z}{\partial s}\) are highlighted: \(z \to x \to s\) and \(z \to y \to s\).

Tree Diagram Description (for \(\frac{\partial z}{\partial t}\)): Similar structure, but the relevant paths for \(\frac{\partial z}{\partial t}\) are: \(z \to x \to t\) and \(z \to y \to t\).

Finding \(\frac{\partial z}{\partial s}\):

\[\frac{\partial z}{\partial s} = \frac{\partial z}{\partial x} \cdot \frac{\partial x}{\partial s} + \frac{\partial z}{\partial y} \cdot \frac{\partial y}{\partial s}\]

Computing partial derivatives:

\(\frac{\partial z}{\partial x} = e^{x} \cdot \sin y\)

\(\frac{\partial z}{\partial y} = e^{x} \cdot \cos y\)

\(\frac{\partial x}{\partial s} = t^2\), \(\frac{\partial y}{\partial s} = 2st\)

Therefore:

\[\frac{\partial z}{\partial s} = (e^{x} \sin y)(t^2) + (e^{x} \cos y)(2st)\]

Finding \(\frac{\partial z}{\partial t}\):

\[\frac{\partial z}{\partial t} = \frac{\partial z}{\partial x} \cdot \frac{\partial x}{\partial t} + \frac{\partial z}{\partial y} \cdot \frac{\partial y}{\partial t}\]

\(\frac{\partial x}{\partial t} = 2st\), \(\frac{\partial y}{\partial t} = s^2\)

Therefore:

\[\frac{\partial z}{\partial t} = (e^{x} \sin y)(2st) + (e^{x} \cos y)(s^2)\]

Page 6

Page 6: Chain rule when you have more than 2 functions
Original handwritten page 6

Chain Rule with More Than 2 Functions

Example: Three-level composition

Find \(\frac{d}{dx}\left[\sin(e^{x^3})\right]\)

Tree Diagram Description: A vertical chain showing \(f \to u \to t \to x\). Each arrow is labeled with the corresponding derivative: \(\frac{df}{du}\), \(\frac{du}{dt}\), \(\frac{dt}{dx}\). At the right, the formula \(\frac{df}{dx} = \frac{df}{du} \cdot \frac{du}{dt} \cdot \frac{dt}{dx}\) is shown.

Solution:

Let \(t = x^3\), \(u = e^t\), and \(f = \sin(u)\).

Then:

\(\frac{dt}{dx} = 3x^2\)

\(\frac{du}{dt} = e^t\)

\(\frac{df}{du} = \cos(u)\)

By the chain rule:

\[\frac{d}{dx}\left[\sin(e^{x^3})\right] = \cos(e^{x^3}) \cdot e^{x^3} \cdot 3x^2\]

Page 7

Page 7: Complex chain rule with multiple levels of dependencies
Original handwritten page 7

Multi-Level Chain Rule

Example: Finding \(\frac{\partial z}{\partial u}\)

Suppose \(z = f(x, y)\), \(x = g(s, t)\), \(y = h(s, t)\), \(s = m(u, v)\), \(t = n(u, v)\)

Tree Diagram Description: A complex dependency tree with \(z\) at the top branching to \(x\) and \(y\). Each of \(x\) and \(y\) branches to both \(s\) and \(t\). Finally, both \(s\) and \(t\) branch to both \(u\) and \(v\) at the bottom level. This creates multiple paths from \(z\) to \(u\).

Solution:

To find \(\frac{\partial z}{\partial u}\), we trace all paths from \(z\) to \(u\) through the dependency tree and sum the products of derivatives along each path:

\[\frac{\partial z}{\partial u} = \frac{\partial z}{\partial x} \cdot \frac{\partial x}{\partial s} \cdot \frac{\partial s}{\partial u} + \frac{\partial z}{\partial x} \cdot \frac{\partial x}{\partial t} \cdot \frac{\partial t}{\partial u} + \frac{\partial z}{\partial y} \cdot \frac{\partial y}{\partial s} \cdot \frac{\partial s}{\partial u} + \frac{\partial z}{\partial y} \cdot \frac{\partial y}{\partial t} \cdot \frac{\partial t}{\partial u}\]

Page 8

Page 8: Another complex multi-level chain rule example
Original handwritten page 8
Example: Extended dependency chain

Given: \(w = f_1(x, y, z, t)\), \(x = f_2(u, v)\), \(y = f_3(u, v)\), \(z = f_4(u, v, p)\), \(t = f_5(u, v, p)\)

Tree Diagram Description: An even more complex dependency tree. At the top is \(w\), with four branches to \(x\), \(y\), \(z\), and \(t\). Variables \(x\) and \(y\) each branch to both \(u\) and \(v\). Variables \(z\) and \(t\) each branch to \(u\), \(v\), and \(p\). A pink shaded region highlights one particular path through the tree.

Finding \(\frac{\partial w}{\partial u}\):

\[\frac{\partial w}{\partial u} = \frac{\partial w}{\partial x} \cdot \frac{\partial x}{\partial u} + \frac{\partial w}{\partial y} \cdot \frac{\partial y}{\partial u} + \frac{\partial w}{\partial z} \cdot \frac{\partial z}{\partial u} + \frac{\partial w}{\partial t} \cdot \frac{\partial t}{\partial u}\]

Finding \(\frac{\partial w}{\partial v}\):

\[\frac{\partial w}{\partial v} = \frac{\partial w}{\partial x} \cdot \frac{\partial x}{\partial v} + \frac{\partial w}{\partial y} \cdot \frac{\partial y}{\partial v} + \frac{\partial w}{\partial z} \cdot \frac{\partial z}{\partial v} + \frac{\partial w}{\partial t} \cdot \frac{\partial t}{\partial v}\]

Finding \(\frac{\partial w}{\partial p}\):

\[\frac{\partial w}{\partial p} = \frac{\partial w}{\partial z} \cdot \frac{\partial z}{\partial p} + \frac{\partial w}{\partial t} \cdot \frac{\partial t}{\partial p}\]

Note that \(x\) and \(y\) don't depend on \(p\), so they don't contribute to \(\frac{\partial w}{\partial p}\).


Page 9

Page 9: Implicit differentiation using chain rule
Original handwritten page 9

Implicit Differentiation Using Chain Rule

Example: \(y\) is a function of \(x\) given implicitly by \(x^3 + y^3 - 6xy = 0\), find \(\frac{dy}{dx}\)

Two Methods: We can solve this using either Calculus I implicit differentiation or the multivariable chain rule.

Method 1: Calculus I Approach

Differentiate both sides with respect to \(x\):

\[\frac{d}{dx}(x^3 + y^3 - 6xy) = \frac{d}{dx}(0)\] \[3x^2 + 3y^2\frac{dy}{dx} - 6y - 6x\frac{dy}{dx} = 0\]

Solving for \(\frac{dy}{dx}\):

\[3y^2\frac{dy}{dx} - 6x\frac{dy}{dx} = 6y - 3x^2\] \[\frac{dy}{dx}(3y^2 - 6x) = 6y - 3x^2\] \[\frac{dy}{dx} = \frac{6y - 3x^2}{3y^2 - 6x} = \frac{2y - x^2}{y^2 - 2x}\]

Method 2: Using Chain Rule

Write the equation as \(F(x, y) = x^3 + y^3 - 6xy = 0\)

Tree Diagram Description: A simple tree with \(F\) at the top, branching to both \(x\) and \(y\), and both \(x\) and \(y\) pointing down to a common \(x\) variable at the bottom.

Using the chain rule, since \(F(x, y(x)) = 0\) for all \(x\):

\[F_x + F_y \cdot \frac{dy}{dx} = 0\]

Computing partial derivatives:

\(F_x = 3x^2 - 6y\)

\(F_y = 3y^2 - 6x\)

Therefore:

\[(3x^2 - 6y) + (3y^2 - 6x)\frac{dy}{dx} = 0\] \[\frac{dy}{dx} = -\frac{F_x}{F_y} = -\frac{3x^2 - 6y}{3y^2 - 6x} = \frac{6y - 3x^2}{3y^2 - 6x} = \frac{2y - x^2}{y^2 - 2x}\]

Page 10

Page 10: Implicit differentiation example with xyz equation
Original handwritten page 10
Example: \(z\) is a function of \(x\) and \(y\) given implicitly

Given: \(xyz = x^2y^2 + y^2z\), find \(\frac{\partial z}{\partial x}\)

Solution:

Write the equation as \(F(x, y, z) = 0\):

\[F(x, y, z) = xyz - x^2y^2 - y^2z = 0\]

Tree Diagram Description: At the top is \(F\), with three branches to \(x\), \(y\), and \(z\). From \(z\), two arrows point down to both \(x\) and \(y\) at the bottom level.

Using the chain rule formula:

\[F_x + F_z \cdot \frac{\partial z}{\partial x} = 0\]

Computing partial derivatives:

\(F_x = yz - 2xy^2\)

\(F_z = xy - 2y^2z\)

Therefore:

\[(yz - 2xy^2) + (xy - 2y^2z)\frac{\partial z}{\partial x} = 0\] \[\frac{\partial z}{\partial x} = -\frac{F_x}{F_z} = -\frac{yz - 2xy^2}{xy - 2y^2z} = \frac{2xy^2 - yz}{xy - 2y^2z}\]

Page 11

Page 11: Finding partial derivative with respect to y
Original handwritten page 11
Example (continued): Find \(\frac{\partial z}{\partial y}\)

Using the same equation \(F(x, y, z) = xyz - x^2y^2 - y^2z = 0\)

Tree Diagram Description: Similar to the previous page, with \(F\) at the top branching to \(x\), \(y\), and \(z\). The paths from \(F\) through \(y\) and through \(z\) to \(y\) are highlighted in teal.

Solution:

Using the chain rule:

\[F_y + F_z \cdot \frac{\partial z}{\partial y} = 0\]

Computing \(F_y\):

\(F_y = xz - 2x^2y - 2yz\)

We already know \(F_z = xy - 2y^2z\)

Therefore:

\[\frac{\partial z}{\partial y} = -\frac{F_y}{F_z} = -\frac{xz - 2x^2y - 2yz}{xy - 2y^2z} = \frac{2x^2y + 2yz - xz}{xy - 2y^2z}\]

Page 12

Page 12: Summary of implicit differentiation process
Original handwritten page 12

Summary: Implicit Differentiation

Summary: When \(z\) is implicitly given as a function of \(x\) and \(y\):

Steps for Finding Partial Derivatives:
  1. Write the given equation as a function of 3 variables: \(F(x, y, z) = 0\)
  2. Apply the chain rule:
    • For \(\frac{\partial z}{\partial x}\): Use \(\displaystyle \frac{\partial z}{\partial x} = -\frac{F_x}{F_z}\)
    • For \(\frac{\partial z}{\partial y}\): Use \(\displaystyle \frac{\partial z}{\partial y} = -\frac{F_y}{F_z}\)

Tree Diagram Description: Multiple tree diagrams showing the dependencies. For \(\frac{\partial z}{\partial x}\), the tree shows \(F\) branching to \(x\), \(y\), and \(z\), with \(z\) then connecting to \(x\). A similar diagram shows the dependencies for \(\frac{\partial z}{\partial y}\).


Page 13

Page 13: Example problem finding partial derivative at a specific point
Original handwritten page 13
Example: Find \(\frac{\partial z}{\partial x}\) at \((2, 0, 1)\)

Given: \(z\) is a function of \(x\) and \(y\) given implicitly by

\[x^2z + 3\cos(y)z^2 + 2xyz = 11\]

Find \(\frac{\partial z}{\partial x}\) at the point \((2, 0, 1)\) where \(x = 2\), \(y = 0\), \(z = 1\).

Solution:

Step 1: Write as \(F(x, y, z) = 0\):

\[F(x, y, z) = x^2z + 3\cos(y) \cdot z^2 + 2xyz - 11 = 0\]

Tree Diagram Description: At the top is \(F\), with branches to \(x\), \(y\), and \(z\). From \(z\), arrows point to both \(x\) and \(y\).

Step 2: Apply chain rule \(F_x + F_z \frac{\partial z}{\partial x} = 0\)

\(\implies \frac{\partial z}{\partial x} = -\frac{F_x}{F_z}\)

Step 3: Compute partial derivatives:

\(F_x = 2xz + 2yz\)

\(F_z = x^2 + 6\cos(y) \cdot z + 2xy\)

Step 4: Substitute the point \((2, 0, 1)\):

\[\frac{\partial z}{\partial x}\bigg|_{(2,0,1)} = -\frac{(2 \cdot 2 \cdot 1 + 2 \cdot 0 \cdot 1)}{(2^2 + 6\cos(0) \cdot 1 + 2 \cdot 2 \cdot 0)}\] \[= -\frac{4 + 0}{4 + 6 \cdot 1 + 0} = -\frac{4}{10} = -\frac{2}{5}\]

At the point \((2, 0, 1)\), we have \(\displaystyle \frac{\partial z}{\partial x} = -\frac{12}{14} \).