Chain rule partial derivatives multiple variables is a fundamental tool in multivariable calculus that allows us to differentiate composite functions where each variable depends on several others. Whether you are studying physics, engineering, economics, or machine learning, mastering this rule enables you to track how changes in input variables propagate through complex systems. In this article we will break down the concept step by step, provide clear formulas, work through illustrative examples, and highlight common pitfalls so you can apply the chain rule with confidence.
Introduction to the Chain Rule in Multivariable Calculus
In single‑variable calculus the chain rule states that if (y = f(u)) and (u = g(x)), then (\frac{dy}{dx} = f'(g(x)) \cdot g'(x)). When we move to functions of several variables, the idea stays the same: we need to account for how each inner variable changes with respect to the outer variable. The multivariable chain rule therefore involves partial derivatives and often appears in the form of a Jacobian matrix or a gradient dot product That's the part that actually makes a difference..
From Single to Multiple Variables: Why the Extension Matters
Consider a temperature field (T(x, y, z)) that varies in space, and suppose a particle moves along a path described by (x = x(t), y = y(t), z = z(t)). The temperature experienced by the particle as a function of time is (T(t) = T(x(t), y(t), z(t))). To find (\frac{dT}{dt}) we must know how (T) changes with each spatial coordinate and how each coordinate changes with time. This scenario exemplifies why the chain rule for partial derivatives is indispensable in real‑world modeling.
The Multivariable Chain Rule Formula
Let (\mathbf{u} = (u_1, u_2, \dots, u_m)) be intermediate variables that each depend on (n) independent variables (\mathbf{v} = (v_1, v_2, \dots, v_n)). Suppose a scalar function (f) depends on (\mathbf{u}): (z = f(u_1, u_2, \dots, u_m)). Then the partial derivative of (z) with respect to any (v_j) is
You'll probably want to bookmark this section.
[ \frac{\partial z}{\partial v_j} = \sum_{i=1}^{m} \frac{\partial f}{\partial u_i}, \frac{\partial u_i}{\partial v_j}. ]
In vector‑matrix notation this reads
[ \nabla_{\mathbf{v}} z = J_{\mathbf{u}\leftarrow\mathbf{v}} ; \nabla_{\mathbf{u}} f, ]
where (J_{\mathbf{u}\leftarrow\mathbf{v}}) is the Jacobian matrix whose ((i,j)) entry is (\frac{\partial u_i}{\partial v_j}), and (\nabla_{\mathbf{u}} f) is the gradient of (f) with respect to its arguments Which is the point..
If (f) itself is vector‑valued, say (\mathbf{F} : \mathbb{R}^m \to \mathbb{R}^p), the chain rule becomes
[ \frac{\partial \mathbf{F}}{\partial v_j} = \sum_{i=1}^{m} \frac{\partial \mathbf{F}}{\partial u_i}, \frac{\partial u_i}{\partial v_j}, ]
or compactly (\displaystyle D_{\mathbf{v}}\mathbf{F} = D_{\mathbf{u}}\mathbf{F}; J_{\mathbf{u}\leftarrow\mathbf{v}}) Took long enough..
Step‑by‑Step Procedure
- Identify the outer function (f) and the inner functions (u_i(\mathbf{v})).
- Compute the partial derivatives (\partial f/\partial u_i) (treat each (u_i) as an independent variable).
- Compute the partial derivatives (\partial u_i/\partial v_j) for every inner variable with respect to each outer variable.
- Multiply and sum according to the formula above for each (v_j).
- Simplify the resulting expression, if possible.
Worked Examples
Example 1: Two‑step composition
Let (z = f(x, y) = x^2 + \sin(y)) where (x = t^2) and (y = e^{t}). Find (\frac{dz}{dt}).
- Outer partials: (\displaystyle \frac{\partial f}{\partial x}=2x,\quad \frac{\partial f}{\partial y}= \cos(y)).
- Inner derivatives: (\displaystyle \frac{dx}{dt}=2t,\quad \frac{dy}{dt}=e^{t}).
- Apply the chain rule:
[ \frac{dz}{dt}= \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt} = (2x)(2t) + (\cos(y))(e^{t}). ]
- Substitute (x=t^2) and (y=e^{t}):
[ \frac{dz}{dt}= (2t^{2})(2t) + \cos(e^{t}),e^{t} = 4t^{3} + e^{t}\cos(e^{t}). ]
Example 2: Three intermediate variables
Suppose (w = f(u, v, s) = u v s) with
[ u = x + y,\quad v = x - y,\quad s = xy. ]
Find (\displaystyle \frac{\partial w}{\partial x}) and (\displaystyle \frac{\partial w}{\partial y}).
First compute outer partials:
[ \frac{\partial f}{\partial u}= v s,\quad \frac{\partial f}{\partial v}= u s,\quad \frac{\partial f}{\partial s}= u v. ]
Next inner derivatives:
[ \frac{\partial u}{\partial x}=1,; \frac{\partial u}{\partial y}=1,\ \frac{\partial v}{\partial x}=1,; \frac{\partial v}{\partial y}=-1,\ \frac{\partial s}{\partial x}=y,; \frac{\partial s}{\partial y}=x. ]
Now apply the sum:
[ \frac{\partial w}{\partial x}= (v s)(1) + (u s)(1) + (u v)(y) = v s + u s + u v y. ]
Replace (u, v, s):
[ u = x+y,; v = x-y,; s = xy, ]
[ \frac{\partial w}{\partial x}= (x-y)(xy) + (x+y)(xy) + (x+y)(x-y) y = xy(x-y + x+y) + y(x^{2}-y^{2}) = 2x^{2}y + y(x^{2}-y^{2}) = 3x^{2}y - y^{3}. ]
Similarly,
[ \frac{\partial w}{\partial y}= (v s)(1) + (u s)(-1) + (u v)(x) = v s - u s + u v x = (x-y)xy - (x+y)xy + (x+y)(x-y)x = xy[(x-y)-(x+y)] + x(x^{2}-y^{2}) = xy(-2y) +