Partial Derivatives (Multivariable Calculus)
Learn partial derivatives, total derivatives, gradients, and Jacobians (change of variables) with worked examples for physics.
Continue where you stopped
The core idea
On this page
In physics, most quantities depend on more than one variable: V(x,y,z), T(x,y,z,t), ρ(r,θ,φ), and so on. Multivariable calculus is the toolset that lets you differentiate and integrate these functions correctly.
Multivariable calculus shows up constantly in UY1 physics:
- Fields and potentials: UY1: Potential Gradient uses vector E = -∇ V
- Integral theorems (Gauss/Stokes) use partial derivatives inside integrals: Vector Calculus (Integral Theorems)
- Thermodynamics uses differentials and “held-constant” partial derivatives: UY1: Definition of first law of thermodynamics
- Variational mechanics: Euler–Lagrange equation
1) Partial derivatives (hold the other variables constant)
If f = f(x,y), the partial derivative with respect to x is:
Interpretation: you are looking at how f changes with x while keeping y fixed.
Notation you’ll actually see in physics
You’ll often see subscripts to make “what is held constant” explicit:
means “differentiate with respect to x, holding y constant”.
Thermodynamics is full of this style:
((∂ P)/(∂ T))_V and ((∂ P)/(∂ T))_S are different physical processes. Always write the “held constant” variable when it matters.
Worked example
Let
Then
Under mild conditions (continuous second partial derivatives),
This is often used implicitly in physics derivations.
Worked example (a physics-style partial derivative)
Ideal gas written as a function P = P(V,T):
Then:
- Sign: at fixed T, increasing V decreases P (so the derivative is negative).
- Units: ((∂ P)/(∂ T))_V has units Pa/K, and nR/V does too.
2) Total derivative (chain rule in multivariable form)
If f = f(x,y) but x = x(t) and y = y(t), then f is indirectly a function of t. The chain rule becomes:
Worked example
Let f(x,y) = x²y, with x = t² and y = e^t. Then:
So
Substitute x = t² and y = e^t:
A key physics variant: total derivative of a field along a moving particle
If T = T(x,y,z,t) is a temperature field, and a particle moves with position vector r(t), then the temperature experienced by the particle is T(vector r(t),t) and:
In vector form:
Worked example (chain rule along a path)
Let
and a particle follows x = t and y = 2t.
Compute partial derivatives:
With dx/dt = 1 and dy/dt = 2:
Substitute x = t, y = 2t:
3) Gradient (how a scalar field changes in space)
For a scalar field f(x,y,z), the gradient is:
This appears directly in electromagnetism and potential theory, for example:
This is exactly what the UY1 “potential gradient” pages mean when they say the field points in the direction of decreasing potential: UY1: Potential Gradient.
If you want the “directional rate of change” of f along a unit vector u hat, use the directional derivative:
Worked example (gradient + directional derivative)
Let a temperature field be:
Compute the gradient:
At the point (1,1):
Now take the unit direction u hat = (1/(square root of 2))(1,1). The directional derivative is:
Interpretation: near (1,1), T increases fastest in the direction of vector ∇T, and along u hat it increases at a rate 3 square root of 2 per unit distance.
If f = f(x,y), small changes satisfy:
This is how you “propagate” small changes when multiple variables vary at once.
4) Jacobians (change of variables in integrals)
When you change coordinates, the area/volume element usually picks up a factor called a Jacobian.
In 2D, if you change variables from (u,v) to (x,y), the Jacobian determinant is:
Then:
Example: polar coordinates in 2D,
give the area element:
Common 3D volume elements (you’ll use these a lot)
- Cylindrical (r,θ,z):
dV = r dr dθ dz
- Spherical (r,θ,φ):
dV = r² sin θ dr dθ dφ
Forgetting the r (cylindrical) or the r² sin θ (spherical) is one of the most common integration errors in E&M and gravitation. A fast check is to integrate 1 over the region and see if you recover the known area/volume.
Worked example (polar integral over a disk)
Compute
In polar, x² + y² = r² and dA = r dr dθ, so:
Worked example (Jacobian sanity check via area)
Compute the area of a disk x² + y² ≤ a² in polar coordinates:
If you forget the Jacobian factor r, you do not get the right area.
Related pages
Vector Analysis
∇ operator ideas (grad/div/curl) and identities.
Vector calculus (integral theorems)
Line/surface/volume integrals, Gauss’ theorem, Stokes’ theorem.
Euler–Lagrange equation
Uses partial derivatives heavily in variational calculus.