Partial derivatives
For a function $f(x, y)$ of two variables the partial derivative $\partial f/\partial x$ is the slope in the $x$ direction with $y$ held fixed. If the partial derivatives are continuous, the order of differentiation does not matter: $\partial^2 f/\partial x\,\partial y = \partial^2 f/\partial y\,\partial x$ (Schwarz’s theorem). That is why the Maxwell relations of thermodynamics hold. The chain rule for several variables,
describes how a quantity changes along a path – for example, the temperature felt by a particle drifting with a flow.
Gradient and contours
The gradient $\nabla f = (\partial f/\partial x, \partial f/\partial y)$ points in the direction in which $f$ increases fastest, and its length is the slope in that direction. The directional derivative along a unit vector $\hat u$ is $D_{\hat u}f = \nabla f\cdot\hat u$. The gradient is perpendicular to the contours $f = $ constant – on a map with height contours it points straight uphill, and water runs the opposite way. In physics force is minus the gradient of the potential, $\vec F = -\nabla V$, and heat flows against the temperature gradient.
Extrema and Lagrange
At a local maximum or minimum the gradient is zero. What kind of stationary point it is is decided by the Hessian matrix of second derivatives: if both eigenvalues are positive it is a minimum, both negative a maximum, and of opposite sign a saddle point. If $f$ is to be optimised subject to a constraint $g(x, y) = c$, the solution lies where the contour of $f$ just touches the constraint curve, so that the two gradients are parallel:
The constant $\lambda$ is the Lagrange multiplier. The method is everywhere in physics: in statistical mechanics the Boltzmann distribution is derived by maximising entropy subject to constraints on number and energy, and the multiplier for energy turns out to be $1/k_BT$.
Multiple integrals
A double integral $\iint_D f\,dA$ sums $f$ over a region of the plane – a mass from a surface density, a charge from a charge density. When coordinates are changed, the area element must be scaled by the Jacobian determinant:
A classic example is the Gaussian integral: $I = \int_{-\infty}^\infty e^{-x^2}dx$ is computed by squaring it, $I^2 = \iint e^{-(x^2+y^2)}dx\,dy$, and changing to polar coordinates, where the integral becomes elementary: $I^2 = \pi$, so $I = \sqrt\pi$.
Line integrals
The work done by a force along a path $C$ is the line integral $W = \int_C \vec F\cdot d\vec r$. For a conservative field $\vec F = -\nabla V$ it depends only on the end points, and the integral round a closed curve is zero – that is the definition of a conserved energy. If $\oint \vec F\cdot d\vec r \neq 0$, the field is not conservative; an example is the electric field around a transformer core in which the magnetic field is changing.
Divergence and curl
For a vector field $\vec F$ the divergence $\nabla\cdot\vec F$ measures how much the field flows out of a small region per unit area, and the curl $\nabla\times\vec F$ how much it swirls. A source field such as $\vec F = (x, y)$ has divergence 2 and no curl; a vortex field such as $\vec F = (-y, x)$ has curl 2 and no divergence. A field can have curl without swirling visibly: the flow in a shear field $\vec F = (y, 0)$ is in straight lines, but a small paddle wheel in it would still be turned.
Gauss and Stokes
The divergence theorem (Gauss, Ostrogradsky) and Stokes’ theorem connect the behaviour of a field inside a region with its behaviour on the boundary:
With them Maxwell’s equations can be written both in integral form – Gauss’s law, Faraday’s law, Ampère’s law – and in differential form (see applied field theory). The continuity equation $\partial\rho/\partial t + \nabla\cdot\vec J = 0$ says that charge and mass are conserved locally, and it holds in fluid mechanics, electromagnetism and quantum mechanics. George Green, a self-taught miller from Nottingham, published the theorem that bears his name in 1828 at his own expense; it only became known when William Thomson (Lord Kelvin) found it 17 years later.
Since 1978
- Differential forms: The theorems of Gauss, Stokes and Green are now often combined into one: $\int_\Omega d\omega = \int_{\partial\Omega}\omega$, the generalised Stokes theorem, which also holds in the four-dimensional spacetime of relativity.
- Visualisation: Where field lines were drawn by hand in the 1970s, three-dimensional fields can now be rotated on screen – as on many of the site’s 3D pages.
- Automatic differentiation: Gradients are now computed automatically by the computer – the basis of training neural networks, which use gradient descent in millions of dimensions.
Further reading
- H. M. Schey: Div, Grad, Curl, and All That (4th ed., Norton 2005)
- Mary L. Boas: Mathematical Methods in the Physical Sciences (3rd ed., Wiley 2006)
- K. F. Riley, M. P. Hobson and S. J. Bence: Mathematical Methods for Physics and Engineering (3rd ed., Cambridge 2006)