Home / Learn / Exam prep / IIT JAM Physics / Lesson 1.2
All lessons

Module 1: Mathematical methods · Lesson 1.2 · about 45 min

Partial derivatives, Jacobians and exact differentials

How to differentiate functions of several variables, the chain rule, total differentials and error estimates, exact and inexact differentials (why heat and work depend on the path), the cyclic rule, Jacobians, maxima, minima and saddles, and Lagrange multipliers.

Key points, meanings and formulas on one page: choose "Save as PDF" in the print box.

Module 1 · about 45 minutes. By the end you will be able to take partial derivatives and use the multivariable chain rule, estimate changes and experimental errors with the total differential, test whether a differential is exact and find its potential, use the reciprocal and cyclic rules that thermodynamics depends on, compute Jacobians, classify stationary points, and solve constrained problems with Lagrange multipliers.

A function of several variables has a different slope in every direction. A partial derivative is the slope when you walk along one axis while everything else stands still.

1. Partial derivatives: freeze everything else

For f(x,y), the partial derivative ∂f/∂x (also written fx) is the ordinary derivative in x with y treated as a constant:

∂f∂x=limh→0⁡f(x+h,y)−f(x,y)h

Geometrically, slice the surface z=f(x,y) with the plane y=y0: you get a curve, and fx is its slope. Slicing with x=x0 gives fy. Move the point below and watch the two slices and their tangent lines.

Each slice is an ordinary curve; its slope is a partial derivative. Where both slopes vanish (try the centre of the saddle) the point is stationary.

Mixed partials commute. If the second partial derivatives are continuous, ∂2f∂x∂y=∂2f∂y∂x (Clairaut’s or Schwarz’s theorem). This innocent fact is behind exactness, Maxwell’s relations and ∇×∇ϕ=0.

In thermodynamics the variable held constant matters, so it is written as a subscript: (∂P/∂T)V means “change T at fixed V”. For an ideal gas (∂P/∂T)V=nR/V, but (∂P/∂T)S is something else entirely.

2. The total differential and the chain rule

If x changes by dx and y by dy, the change in f is, to first order,

df=∂f∂xdx+∂f∂ydy

That is a two-variable Taylor series cut after the linear terms. Dividing by dt gives the chain rule: if x and y both depend on t, then dfdt=fxdxdt+fydydt. Every path by which t reaches f contributes one term.

Implicit differentiation. On a curve F(x,y)=0, dF=Fxdx+Fydy=0, so

dydx=−FxFy

On the circle x2+y2=25 at (3,4): dy/dx=−x/y=−3/4.

Error propagation. Take logs before differentiating a product of powers. For g=4π2L/T2:

dgg=dLL−2dTT⟹(Δgg)max⁡=ΔLL+2ΔTT

For the maximum error the sizes always add (assume the worst signs). For independent random errors they add in quadrature instead: (ΔL/L)2+(2ΔT/T)2.

Worked example. L is known to 0.5% and T to 0.2%. Maximum error in g: 0.5+2×0.2=0.9%. The period counts double because it is squared.

3. Exact and inexact differentials

A differential Mdx+Ndy is exact if it is dF for some function F(x,y). Then its integral between two points is just F(end)−F(start), the same for every path, and zero round any closed loop.

Mdx+Ndy is exact⟺∂M∂y=∂N∂x(in a region without holes)

Why: if M=Fx and N=Fy, the two sides are the two mixed partials of F.

Worked example. Show that dF=(2xy+3)dx+(x2+4y)dy is exact and find F with F(0,0)=0.

  1. Test: ∂M/∂y=2x and ∂N/∂x=2x. Exact.
  2. Integrate M in x: F=x2y+3x+g(y).
  3. Match Fy=x2+g′(y) with N=x2+4y: g=2y2. So F=x2y+3x+2y2.

The classic mistake is to integrate M in x, N in y, and add: the shared term x2y is then counted twice.

Exact (dF)
the change of a state function: its integral depends only on the end points
Inexact (đQ, đW)
a small amount of something that depends on the path, not a change of anything
Integrating factor
a function that multiplies an inexact differential into an exact one
Physical meaning
Internal energy, entropy and enthalpy are state functions (exact). Heat and work are not: for an ideal gas đQ = CVdT + (RT/V)dV fails the test, but dividing by T gives dS, which passes. That 1/T is the integrating factor behind the second law.

“P dV is exact because P and V are state variables.” Wrong. Each of P and V is a state function, but PdV is not the change of anything: with T and V as variables, PdV=(nRT/V)dV fails the test. That is why the work done in a cycle (the area on a PV diagram) is not zero, and why engines work. By contrast PdV+VdP=d(PV) is exact.

4. The reciprocal and cyclic rules

For three variables linked by one equation F(x,y,z)=0, any two can be chosen freely. Two rules follow, and thermodynamics uses them constantly:

(∂x∂y)z=1(∂y/∂x)z,(∂x∂y)z(∂y∂z)x(∂z∂x)y=−1

The minus sign surprises everyone. Check it with PV=nRT: (∂P/∂V)T=−P/V, (∂V/∂T)P=nR/P, (∂T/∂P)V=V/nR. The product is −1.

Worked example. For one mole of a van der Waals gas, (∂U/∂V)T=T(∂P/∂T)V−P. With P=RT/(V−b)−a/V2: (∂P/∂T)V=R/(V−b), so (∂U/∂V)T=a/V2. The attraction between molecules makes the internal energy depend on volume; for an ideal gas it would be zero. More on this in thermodynamic potentials and Maxwell relations.

Euler’s theorem. If scaling every variable by λ multiplies f by λn (homogeneous of degree n), then xfx+yfy=nf. For (x2+y2)3/2, n=3.

5. Jacobians: how areas stretch

When you change variables from (x,y) to (u,v), small areas stretch by the Jacobian:

∂(x,y)∂(u,v)=|∂x/∂u∂x/∂v∂y/∂u∂y/∂v|,dxdy=|∂(x,y)∂(u,v)|dudv

For polar coordinates it is r; for spherical coordinates r2sin⁡θ. Two facts save time: the Jacobian of the inverse map is the reciprocal, ∂(u,v)∂(x,y)=1/∂(x,y)∂(u,v), and Jacobians chain like fractions. Lesson 1.3 puts them to work in integrals.

Worked example. For u=xy, v=y/x: ∂(u,v)∂(x,y)=|yx−y/x21/x|=2yx=2v, so dxdy=dudv/(2v).

6. Maxima, minima and saddles

At a stationary point both first partials vanish. The second derivatives decide what kind it is, through D=fxxfyy−fxy2:

Condition Type
D>0, fxx>0 local minimum
D>0, fxx<0 local maximum
D<0 saddle point
D=0 test says nothing

Worked example. f=x3−3x+y2. Stationary points: 3x2−3=0 and 2y=0, so (±1,0). At (1,0): D=6×2=12>0, fxx>0, a minimum. At (−1,0): D=−12, a saddle, even though along the x-axis alone it looks like a maximum.

Lagrange multipliers. To make f stationary while g=c, set ∇f=λ∇g: at the best point the level curves of f and g touch. For the largest xyz with x+y+z=12: yz=xz=xy=λ, so x=y=z=4 and the maximum is 64. The same method derives the Boltzmann distribution in statistical physics.

  • A partial derivative holds every other variable fixed; in thermodynamics the subscript says which. Mixed partials commute when continuous.
  • df=fxdx+fydy gives the chain rule, implicit slopes −Fx/Fy and error estimates (take logs; maximum errors add in size).
  • Mdx+Ndy is exact when ∂M/∂y=∂N/∂x; then it has a potential and path-independent integrals. Heat and work are inexact; 1/T makes đQ exact.
  • Reciprocal rule, and the cyclic rule with its −1.
  • Jacobians stretch areas: r for polar, r2sin⁡θ for spherical; the inverse map has the reciprocal Jacobian.
  • Stationary points: D=fxxfyy−fxy2 sorts minimum, maximum and saddle. Constraints: ∇f=λ∇g.

Practise: exam questions on this lesson

They start easy and climb to top-rank level. Check each answer, then read the full solution. More on the partial derivatives practice page.

Before this: lesson 1.1, limits and Taylor series. Next: lesson 1.3, double and triple integrals, where Jacobians turn awkward regions into rectangles. The gradient, which packs all the partial derivatives into one vector, is the subject of lesson 1.5, and exact differentials return as state functions in the first law.

Go deeper: for GATE, partial derivatives drive Lagrangian mechanics and partial differential equations.

Check yourself

1For f(x, y) = x²y + y³, what is ∂f/∂x?
2Which test tells you that M dx + N dy is an exact differential (in a region without holes)?
3For three variables linked by one equation, what is (∂x/∂y)_z (∂y/∂z)_x (∂z/∂x)_y?

Sources

  • M. L. Boas, Mathematical Methods in the Physical Sciences, 3rd ed. (2006), chapter 4: partial differentiation
  • K. F. Riley, M. P. Hobson and S. J. Bence, Mathematical Methods for Physics and Engineering, 3rd ed. (2006), chapter 5
  • H. B. Callen, Thermodynamics and an Introduction to Thermostatistics, 2nd ed. (1985), chapter 7 (Maxwell relations and Jacobians)
  • IIT JAM Physics syllabus (Mathematical Methods section), published by the organising IIT each year

Your ticks stay in this browser. Save them as a file on the course home.

Updated 2026-11-22. Not affiliated with IIT or the JAM organising institute. Exam pattern as published for recent years: always check the official JAM website before the exam. All questions are original.