# 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:## Examples on Using Multivariable Chain FormulaExample 1U is a function of x, y and z given by x , y and z are functions of t given by Find Solution We first use the multivariable chain rule to find dU/dt
\dfrac{dU}{dt} = \dfrac{\partial U}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial U}{\partial y}\dfrac{dy}{dt} + \dfrac{\partial U}{\partial z}\dfrac{dz}{dt}
We next calculate each term in the formula above
\dfrac{\partial U}{\partial x} = y e^{xy} \;\; , \;\; \dfrac{\partial U}{\partial y} = x e^{xy} \;\; , \;\; \dfrac{\partial U}{\partial z} = - 1 / z^2 \;\; , \;\; \dfrac{dx}{dt} = 4 t + 1 \\\\ \dfrac{dy}{dt} = 1 / t \;\; , \;\; \dfrac{dz}{dt} = 1
and substitute
\dfrac{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) )} - \dfrac{1}{(t - 2)^2} \\\\
= (4 t \ln (t)) + ln (t) + 10t + 3)e^{(2 t^2 + t)(2 + \ln (t) )} - \dfrac{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 {\dfrac{\partial f}{\partial t} = \dfrac{\partial f}{\partial x} \dfrac{\partial x}{\partial t} + \dfrac{\partial f}{\partial y} \dfrac{\partial y}{\partial t}}
\Large {\dfrac{\partial f}{\partial r} = \dfrac{\partial f}{\partial x} \dfrac{\partial x}{\partial r} + \dfrac{\partial f}{\partial y} \dfrac{\partial y}{\partial r}}
Example 2 W is a function of x any y given by
W = \sqrt{x^2+y^2}
x and y are functions of r and θ given by
x = r \cos(\theta) \;\; , \;\; y = r \sin(\theta)
Find
\dfrac{\partial W}{\partial r} , \dfrac{\partial W}{\partial \theta} , \text{with} \; r \ge 0 \; \text{and} \; 0 \le \theta \le 2\pi
Solution We first write the extended multivariable chain rule to find ∂W/∂r and ∂W/∂θ
\dfrac{\partial W}{\partial r} = \dfrac{\partial W}{\partial x} \dfrac{\partial x}{\partial r} + \dfrac{\partial W}{\partial y} \dfrac{\partial y}{\partial r} \\\\
\dfrac{\partial W}{\partial \theta} = \dfrac{\partial W}{\partial x} \dfrac{\partial x}{\partial \theta} + \dfrac{\partial W}{\partial y} \dfrac{\partial y}{\partial \theta}
We next calculate all term in the two formulas above
\dfrac{\partial W}{\partial x} = x (x^2+y^2)^{-1/2} \;\; , \;\; \dfrac{\partial x}{\partial r} = \cos(\theta) \\\\
\dfrac{\partial W}{\partial y} = y (x^2+y^2)^{-1/2} \;\; , \;\; \dfrac{\partial y}{\partial r} = \sin(\theta) \\\\
\dfrac{\partial x}{\partial \theta} = - r \sin(\theta) \;\; , \;\; \dfrac{\partial y}{\partial \theta} = r \cos(\theta)
We now substitute and simplify to find ∂W/∂r and ∂W/∂θ
\dfrac{\partial W}{\partial r} = x (x^2+y^2)^{-1/2} \cos(\theta) + y (x^2+y^2)^{-1/2} \sin(\theta) \\\\
= \dfrac{r\cos^2(\theta)+r\sin^2(\theta)}{(r^2\cos^2(\theta)+r^2\sin^2(\theta))^{1/2}} = 1
\dfrac{\partial W}{\partial \theta} = x (x^2+y^2)^{-1/2} (- r \sin(\theta)) + y (x^2+y^2)^{-1/2} (r \cos(\theta)) \\\\
= \dfrac{- r^2 \sin(\theta) \cos(\theta) + r^2 \cos(\theta) \sin(\theta) }{(r^2\cos^2(\theta)+r^2\sin^2(\theta))^{1/2}} = 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
\dfrac{\partial W}{\partial r} = 1 \;\; \text{and} \;\; \dfrac{\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 any 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 \;\; , \;\; y = u + v
Find
\dfrac{\partial W}{\partial u} , \dfrac{\partial W}{\partial v}
Solution The extended multivariable chain rule is used to find ∂W/∂u and ∂W/∂v
\dfrac{\partial W}{\partial u} = \dfrac{\partial W}{\partial x} \dfrac{\partial x}{\partial u} + \dfrac{\partial W}{\partial y} \dfrac{\partial y}{\partial u} \\\\
\dfrac{\partial W}{\partial v} = \dfrac{\partial W}{\partial x} \dfrac{\partial x}{\partial v} + \dfrac{\partial W}{\partial y} \dfrac{\partial y}{\partial v}
We next calculate all term included in ∂W/∂u and ∂W/∂v above
\dfrac{\partial W}{\partial x} = \dfrac{1}{x+y} - \cos(x + y) \;\; , \;\; \dfrac{\partial x}{\partial u} = 2 u \\\\
\dfrac{\partial W}{\partial y} = \dfrac{1}{x+y} - \cos(x + y) \;\; , \;\; \dfrac{\partial y}{\partial u} = 1 \\\\
\dfrac{\partial x}{\partial v} = 2 v \;\; , \;\; \dfrac{\partial y}{\partial v} = 1
We now substitute and simplify to find ∂W/∂u and ∂W/∂v above
\dfrac{\partial W}{\partial u} = ( \dfrac{1}{x+y} - \cos(x + y) ) 2 u + ( \dfrac{1}{x+y} - \cos(x + y) ) (1) \\\\
= (2 u + 1) \dfrac{1}{x+y} + \cos(x + y) (-2u - 1) \\\\
= \dfrac{2 u + 1}{u^2 + v^2 + u + v } - (2u + 1) \cos(u^2 + v^2 + u + v) \\\\
\dfrac{\partial W}{\partial v} = ( \dfrac{1}{x+y} - \cos(x + y) ) 2 v + ( \dfrac{1}{x+y} - \cos(x + y) ) (1) \\\\
= (2 v + 1) \dfrac{1}{x+y} + \cos(x + y) (-2v - 1) \\\\
= \dfrac{2 v + 1}{u^2 + v^2 + u + v } - (2v + 1) \cos(u^2 + v^2 + u + v) \\\\
## Applications of The Multivariable Chain RuleExample 4The volume of a rectangular solid of dimensions L, W and H is given by the formula
V = L W H
Find the rate (in cm^{3} / 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 changes with the time therefore the volume V also changes with the time. The chain rule is used to find dV/dt
\dfrac{dV}{dt} = \dfrac{\partial V}{\partial L}\dfrac{dL}{dt} + \dfrac{\partial V}{\partial W}\dfrac{dW}{dt} + \dfrac{\partial V}{\partial H}\dfrac{dH}{dt} \\\\
The terms in the above expression are given by
\dfrac{\partial V}{\partial L} = W H = 40 \times 30 = 1200 \\\\
\dfrac{dL}{dt} = 0.2\\\\
\dfrac{\partial V}{\partial W} = L H = 50 \times 30 = 1500\\\\
\dfrac{dW}{dt} = 0.1\\\\
\dfrac{\partial V}{\partial H} = L W = 50 \times 40 = 2000\\\\
\dfrac{dH}{dt} = - 0.1 \;\; \text{(the minus sign for decreasing)}
We now evaluate dV/dt
\dfrac{dV}{dt} = 1200 \times 0.2 + 1500 \times 0.1 + 2000 \times (-0.1) = 190 \;\; cm^3 / s
Example 5 The equivalent resistance R to two resistors in parallel with resistances R _{1} and R_{2} is given by
R = \dfrac{R_1 R_2}{R_1+R_2}
Resistances R_{1} and R_{2} changes with temperature T as follows
R_1 = R_{10}(1 + \alpha(T - T_0)) \;\; \text{and} \;\; R_2 = R_{20}(1 + \beta(T - T_0))
where R_{10}, R_{20}, α, β, T_{0} are constant.
Find the rate of change dR/dT. Solution dR/dT is given by the chain rule as follows
\dfrac{dR}{dT} = \dfrac{\partial R}{\partial R_1}\dfrac{dR_1}{dT} + \dfrac{\partial R}{\partial R_2}\dfrac{dR_2}{dT} \\\\
Calculate the terms in the above expression
\dfrac{\partial R}{\partial R_1} = \dfrac{R_2^2}{(R_1+R_2)^2} \\\\
\dfrac{dR_1}{dT} = R_{10} \alpha \\\\
\dfrac{\partial R}{\partial R_2} = \dfrac{R_1^2}{(R_1+R_2)^2} \\\\
\dfrac{dR_2}{dT} = R_{20} \beta \\\\
We now substitute the terms in dR/dT
\dfrac{dR}{dT} = \dfrac{R_2^2}{(R_1+R_2)^2}R_{10} \alpha + \dfrac{R_1^2}{(R_1+R_2)^2}R_{20} \beta \\\\\\
= \dfrac{R_2^2 R_{10} \alpha + R_1^2 R_{20} \beta}{{(R_1+R_2)^2}}
Partial Derivatives |