In multivariable calculus a partial derivative tells how a function changes when one variable varies while all other variables are held constant. When the function is composed of several nested functions, the ordinary rules for differentiation no longer apply directly. The chain rule bridges that gap, allowing us to differentiate composite functions with respect to each independent variable.
Given a function f(x, y, z), the partial derivative with respect to x is denoted f/x and is defined as
f/x = lim_{h0} [f(x+h, y, z) f(x, y, z)] / h All other variables (y, z) are treated as constants during this limit process. Similarly we define f/y and f/z.
For a singlevariable composite function g(t) = f(u(t)), the derivative is
dg/dt = f'(u(t)) u'(t)
This principle generalises to many variables, but we must keep track of which variable is changing and which intermediate variables depend on it.
Suppose f is a function of m intermediate variables u, u, , u, each of which in turn depends on the independent variables x, x, , x:
f = f(u(x,,x), u(x,,x), , u(x,,x))
The partial derivative of f with respect to an independent variable x is obtained by summing over every intermediate variable:
f/x = _{i=1}^{m} (f/u_i)(u_i/x) This is the same as matrix multiplication _x f = (J_u)^T _u f, where J_u is the Jacobian of the intermediate variables.
f in terms of the intermediate variables u_i.f/u_i for each intermediate variable.u_i/x.(f/u_i)(u_i/x) for each i and add them together.Problem: Let f(x,y) = sin( xy ). Compute f/x and f/y.
Solution:
Define the inner function u = xy. Then f = sin(u). Apply the chain rule:
f/x = cos(u)u/x,f/y = cos(u)u/y.
Now compute the inner derivatives:
u/x = 2xy,u/y = x.
Substitute back:
f/x = cos(xy)2xy,f/y = cos(xy)x.
Both partial derivatives share the factor cos(xy), illustrating the typical structure when a single inner function is involved.
When more than one inner function appears, each contributes its own term. Consider
f(x,y) = e^{x y}ln(x+ y) Here we have two inner functions:
u = x y (used in the exponential)u = x + y (used in the logarithm)Write f = e^{u}ln(u). Then
f/x = (/x)[e^{u}]ln(u) + e^{u}(/x)[ln(u)] Compute each piece:
e^{u}/x = e^{u}u/x = e^{x y}y,ln(u)/x = (1/u)u/x = 1/(x + y). Thus
f/x = e^{x y}yln(x + y) + e^{x y}[1/(x + y)] = e^{x y}[ yln(x + y) + 1/(x + y) ] Similarly for f/y:
u/y = x,u/y = 2yf/y = e^{x y}xln(x + y) + e^{x y}[2y/(x + y)] = e^{x y}[ xln(x + y) + 2y/(x + y) ] Notice each inner derivative appears exactly once per term, multiplied by the derivative of the outer factor that depends on it.
Often we encounter a vector function r(u,v) = g(u,v), g(u,v), g(u,v). To compute the Jacobian of r with respect to (x,y) when u = u(x,y) and v = v(x,y), apply the chain rule componentwise:
r/x = g/uu/x + g/vv/x, g/uu/x + g/vv/x, g/uu/x + g/vv/x
The same pattern holds for r/y. This formulation is heavily used in physics (e.g., coordinate transformations) and in computer graphics.
u_i/x, only the variable x varies.x must contribute a product term. Overlooking a hidden dependence leads to an incomplete derivative.f/x (partial) rather than df/dx (total) when more than one independent variable is present.u_i/x terms are needed.x to f.cos, sin, e^, 1/u) and multiply them by the inner derivatives.The multivariable chain rule extends the familiar onedimensional rule to functions of several variables. Its core idea is simple: the rate of change of an outer function with respect to an independent variable is the sum of the rates of change of each inner variable multiplied by the rate at which that inner variable changes with respect to the independent variable.
Remember:
Mastering this technique unlocks the ability to differentiate complex models in physics, engineering, economics, and machine learning, where composite functions appear everywhere.
