Multivariable Chain Rule

Formulas, Applications, and Detailed Solutions

Introduction to the Multivariable Chain Rule

When dealing with a multivariable function where the inner variables are themselves functions of one or more independent parameters, the multivariable chain rule allows us to calculate the derivative of the composite function with respect to those parameters.

Single Independent Parameter

Given a function $f(x, y, z)$ where $x$, $y$, and $z$ are all functions of a single variable $t$, the total derivative of $f$ with respect to $t$ is calculated by taking the sum of the products of the partial derivatives of $f$ and the standard derivatives of the inner variables:

$$ \frac{df}{dt} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt} + \frac{\partial f}{\partial z}\frac{dz}{dt} $$

Multiple Independent Parameters (Extended Chain Rule)

If a function $f(x, y)$ has inner variables $x$ and $y$ that are functions of multiple parameters, such as $t$ and $r$, we use the extended chain rule to find the partial derivatives of $f$ with respect to each parameter:

$$ \frac{\partial f}{\partial t} = \frac{\partial f}{\partial x} \frac{\partial x}{\partial t} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial t} $$ $$ \frac{\partial f}{\partial r} = \frac{\partial f}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial r} $$

Examples Using the Multivariable Chain Rule

Example 1

\( U \) is a function of \( x \), \( y \) and \( z \) given by:

$$ U = e^{xy} - \frac{1}{z} $$

\( x \), \( y \), and \( z \) are functions of \( t \):

$$ x = 2 t^2 + t, \quad y = 2 + \ln (t) , \quad z = t - 2 $$

Find \(\dfrac{dU}{dt}\).

Show Solution

We first set up the multivariable chain rule to find \(\dfrac{dU}{dt}\):

$$ \frac{dU}{dt} = \frac{\partial U}{\partial x}\frac{dx}{dt} + \frac{\partial U}{\partial y}\frac{dy}{dt} + \frac{\partial U}{\partial z}\frac{dz}{dt} $$

We next calculate each term in the formula above (Note: the derivative of \(-z^{-1}\) is \(+z^{-2}\)):

$$ \frac{\partial U}{\partial x} = y e^{xy} \;\; , \;\; \frac{\partial U}{\partial y} = x e^{xy} \;\; , \;\; \frac{\partial U}{\partial z} = \frac{1}{z^2} $$ $$ \frac{dx}{dt} = 4 t + 1 \;\; , \;\; \frac{dy}{dt} = \frac{1}{t} \;\; , \;\; \frac{dz}{dt} = 1 $$

Substitute these into the chain rule formula:

$$ \frac{dU}{dt} = \left(y e^{xy}\right) (4 t + 1) + \left(x e^{xy}\right) \left(\frac{1}{t}\right) + \left(\frac{1}{z^2}\right) (1) $$

Factor out \(e^{xy}\) and replace \(x, y,\) and \(z\) with their functions of \(t\):

$$ = \left(4 t y + y + \frac{x}{t}\right)e^{(2 t^2 + t)(2 + \ln (t) )} + \frac{1}{(t - 2)^2} $$

Expand the terms inside the parentheses to find the final result:

$$ = (4 t \ln (t) + \ln (t) + 10t + 3)e^{(2 t^2 + t)(2 + \ln (t) )} + \frac{1}{(t - 2)^2} $$

Example 2

\( W \) is a function of \( x \) and \( y \) given by:

$$ W = \sqrt{x^2+y^2} $$

\( x \) and \( y \) are functions of \( r \) and \( \theta \) given by:

$$ x = r \cos(\theta), \quad y = r \sin(\theta) $$

Find \(\dfrac{\partial W}{\partial r}\) and \(\dfrac{\partial W}{\partial \theta}\) with \( r \ge 0 \) and \( 0 \le \theta \le 2\pi \).

Show Solution

We use the extended multivariable chain rule to find both partial derivatives:

$$ \frac{\partial W}{\partial r} = \frac{\partial W}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial W}{\partial y} \frac{\partial y}{\partial r} $$ $$ \frac{\partial W}{\partial \theta} = \frac{\partial W}{\partial x} \frac{\partial x}{\partial \theta} + \frac{\partial W}{\partial y} \frac{\partial y}{\partial \theta} $$

Calculate all the individual components:

$$ \frac{\partial W}{\partial x} = \frac{x}{\sqrt{x^2+y^2}}, \quad \frac{\partial x}{\partial r} = \cos(\theta) $$ $$ \frac{\partial W}{\partial y} = \frac{y}{\sqrt{x^2+y^2}}, \quad \frac{\partial y}{\partial r} = \sin(\theta) $$ $$ \frac{\partial x}{\partial \theta} = -r \sin(\theta), \quad \frac{\partial y}{\partial \theta} = r \cos(\theta) $$

Substitute and simplify to find \(\dfrac{\partial W}{\partial r}\):

$$ \frac{\partial W}{\partial r} = \frac{x}{\sqrt{x^2+y^2}} \cos(\theta) + \frac{y}{\sqrt{x^2+y^2}} \sin(\theta) $$

Since \(x = r \cos(\theta)\), \(y = r \sin(\theta)\), and \(\sqrt{x^2+y^2} = r\), this becomes:

$$ \frac{\partial W}{\partial r} = \frac{r \cos(\theta)}{r} \cos(\theta) + \frac{r \sin(\theta)}{r} \sin(\theta) = \cos^2(\theta) + \sin^2(\theta) = 1 $$

Substitute and simplify to find \(\dfrac{\partial W}{\partial \theta}\):

$$ \frac{\partial W}{\partial \theta} = \frac{x}{\sqrt{x^2+y^2}} (- r \sin(\theta)) + \frac{y}{\sqrt{x^2+y^2}} (r \cos(\theta)) $$ $$ \frac{\partial W}{\partial \theta} = \frac{r \cos(\theta)}{r} (- r \sin(\theta)) + \frac{r \sin(\theta)}{r} (r \cos(\theta)) = -r\cos(\theta)\sin(\theta) + r\cos(\theta)\sin(\theta) = 0 $$

Note: All the above could have been done much faster by first substituting \(x\) and \(y\) directly into \(W\):

$$ W = \sqrt{x^2+y^2} = \sqrt{(r\cos \theta)^2+(r\sin \theta)^2} = \sqrt{r^2(\cos^2 \theta + \sin^2 \theta)} = r $$

Which easily gives \(\dfrac{\partial W}{\partial r} = 1\) and \(\dfrac{\partial W}{\partial \theta} = 0\). This example serves to verify the chain rule matches direct substitution.

Example 3

\( W \) is a function of \( x \) and \( y \) given by:

$$ W = \ln(x + y) - \sin(x + y) $$

\( x \) and \( y \) are functions of \( u \) and \( v \) given by:

$$ x = u^2 + v^2, \quad y = u + v $$

Find \(\dfrac{\partial W}{\partial u}\) and \(\dfrac{\partial W}{\partial v}\).

Show Solution

The extended multivariable chain rule for \(u\) and \(v\) is:

$$ \frac{\partial W}{\partial u} = \frac{\partial W}{\partial x} \frac{\partial x}{\partial u} + \frac{\partial W}{\partial y} \frac{\partial y}{\partial u} $$ $$ \frac{\partial W}{\partial v} = \frac{\partial W}{\partial x} \frac{\partial x}{\partial v} + \frac{\partial W}{\partial y} \frac{\partial y}{\partial v} $$

Calculate the necessary partial derivatives:

$$ \frac{\partial W}{\partial x} = \frac{1}{x+y} - \cos(x + y), \quad \frac{\partial x}{\partial u} = 2u $$ $$ \frac{\partial W}{\partial y} = \frac{1}{x+y} - \cos(x + y), \quad \frac{\partial y}{\partial u} = 1 $$ $$ \frac{\partial x}{\partial v} = 2v, \quad \frac{\partial y}{\partial v} = 1 $$

Substitute the terms to find \(\dfrac{\partial W}{\partial u}\):

$$ \frac{\partial W}{\partial u} = \left(\frac{1}{x+y} - \cos(x + y)\right) 2u + \left(\frac{1}{x+y} - \cos(x + y)\right) (1) $$ $$ = (2u + 1) \frac{1}{x+y} - (2u + 1) \cos(x + y) $$

Substitute the terms to find \(\dfrac{\partial W}{\partial v}\):

$$ \frac{\partial W}{\partial v} = \left(\frac{1}{x+y} - \cos(x + y)\right) 2v + \left(\frac{1}{x+y} - \cos(x + y)\right) (1) $$ $$ = (2v + 1) \frac{1}{x+y} - (2v + 1) \cos(x + y) $$

Example 4

The volume of a rectangular solid of dimensions \( L \), \( W \) and \( H \) is given by the formula:

$$ V = LWH $$

Find the rate (in \(\text{cm}^3/\text{s}\)) at which the volume \( V \) is changing when the length \( L = 50\text{ cm} \) and increasing at \( 0.2\text{ cm/s} \), the width \( W = 40\text{ cm} \) and increasing at \( 0.1\text{ cm/s} \), and the height \( H = 30\text{ cm} \) and decreasing at \( 0.1\text{ cm/s} \).

Show Solution

The dimensions \( L \), \( W \), and \( H \) change with respect to time \( t \), therefore the volume \( V \) also changes with time. The chain rule is used to find \(\dfrac{dV}{dt}\):

$$ \frac{dV}{dt} = \frac{\partial V}{\partial L}\frac{dL}{dt} + \frac{\partial V}{\partial W}\frac{dW}{dt} + \frac{\partial V}{\partial H}\frac{dH}{dt} $$

Calculate the partial derivatives and identify the rates of change:

$$ \frac{\partial V}{\partial L} = WH, \quad \frac{dL}{dt} = 0.2 $$ $$ \frac{\partial V}{\partial W} = LH, \quad \frac{dW}{dt} = 0.1 $$ $$ \frac{\partial V}{\partial H} = LW, \quad \frac{dH}{dt} = -0.1 $$

Evaluate \(\dfrac{dV}{dt}\) using the given instantaneous values (\(L=50, W=40, H=30\)):

$$ \frac{dV}{dt} = (40)(30)(0.2) + (50)(30)(0.1) + (50)(40)(-0.1) $$ $$ \frac{dV}{dt} = 240 + 150 - 200 = 190 \text{ cm}^3/\text{s} $$

Example 5

The equivalent resistance \( R \) of two resistors in parallel with resistances \( R_1 \) and \( R_2 \) is given by:

$$ R = \frac{R_1 R_2}{R_1+R_2} $$

Resistances \( R_1 \) and \( R_2 \) change with temperature \( T \) according to the following formulas:

$$ R_1 = R_{10}(1 + \alpha(T - T_0)), \quad R_2 = R_{20}(1 + \beta(T - T_0)) $$

where \( R_{10} \), \( R_{20} \), \( \alpha \), \( \beta \), and \( T_0 \) are constants. Find the rate of change \(\dfrac{dR}{dT}\).

Show Solution

\(\dfrac{dR}{dT}\) is given by the chain rule as follows:

$$ \frac{dR}{dT} = \frac{\partial R}{\partial R_1}\frac{dR_1}{dT} + \frac{\partial R}{\partial R_2}\frac{dR_2}{dT} $$

Using the quotient rule, calculate the partial derivatives of \(R\), and then find the derivatives of \(R_1\) and \(R_2\) with respect to \(T\):

$$ \frac{\partial R}{\partial R_1} = \frac{R_2(R_1+R_2) - R_1 R_2(1)}{(R_1+R_2)^2} = \frac{R_2^2}{(R_1+R_2)^2}, \quad \frac{dR_1}{dT} = R_{10} \alpha $$ $$ \frac{\partial R}{\partial R_2} = \frac{R_1(R_1+R_2) - R_1 R_2(1)}{(R_1+R_2)^2} = \frac{R_1^2}{(R_1+R_2)^2}, \quad \frac{dR_2}{dT} = R_{20} \beta $$

Substitute these terms back into the chain rule equation:

$$ \frac{dR}{dT} = \frac{R_2^2}{(R_1+R_2)^2} (R_{10} \alpha) + \frac{R_1^2}{(R_1+R_2)^2} (R_{20} \beta) $$

Combine into a single fraction:

$$ \frac{dR}{dT} = \frac{R_2^2 R_{10} \alpha + R_1^2 R_{20} \beta}{(R_1+R_2)^2} $$

Continue Your Learning