Multivariable Chain Rule

Multivariable Chain Formula

Given function \( f \) with variables \( x \), \( y \) and \( z \) and \( x \), \( y \) and \( z \) being functions of \( t \), the derivative of \( f \) with respect to \( t \) is given by by the multivariable chain rule which is a sum of the product of partial derivatives and derivatives as follows: \[ \Large \color{red}{\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}} \]

Examples on Using Multivariable Chain Formula

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} \)
Solution
We first use the multivariable chain rule to find 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 \[ \frac{\partial U}{\partial x} = y e^{xy} \;\; , \;\; \frac{\partial U}{\partial y} = x e^{xy} \;\; , \;\; \frac{\partial U}{\partial z} = - 1 / z^2 \;\; , \;\; \frac{dx}{dt} = 4 t + 1 \\\\ \frac{dy}{dt} = 1 / t \;\; , \;\; \frac{dz}{dt} = 1 \] and substitute \[ \frac{dU}{dt} = y e^{xy} (4 t + 1) + x e^{xy} (1/t) - 1 / z^2 (1) \\\\ = (4 t y + y + x/t)e^{(2 t^2 + t)(2 + \ln (t) )} - \frac{1}{(t - 2)^2} \\\\ = (4 t \ln (t)) + \ln (t) + 10t + 3)e^{(2 t^2 + t)(2 + \ln (t) )} - \frac{1}{(t - 2)^2} \]


Extension of the chain rule

Given function \( f \) with variables \( x \) and \( y \) and \( x \) and \( y \) being functions of \( t \) and \( r \), the partial derivatives of \( f \) with respect to \( t \) and \( r \) are give by the extended multivariable chain rule as follows: \[ \Large \color{red}{\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}} \] \[ \Large \color{red}{\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} } \]

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 \[ \frac{\partial W}{\partial r}, \frac{\partial W}{\partial \theta} \] with \( r \ge 0 \) and \( 0 \le \theta \le 2\pi \)
Solution
We first write the extended multivariable chain rule to find \( \dfrac{\partial W}{\partial r} \) and \( \dfrac{\partial W}{\partial \theta} \): \[ \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} \] We next calculate all terms in the two formulas above: \[ \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) \] We now substitute and simplify to find \( \dfrac{\partial W}{\partial r} \) and \( \dfrac{\partial W}{\partial \theta} \): \[ \frac{\partial W}{\partial r} = \frac{x}{\sqrt{x^2+y^2}} \cos(\theta) + \frac{y}{\sqrt{x^2+y^2}} \sin(\theta) = 1 \] \[ \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)) = 0 \] Note
All the above could have been done by first simplifying \( W \) as follows \[ W = \sqrt{x^2+y^2} = \sqrt{(r\cos \theta)^2+(r\sin \theta)^2} = r \] which easily gives \[ \frac{\partial W}{\partial r} = 1 \quad \text{and} \quad \frac{\partial W}{\partial \theta} = 0 \] Of course the purpose of the example was to show how to apply extended multivariable chain rule

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 \[ \frac{\partial W}{\partial u}, \frac{\partial W}{\partial v} \]
Solution
The extended multivariable chain rule is used to find \( \dfrac{\partial W}{\partial u} \) and \( \dfrac{\partial W}{\partial v} \): \[ \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} \] We next calculate all terms included in \( \dfrac{\partial W}{\partial u} \) and \( \dfrac{\partial W}{\partial v} \) above: \[ \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 \] We now substitute and simplify to find \( \dfrac{\partial W}{\partial u} \) and \( \dfrac{\partial W}{\partial v} \) above: \[ \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) \] \[ \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) \]

Applications of The Multivariable Chain Rule

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 \) is 50 cm and increasing at the rate of 0.2 cm per second, the width \( W \) is 40 cm and increasing at the rate of 0.1 cm per second, and the height \( H \) is 30 cm and decreasing at the rate of 0.1 cm per second.
Solution
The dimensions \( L \), \( W \), and \( H \) change with time 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} \] The terms in the above expression are given by \[ \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 \] We now evaluate \( \dfrac{dV}{dt} \): \[ \frac{dV}{dt} = WH \cdot 0.2 + LH \cdot 0.1 + LW \cdot (-0.1) = 190 \text{ cm}^3/\text{s} \]

Example 5


The equivalent resistance \( R \) to 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 \) as follows: \[ 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 \), \( T_0 \) are constant. Find the rate of change \( \dfrac{dR}{dT} \).
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} \] Calculate the terms in the above expression: \[ \frac{\partial R}{\partial R_1} = \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^2}{(R_1+R_2)^2}, \quad \frac{dR_2}{dT} = R_{20} \beta \] We now substitute the terms in \( \dfrac{dR}{dT} \): \[ \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 \] \[ = \frac{R_2^2 R_{10} \alpha + R_1^2 R_{20} \beta}{(R_1+R_2)^2} \]

More References and links

Partial Derivatives
Find Derivatives of Functions in Calculus
differentiation and derivatives