In many physical problems, we encounter functions that depend on more than one variable, e.g.,
\begin{equation}
f = f(x,y,z,\dots).
\end{equation}
The partial derivative of \(f\) with respect to \(x\) means differentiating \(f\) with respect to \(x\) while treating all the other variables as constants. We denote this as
\begin{equation}
\frac{\partial ^2 f}{\partial x \partial y} = \frac{\partial ^2 f}{\partial y \partial x},
\end{equation}
(as long as \(f\) is sufficiently smooth — Clairaut's Theorem).
Remark
For sufficiently smooth functions, the mixed derivatives are equal:
\begin{equation}
\frac{\partial ^2 f}{\partial x \partial y} = \frac{\partial ^2 f}{\partial y \partial x}.
\end{equation}
This is known as Clairaut’s theorem.
Example - Change of Variables and Partial Derivatives
Let
\begin{equation}
z = x^2 - y^2,
\qquad
x = r\cos\theta,\quad y = r\sin\theta.
\end{equation}
Then, using \(x^2 + y^2 = r^2\), we can rewrite \(z\) in different but equivalent forms and compute \(\frac{\partial z}{\partial r}\) while holding different variables constant.
1) Expressing \(z\) in terms of \(r\) and \(\theta\):
\begin{equation}
z = r^2\cos^2\theta - r^2\sin^2\theta
= r^2 \cos(2\theta).
\end{equation}
Partial derivatives play a central role in thermodynamics because most physical quantities depend on more than one variable. For example, temperature \(T\), pressure \(p\), volume \(V\), and entropy \(S\) are related through equations of state and energy relations. To describe how one variable changes while others are held constant, we use partial derivatives with explicit subscripts.
For example, the temperature can be expressed as a function of pressure and volume,
\(\displaystyle \left(\frac{\partial T}{\partial p}\right)_V\): how the temperature changes with pressure at constant volume. Physically this is a gas in a sealed rigid container: the volume cannot change, so heating the gas raises both its temperature and its pressure together. For an ideal gas \(pV = Nk_BT\) gives \(\left(\frac{\partial T}{\partial p}\right)_V = V/Nk_B\) directly.
\(\displaystyle \left(\frac{\partial T}{\partial p}\right)_U\): how the temperature changes with pressure at constant internal energy. This is the derivative relevant to the Joule free expansion, in which a gas expands into a vacuum inside rigid insulated walls: no heat enters and no work is done, so \(U\) is unchanged. For an ideal gas \(U\) depends on \(T\) alone, so this derivative vanishes and the temperature does not change — a result that fails for a real gas, where it measures the intermolecular forces.
Remark
Constant \(U\) is not the same as adiabatic. Adiabatic means no heat crosses the boundary, \(\delta Q = 0\); for a reversible process that is constant entropy, \(S\). A gas compressed adiabatically does have work done on it, so its internal energy rises. The free expansion above happens to be both adiabatic and at constant \(U\) only because no work is done either.
Remark
The subscript indicates which variables are kept constant during differentiation. For example:
\begin{equation}
\left(\frac{\partial T}{\partial p}\right)_V \quad \text{means ``change in $T$ with respect to $p$ while keeping $V$ fixed.''}
\end{equation}
This removes ambiguity and prevents misinterpretation of derivatives.
Example - Physics: the thermodynamic cyclic relation
A gas has an equation of state relating \(p\), \(V\) and \(T\), such as \(pV = Nk_BT\), so that any one of the three is determined by the other two. Show that
The result is surprising at first sight: one might expect the three factors to cancel to \(+1\), as they would if the symbols were ordinary fractions. They do not, and the minus sign is the point.
Regard \(T\) as a function of \(p\) and \(V\) and write its total differential:
Substitute this into the left-hand side of \(\eqref{eq:cyclic_relation}\). The middle factor may be inverted, because \(\left(\frac{\partial V}{\partial T}\right)_p\) and \(\left(\frac{\partial T}{\partial V}\right)_p\) hold the same variable \(p\) fixed and so are genuine reciprocals:
whose product is \(-\dfrac{Nk_BT}{V\,p} = -1\), since \(pV = Nk_BT\).
The minus sign has a physical reading. Raise the pressure at fixed volume and the temperature rises; raise the temperature at fixed pressure and the volume rises; so increasing the volume at fixed temperature must lower the pressure. Two increases and one decrease give the negative sign. This relation is used constantly in thermodynamics to trade an unmeasurable derivative for two measurable ones.
4.3Power Series in Two Variables
Just as a function of a single variable can be expressed as a power series expansion, functions of two variables can also be expanded into a series about a point \((a,b)\).
This is the multivariable Taylor series expansion. The operator in brackets is raised to the \(n\)th power before acting on \(f\), so at order \(n\) it produces every mixed derivative of total order \(n\), each weighted by a binomial coefficient. Writing out \(n=2\) gives the familiar three terms in \(x^2\), \(xy\) and \(y^2\) used below.
Taylor Expansion Approach
Instead of multiplying series, we can also compute the expansion of
This matches the result obtained earlier by multiplying the single-variable series, including the \(xy^2\) term. That term is easy to lose: it comes from the mixed derivative \(\frac{\partial ^3 f}{\partial X \partial Y^2}\), not from differentiating three times in \(x\). When using the multivariable Taylor series, every mixed derivative of the given total order must be included, each with its binomial coefficient.
4.4Total Differentials
Review: One Variable
Figure 4.1. Illustration of the differential: for a small change \(dx\), the corresponding change in \(y\) is approximated by \(dy = y' dx\).
The total differential expresses the approximate change in \(f\) resulting from small changes in its independent variables.
4.5Chain Rule: Differentiating a Function of a Function
The chain rule extends naturally to functions of functions. If a variable depends on another, which in turn depends on a third, we can differentiate by following the chain of dependencies.
Theorem - Chain Rule for Composite Functions
If \(y = y(u)\) and \(u = u(x)\), then the derivative of \(y\) with respect to \(x\) is
Now differentiate implicitly with respect to \(x\), remembering that \(y\) is a function of \(x\), so \(y^3\) and \(xy\) need the chain and product rules:
which is the desired matrix chain rule. Check the shapes: a \(1\times3\) row times a \(3\times2\) matrix gives a \(1\times2\) row, one entry for each of \(s\) and \(t\). The middle matrix is the Jacobian of the change of variables, and the chain rule is just matrix multiplication by it.
Example
Let
\begin{equation}
z = xy,
\qquad x = \sin(s+t),
\qquad y = s - t.
\end{equation}
We want to compute \(\frac{\partial z}{\partial s}\) and \(\frac{\partial z}{\partial t}\).
\begin{equation}
dy
=\frac{
\begin{vmatrix}
x & t\,dt \\[4pt]
\sin t & -x\cos t\,dt
\end{vmatrix}
}{
\begin{vmatrix}
x & y \\[4pt]
\sin t & -(y+1)e^y
\end{vmatrix}
}
=\frac{-x^{2}\cos t - t\sin t}{-x(y+1)e^y - y\sin t}\,dt.
\end{equation}
For the same three equations as the previous example, namely \(z = x^2+xy\) with \(x^2+y^3 = st+5\) and \(x^3-y^2 = s^2+t^2\), find \(\left(\frac{\partial s}{\partial z}\right)_{x}\).
Solution.
Step 1. Set \(dx = 0\)
The subscript \(x\) says that \(x\) is the variable held fixed, so \(dx = 0\) throughout and the differentials of the previous example simplify at once.
4.8Chain Rule in Polar and Rectangular Coordinates
Let \(x,y\) be rectangular coordinates and \(r,\theta\) be polar coordinates in a plane. The relations are
\begin{equation}
x = r\cos\theta, \qquad y = r\sin\theta,
\end{equation}
or equivalently
\begin{equation}
r = \sqrt{x^2+y^2}, \qquad \theta = \tan^{-1}\!\left(\frac{y}{x}\right).
\end{equation}
We want to study derivatives such as \(\frac{\partial \theta}{\partial x}\), \(\frac{\partial x}{\partial \theta}\), etc., and check whether they are reciprocals.
These derivatives are not reciprocals. The reason: \(\big(\frac{\partial \theta}{\partial x}\big)_y\) means \(y\) is held constant, whereas \(\big(\frac{\partial x}{\partial \theta}\big)_r\) means \(r\) is held constant. Since the conditions differ, they are not reciprocals.
\(\frac{\partial u}{\partial v}\) and \(\frac{\partial v}{\partial u}\) are not usually reciprocals. They are reciprocals only if the set of independent variables (besides \(u,v\)) are the same in both cases.
Notice: although individual pairs like \(\frac{\partial \theta}{\partial x}\) and \(\frac{\partial x}{\partial \theta}\) are not reciprocals, the Jacobian matrices \(
\begin{pmatrix}
\cos\theta & -r\sin\theta \\[6pt]
\sin\theta & r\cos\theta
\end{pmatrix}
\) and \(\begin{pmatrix}
\cos\theta & \sin\theta \\[6pt]
-\tfrac{1}{r}\sin\theta & \tfrac{1}{r}\cos\theta
\end{pmatrix}\) are inverses of each other.
4.9Change of Variables: Laplace Equation in Polar Coordinates
Adding the two results, every term containing \(\sin\theta\cos\theta\) cancels between them, and the surviving \(\sin^2\theta + \cos^2\theta\) factors reduce to \(1\):
The first two terms are often written more compactly by recognising a product rule, which gives the form of Laplace's equation used throughout Chapter 10:
Note the extra \(\frac{1}{r}\frac{\partial f}{\partial r}\) term, which has no counterpart in Cartesian coordinates. It is not an algebraic accident: it is what accounts for the fact that circles of larger radius have more room, and it is the reason solutions in polar coordinates involve \(\ln r\) and powers \(r^{n}\) rather than the linear functions of the Cartesian case.
Remark
This change of variables illustrates how PDEs can be transformed into more convenient coordinate systems. In particular, Laplace’s equation in polar form is crucial in problems with radial or angular symmetry.
Leibniz’s rule generalizes the Fundamental Theorem of Calculus by handling integrals with variable limits and integrands depending on the parameter \(x\).
4.11Where Partial Differentiation Is Used
The thermodynamic examples earlier in this chapter are the most immediate application, but the techniques developed here recur throughout the rest of these notes. It is worth seeing the pattern now.
Which variables are held fixed matters. This is the single most important idea in the chapter, and the one most often skipped. The three derivatives \(\left(\frac{\partial z}{\partial r}\right)_\theta\), \(\left(\frac{\partial z}{\partial r}\right)_x\) and \(\left(\frac{\partial z}{\partial r}\right)_y\) computed at the start are genuinely different numbers. Thermodynamics is where students first meet this, and where forgetting it does the most damage.
Changing coordinates. Rewriting the Laplacian in polar coordinates, as in \(\eqref{eq:laplacian_polar}\), is what makes problems with circular symmetry tractable. The same calculation in spherical coordinates underlies the hydrogen atom (Chapters 12–13).
Small changes and error propagation. The total differential \(df = \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy\) is how uncertainty in measured quantities propagates into a computed result.
Partial differential equations. Laplace's, the diffusion and the wave equations are all relations among partial derivatives; Chapter 10 is devoted to solving them.
Differentiating under the integral sign. Leibniz's rule turns some otherwise intractable integrals into differential equations, and is the basis of several techniques in Chapters 5 and 7.
Remark
Notice how much of the chapter reduces to one habit: write the total differential, then impose whatever is being held constant. The chain rule, implicit differentiation, the reciprocal relations and the cyclic relation \(\eqref{eq:cyclic_relation}\) were all obtained that way. If a problem asks how one quantity changes when another is varied under some constraint, start by writing \(df\) and setting the constrained differential to zero.
Summary Table
Idea
Formula
Notes
Partial derivative
\(\frac{\partial f}{\partial x}\)
Differentiate in \(x\), all other variables held fixed.
This chapter is the multivariable calculus a physics course actually uses, compressed. If any of it went past too quickly, the sources below cover the same ground at a gentler pace. Everything listed is free.
Videos
Derivatives are much easier to grasp from a picture than from a limit. 3Blue1Brown's Essence of Calculus explains what each rule of this chapter actually does — the chain and product rules, higher derivatives, and implicit differentiation seen geometrically:
Video
Visualizing the chain rule and product rule — 3Blue1Brown
Paul's Online Math Notes.Partial Derivatives and Chain Rule — the quickest source of extra practice once you know which technique you need. The chain-rule page is particularly good on tree diagrams for keeping track of which variable depends on which.
Remark
One thing you will not find in the calculus sources: the notation \(\left(\frac{\partial T}{\partial p}\right)_V\) with an explicit subscript. Mathematics courses usually fix the independent variables once and never revisit the choice, so the ambiguity never arises. In thermodynamics it arises constantly, which is why this chapter labours the point. For that side of the subject a thermodynamics text will serve you better than a calculus one.