Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Mathematics refresher

Thermal physics uses a small, specific set of mathematical tools, and it uses them constantly. This page is the toolkit — not a course in calculus, but the particular corners of it that this subject leans on, with the notation this course will use for them.

It is a reference, not a narrative. Read the section the readiness map sent you to, work its examples with a pen, and come back when a later module makes you unsure.

Dimensional analysis and units

Every physical quantity carries dimensions, built from the SI base quantities. Four of the seven matter for us:

QuantityDimensionSI unit
lengthL\mathsf{L}metre, m\mathrm{m}
massM\mathsf{M}kilogram, kg\mathrm{kg}
timeT\mathsf{T}second, s\mathrm{s}
temperatureΘ\Thetakelvin, K\mathrm{K}

Everything else is a product of powers of these. Energy is ML2T−2\mathsf{M}\mathsf{L}^2\mathsf{T}^{-2} (the joule); pressure is force per area, ML−1T−2\mathsf{M}\mathsf{L}^{-1}\mathsf{T}^{-2} (the pascal).

Reading the units of an unfamiliar constant. You never need to memorise them. From PV=NkBTPV = N \kB T, with NN a pure count,

[kB]=[P][V][T]=Pa⋅m3K=JK,[\kB] = \frac{[P][V]}{[T]} = \frac{\mathrm{Pa} \cdot \mathrm{m}^3}{\mathrm{K}} = \frac{\mathrm{J}}{\mathrm{K}} ,

so kB\kB is an energy per unit temperature — which is the whole content of the statement “temperature is a measure of energy per degree of freedom”.

Checking a candidate formula. Suppose you cannot remember whether the root-mean-square speed of a gas molecule is 3kBT/m\sqrt{3\kB T/m} or 3kBT/m2\sqrt{3\kB T/m^2} or 3kBTm\sqrt{3\kB T m}. Only one of them is a speed:

[kBTm]=ML2T−2M=L2T−2,so[kBTm ]=LT−1.✓\left[\frac{\kB T}{m}\right] = \frac{\mathsf{M}\mathsf{L}^2\mathsf{T}^{-2}}{\mathsf{M}} = \mathsf{L}^2\mathsf{T}^{-2} , \qquad \text{so} \qquad \left[\sqrt{\frac{\kB T}{m}}\,\right] = \mathsf{L}\mathsf{T}^{-1} . \checkmark

The other two fail. This costs ten seconds and catches a large fraction of all algebra errors.

When two different quantities share a unit. Pressure is a force per area and energy density is an energy per volume, and they are the same thing dimensionally:

Pa=Nm2=N⋅mm3=Jm3.\mathrm{Pa} = \frac{\mathrm{N}}{\mathrm{m}^2} = \frac{\mathrm{N}\cdot\mathrm{m}}{\mathrm{m}^3} = \frac{\mathrm{J}}{\mathrm{m}^3} .

That is not a coincidence — it is the hint that pressure is going to turn out to be about energy — but it is also not an identity. A monatomic ideal gas has P=23uP = \tfrac{2}{3}u and isotropic radiation has P=13uP = \tfrac{1}{3}u, where uu is the energy density. Sharing a dimension tells you two quantities can be related; it never tells you by what factor. (This is prediction 4 on the orientation page; the physics behind the factors arrives in modules 4 and 16.)

Comparing numbers honestly. Two quantities agree when their fractional difference is small:

∣a−b∣/∣b∣≪1.|a - b| / |b| \ll 1 .

Absolute differences mean nothing without a scale to compare them to: the energies in this course are routinely around 10−18 J10^{-18}\,\mathrm{J}, so a test asking whether two of them differ by less than 10−12 J10^{-12}\,\mathrm{J} will answer “no difference” whatever the physics did.

Partial derivatives, and saying what is held fixed

For a function of several variables, the partial derivative with respect to one of them is the ordinary derivative taken with the others held constant. For f(x,y)=x2yf(x,y) = x^2 y:

(∂f∂x)y=2xy,(∂f∂y)x=x2.\left(\frac{\partial f}{\partial x}\right)_{y} = 2xy , \qquad \left(\frac{\partial f}{\partial y}\right)_{x} = x^2 .

The subscript is not decoration. In ordinary calculus the notation ∂f/∂x\partial f/\partial x is unambiguous because the list of variables is fixed by how ff was written. In thermodynamics it is not: PP, VV, TT and NN are tied together by an equation of state, so any of them can be eliminated in favour of the others, and “the derivative with respect to TT” means different things depending on what you chose to hold.

Mixed partials commute. For any function with continuous second derivatives,

∂∂y(∂f∂x)=∂∂x(∂f∂y).\frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right) = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right) .

For f=x2yf = x^2y both routes give 2x2x. This innocuous fact turns into a machine for generating thermodynamic identities — the Maxwell relations of module 10 are nothing more than this statement applied to the thermodynamic potentials — and it is also the exactness criterion below.

The total differential

The total differential of f(x,y)f(x,y) collects both first-order responses:

df=(∂f∂x)ydx+(∂f∂y)xdy.\mathrm{d}f = \left(\frac{\partial f}{\partial x}\right)_{y} \mathrm{d}x + \left(\frac{\partial f}{\partial y}\right)_{x} \mathrm{d}y .

For f=x2yf = x^2 y this reads df=2xy dx+x2 dy\mathrm{d}f = 2xy\,\mathrm{d}x + x^2\,\mathrm{d}y. Read practically: it says how much ff changes when you nudge xx and yy by small amounts, to first order in the nudges.

Along a path, the partial and the total derivative differ. Suppose we move along the line y=xy = x. Substituting first gives f=x3f = x^3, hence df/dx=3x2\mathrm{d}f/\mathrm{d}x = 3x^2, which is 3 at x=1x=1. But (∂f/∂x)y(\partial f/\partial x)_y at (1,1)(1,1) is 2xy=22xy = 2. The two numbers are different and both are correct — they answer different questions. Dividing the total differential by dx\mathrm{d}x shows exactly where the gap comes from:

dfdx∣y=x=(∂f∂x)y+(∂f∂y)xdydx=2xy+x2⋅1=3x2.\frac{\mathrm{d}f}{\mathrm{d}x}\bigg|_{y=x} = \left(\frac{\partial f}{\partial x}\right)_{y} + \left(\frac{\partial f}{\partial y}\right)_{x} \frac{\mathrm{d}y}{\mathrm{d}x} = 2xy + x^2 \cdot 1 = 3x^2 .

The partial derivative ignores the fact that yy is changing too. The total derivative does not. If prediction 5 on the module page caught you, this is the identity that resolves it.

Line integrals of a differential form

An expression ω=M(x,y) dx+N(x,y) dy\omega = M(x,y)\,\mathrm{d}x + N(x,y)\,\mathrm{d}y is called a differential form. It is not a number; it becomes one only once you supply a path CC to integrate along:

∫Cω=∫C(M dx+N dy).\int_C \omega = \int_C \big( M\,\mathrm{d}x + N\,\mathrm{d}y \big) .

To evaluate it, parametrise the path as (x(t),y(t))\big(x(t), y(t)\big) for tt from t0t_0 to t1t_1 and substitute:

∫Cω=∫t0t1[M(x(t),y(t))dxdt+N(x(t),y(t))dydt]dt.\int_C \omega = \int_{t_0}^{t_1} \left[ M\big(x(t),y(t)\big) \frac{\mathrm{d}x}{\mathrm{d}t} + N\big(x(t),y(t)\big) \frac{\mathrm{d}y}{\mathrm{d}t} \right] \mathrm{d}t .

Worked example. Take ω=y dx\omega = y\,\mathrm{d}x and go from (0,0)(0,0) to (1,1)(1,1) three ways.

Same start, same finish, three different answers: 0, 12\tfrac{1}{2}, 1. The integral of a differential form is in general a property of the route, not of the endpoints.

Exact and inexact forms

Sometimes a form is the total differential of some function, and then the route stops mattering.

Apply the test to the two forms we have been using:

This distinction is the reason this page exists. In module 5 the plane becomes the PP–VV plane, and one of the forms you will integrate is exact while another is not. The exact one integrates to a change in internal energy, which depends only on the endpoints; the inexact one integrates to heat or to work, which depend on the route. Nothing physical is needed to see the difference — it is already here, in y dxy\,\mathrm{d}x.

Quick self-test

If you can do these without notes, this page has nothing further for you.

  1. Give the SI units of kB\kB, and of kBT/m\kB T / m.

  2. For f(x,y)=x/yf(x,y) = x/y, write (∂f/∂x)y(\partial f/\partial x)_y, (∂f/∂y)x(\partial f/\partial y)_x and df\mathrm{d}f.

  3. Is x dx+y dyx\,\mathrm{d}x + y\,\mathrm{d}y exact? If so, give its potential.

  4. Is x dy−y dxx\,\mathrm{d}y - y\,\mathrm{d}x exact? Integrate it from (1,0)(1,0) to (0,1)(0,1) along the straight line, and then along the unit circle, and compare.

  5. A formula gives an answer of 2.7×10−21 J2.7 \times 10^{-21}\,\mathrm{J} where the expected value is 2.6×10−21 J2.6 \times 10^{-21}\,\mathrm{J}. Do they agree?