Chapter 4
Partial Differentiation
4.1Introduction
In many physical problems, we encounter functions that depend on more than one variable, e.g.,
The partial derivative of with respect to means differentiating with respect to while treating all the other variables as constants. We denote this as
Let be a function of several variables. The partial derivative of with respect to the variable is defined by
All other variables are held constant during the differentiation.
Notation
There are multiple notations for partial derivatives. For first-order:
For higher-order derivatives:
Let
First-order partial derivatives:
Second-order partial derivatives:
Conclusion: Mixed partials agree:
(as long as is sufficiently smooth — Clairaut's Theorem).
For sufficiently smooth functions, the mixed derivatives are equal:
This is known as Clairaut’s theorem.
Let
Then, using , we can rewrite in different but equivalent forms and compute while holding different variables constant.
1) Expressing in terms of and :
Holding constant:
2) Expressing in terms of and :
Holding constant:
3) Expressing in terms of and :
Holding constant:
Important: Each derivative is different because a different quantity is held fixed. Thus, we write:
to remove ambiguity in multivariable calculus.
4.2Applications in Thermodynamics
Partial derivatives play a central role in thermodynamics because most physical quantities depend on more than one variable. For example, temperature , pressure , volume , and entropy 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,
or as a function of pressure and internal energy,
In these cases, we encounter derivatives such as
: 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 gives directly.
: 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 is unchanged. For an ideal gas depends on 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.
Constant is not the same as adiabatic. Adiabatic means no heat crosses the boundary, ; for a reversible process that is constant entropy, . 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 only because no work is done either.
The subscript indicates which variables are kept constant during differentiation. For example:
This removes ambiguity and prevents misinterpretation of derivatives.
A gas has an equation of state relating , and , such as , so that any one of the three is determined by the other two. Show that
Solution.
The result is surprising at first sight: one might expect the three factors to cancel to , as they would if the symbols were ordinary fractions. They do not, and the minus sign is the point.
Regard as a function of and and write its total differential:
Now specialise to a process at constant temperature, so :
Dividing by at fixed and solving for the ratio gives
Substitute this into the left-hand side of (4.24). The middle factor may be inverted, because and hold the same variable fixed and so are genuine reciprocals:
As a check, use the ideal gas law directly:
whose product is , since .
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 .
Use the power series
Multiply the expansions:
Collecting lowest-order terms:
Thus, the (truncated) power-series expansion is:
Start with the known expansion (for ):
Let :
Expand:
Simplify:
General Expansion
In general, a sufficiently smooth function can be expanded in a power series about a point as
This is the multivariable Taylor series expansion. The operator in brackets is raised to the th power before acting on , so at order it produces every mixed derivative of total order , each weighted by a binomial coefficient. Writing out gives the familiar three terms in , and used below.
Taylor Expansion Approach
Instead of multiplying series, we can also compute the expansion of
directly using the two-variable Taylor series about :
Step 1. Zeroth order
Step 2. First order
So the linear contribution is .
Step 3. Second order
At , all second derivatives vanish, so there is no quadratic contribution.
Step 4. Third order
At third order the bracket in (4.38) produces four terms, not one:
Evaluating each at the origin, where vanishes and equals one:
So the third-order contribution is
Result
Collecting terms:
This matches the result obtained earlier by multiplying the single-variable series, including the term. That term is easy to lose: it comes from the mixed derivative , not from differentiating three times in . 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

If , then
By definition,
Hence, for small ,
Two Variables
If , then the total differential is
General Case
For a function of many variables,
the total differential is
The total differential expresses the approximate change in 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.
If and , then the derivative of with respect to is
More generally, if
then
For functions depending on multiple variables,
where the sum includes a term for each independent variable.
Let
Find .
Solution.
Compute the derivatives step by step:
Thus,
Since ,
Let
Find .
Solution.
Since
we get
Now compute the derivatives:
Therefore,
The chain rule allows us to differentiate composite functions systematically, even when variables are nested or interdependent.
4.6Implicit Differentiation
Often, functions are defined implicitly rather than explicitly. For example, if and are related by
then is an implicit function of .
First Derivative
Differentiate both sides of
with respect to :
Thus,
Second Derivative
From the expression for , we differentiate again:
Apply the chain rule:
Now substitute :
Find the equation of the tangent line to the curve
at the point .
Solution.
First check that the point actually lies on the curve, since everything below depends on it:
Now differentiate implicitly with respect to , remembering that is a function of , so and need the chain and product rules:
Group the terms:
Solve for slope:
At the point :
The tangent line with slope at :
Simplifying:
Implicit differentiation allows us to compute derivatives (and tangent lines) for curves not expressed explicitly as .
4.7More on Chain Rule
Suppose
Then the chain rule gives
Write the total differential of :
Since , their differentials are
Substitute into and collect coefficients of and :
By the definition of partial derivatives of as a function of ,
Writing these two identities together in matrix form gives
which is the desired matrix chain rule. Check the shapes: a row times a matrix gives a row, one entry for each of and . The middle matrix is the Jacobian of the change of variables, and the chain rule is just matrix multiplication by it.
Let
We want to compute and .
Solution.
Step 1. Apply the Chain Rule
Step 2. Compute partial derivatives of
Since ,
Step 3. Compute derivatives of and
Step 4. Substitute and simplify
For
find
Solution.
Step 1. Differentiate the constraints.
Step 2. Rearrange to a linear system for .
Step 3. Solve for (and similarly ) by determinants.
Equivalently,
A parallel computation gives
Equivalently,
Since , we have
Find and given
Solution.
Step 1. Differential of
We compute
Step 2. Differentiating the constraints
From the two constraint equations, take differentials:
These form a linear system for and in terms of .
Step 3. Solve for
We write in matrix form:
Thus
Determinant denominator
Cramer's rule results simplified
Step 4. Substitution into
with
Final partial derivatives (with positive denominator)
For the same three equations as the previous example, namely with and , find .
Solution.
Step 1. Set
The subscript says that is the variable held fixed, so throughout and the differentials of the previous example simplify at once.
These form a linear system for , , and . The system becomes:
Step 2. Solve using determinants
Writing as a determinant system, we get
Evaluating:
Thus
4.8Chain Rule in Polar and Rectangular Coordinates
Let be rectangular coordinates and be polar coordinates in a plane. The relations are
or equivalently
We want to study derivatives such as , , etc., and check whether they are reciprocals.
Step 1. Compute
From
we treat as constant and differentiate:
The last step used to clear the denominator.
Step 2. Compute
From we get
Clearly,
These derivatives are not reciprocals. The reason: means is held constant, whereas means is held constant. Since the conditions differ, they are not reciprocals.
Step 3. A reciprocal relation
Let’s compute
We use , , so with constant:
Meanwhile,
Now check:
So these are reciprocals.
and are not usually reciprocals. They are reciprocals only if the set of independent variables (besides ) are the same in both cases.
Step 4. Using differentials
From we can find
From ,
If is constant (), then
so
By inversion,
which is indeed the reciprocal.
Matrix notation
It is convenient to write
Denote this Jacobian matrix as .
Then the inverse relation is
Carrying out the inversion, we obtain
Read off partial derivatives
Thus,
Notice: although individual pairs like and are not reciprocals, the Jacobian matrices and are inverses of each other.
4.9Change of Variables: Laplace Equation in Polar Coordinates
We want to write the Laplace equation
in terms of polar coordinates , where
Step 1. First Derivatives
Way 1: Chain rule form
In matrix form,
Equivalently,
Step 2. Second Derivatives — Full Expansion
Now compute
Recall from Step 1:
We will also use the relations
and
Compute .
Write
Term :
Now
and
Thus
Term :
Compute
and
Hence
Combine:
Compute .
Similarly,
Term :
Now
and
Thus
Term :
Now
and
Thus
Combine:
Final Combination.
Adding the two results, every term containing cancels between them, and the surviving factors reduce to :
Final Result
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 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 and powers rather than the linear functions of the Cartesian case.
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.
4.10Leibniz’s Rule
Consider a function defined by an integral:
Then by the Fundamental Theorem of Calculus,
If instead we write
then
General Leibniz Rule
If
then differentiating with respect to gives
This is known as Leibniz’s Rule.
Evaluate
Solution.
Step 1. Apply Leibniz’s rule
Step 2. Simplify
Step 3. Evaluate the integral
Step 4. Collect terms
Leibniz’s rule generalizes the Fundamental Theorem of Calculus by handling integrals with variable limits and integrands depending on the parameter .
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 , and 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 (4.180), 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 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.
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 (4.24) were all obtained that way. If a problem asks how one quantity changes when another is varied under some constraint, start by writing and setting the constrained differential to zero.
Summary Table
| Idea | Formula | Notes |
| Partial derivative | Differentiate in , all other variables held fixed. | |
| Held-constant notation | The subscript says what is fixed; without it the symbol is ambiguous. | |
| Mixed partials | Equal for sufficiently smooth (Clairaut). | |
| Total differential | The workhorse of the chapter. | |
| Chain rule | One term per intermediate variable. | |
| Matrix chain rule | row vector Jacobian | Shapes: times . |
| Implicit differentiation | Differentiate the whole relation, then solve | For curves not given as . |
| Reciprocal rule | Only when the same variable is held fixed. | |
| Cyclic relation | Note the minus sign. | |
| Two-variable Taylor | Include every mixed derivative of each order. | |
| Laplacian in polar | The term has no Cartesian analogue. | |
| Leibniz's rule | Variable limits and a parameter in the integrand. |
For the Interested Reader
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:
Visualizing the chain rule and product rule — 3Blue1Brown
Watch on YouTube
Implicit differentiation, what's going on here? — 3Blue1Brown
Watch on YouTube
Higher order derivatives — 3Blue1Brown
Watch on YouTube
Two short Khan Academy clips build the specific picture of a partial derivative as the slope of a slice through a surface:
Partial derivatives, introduction — Khan Academy
Watch on YouTube
Partial derivatives and graphs — Khan Academy
Watch on YouTube
Websites
OpenStax, Calculus Volume 3, Chapter 4. 4.1 Functions of Several Variables, 4.3 Partial Derivatives and 4.5 The Chain Rule — many more worked examples than we have room for, with exercises.
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.
One thing you will not find in the calculus sources: the notation 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.