6.6 Partial Derivatives, Total Derivative & Multivariable Optimisation

Key Takeaways

  • A partial derivative differentiates with respect to one variable while holding all others constant, whereas the total derivative accumulates the effect of every variable changing together.
  • For a continuous function with continuous second partials, the mixed partial derivatives are equal, which is the mathematical basis of the Maxwell relations in thermodynamics.
  • A function is homogeneous of degree n when scaling every variable by t scales the function by t^n, and Euler's theorem then relates the weighted partial derivatives to n times the function.
  • At a stationary point of a two-variable function, the discriminant rt - s^2 decides the nature: positive with r negative gives a maximum, positive with r positive gives a minimum, and negative gives a saddle point.
Last updated: August 2026

Partial Derivatives

When a quantity depends on several variables — the pressure of a gas on both temperature and volume, the cost of a machining operation on both cutting speed and feed — the rate of change with respect to one variable, holding the others fixed, is a partial derivative.

For $z = f(x,y)$:

zx=limh0f(x+h,y)f(x,y)h\frac{\partial z}{\partial x} = \lim_{h\to0}\frac{f(x+h, y) - f(x,y)}{h}

In practice you differentiate normally, treating every other variable as a constant.

Example. For $z = x^3y^2 + 4xy$:

zx=3x2y2+4y,zy=2x3y+4x\frac{\partial z}{\partial x} = 3x^2y^2 + 4y, \qquad \frac{\partial z}{\partial y} = 2x^3y + 4x

Equality of mixed partials

If $f$ and its second partial derivatives are continuous, then

2zxy=2zyx\frac{\partial^2 z}{\partial x \partial y} = \frac{\partial^2 z}{\partial y \partial x}

This symmetry (Clairaut's or Schwarz's theorem) is not merely a curiosity: it is exactly the property exploited to derive the Maxwell relations in the Thermodynamics part of Paper-II, where the equality of mixed second derivatives of a property function generates relations among $P$, $v$, $T$ and $s$.

The Total Derivative

A partial derivative isolates one variable; the total derivative accounts for all of them changing simultaneously. If $z = f(x,y)$ and both $x$ and $y$ depend on a parameter $t$, the chain rule gives

dzdt=zxdxdt+zydydt\frac{dz}{dt} = \frac{\partial z}{\partial x}\frac{dx}{dt} + \frac{\partial z}{\partial y}\frac{dy}{dt}

and the total differential is

dz=zxdx+zydydz = \frac{\partial z}{\partial x}dx + \frac{\partial z}{\partial y}dy

Small-error estimation

The total differential is the standard tool for propagating measurement error, which links directly to the Metrology topic in Section 4. If the volume of a cylinder is $V = \pi r^2 h$, then

dVV=2drr+dhh\frac{dV}{V} = 2\frac{dr}{r} + \frac{dh}{h}

A 1% error in radius therefore contributes 2% to the volume error, while a 1% error in height contributes only 1%. This is why bore diameter is gauged more tightly than length on a hydraulic cylinder.

Euler's Theorem on Homogeneous Functions

A function is homogeneous of degree $n$ if $f(tx, ty) = t^{n}f(x,y)$ for all $t$. Euler's theorem then states

xfx+yfy=nfx\frac{\partial f}{\partial x} + y\frac{\partial f}{\partial y} = n f

To find the degree quickly, check the total power of each term: $f = x^3 + x^2y + y^3$ is homogeneous of degree 3, so $x f_x + y f_y = 3f$ without any differentiation at all.

Maxima and Minima of Two Variables

To optimise $f(x,y)$, first find stationary points by solving both first-order conditions simultaneously:

fx=0andfy=0\frac{\partial f}{\partial x} = 0 \quad \text{and} \quad \frac{\partial f}{\partial y} = 0

Then classify using the second partial derivatives, conventionally written

r=2fx2,s=2fxy,t=2fy2r = \frac{\partial^2 f}{\partial x^2}, \qquad s = \frac{\partial^2 f}{\partial x \partial y}, \qquad t = \frac{\partial^2 f}{\partial y^2}

The discriminant is $D = rt - s^2$:

ConditionNature of stationary point
$D > 0$ and $r < 0$Local maximum
$D > 0$ and $r > 0$Local minimum
$D < 0$Saddle point
$D = 0$Test fails; further investigation needed

A saddle point is a genuine physical possibility, not a mathematical oddity: it is a configuration that is a minimum along one direction and a maximum along a perpendicular one, exactly the behaviour of an unstable equilibrium in a linkage.

Worked example. Classify the stationary point of $f(x,y) = x^2 + y^2 - 4x - 6y + 20$.

Setting $f_x = 2x - 4 = 0$ and $f_y = 2y - 6 = 0$ gives the single stationary point $(2, 3)$. Here $r = 2$, $t = 2$, $s = 0$, so $D = 4 > 0$ with $r > 0$: a local minimum, of value $f(2,3) = 4 + 9 - 8 - 18 + 20 = 7$.

Lagrange Multipliers

To optimise $f(x,y,z)$ subject to a constraint $g(x,y,z) = 0$, form

F=f+λgF = f + \lambda g

and solve $\partial F/\partial x = \partial F/\partial y = \partial F/\partial z = 0$ together with the constraint itself. This is the standard method when a design is limited by a fixed volume, a fixed surface area, or a fixed material budget — for example, proportioning a pressure vessel of given capacity to minimise plate area.

Taylor Series in Two Variables

The expansion about $(a,b)$ up to second order is

f(x,y)f(a,b)+(xa)fx+(yb)fy+12[(xa)2fxx+2(xa)(yb)fxy+(yb)2fyy]f(x,y) \approx f(a,b) + (x-a)f_x + (y-b)f_y + \tfrac{1}{2}\left[(x-a)^2 f_{xx} + 2(x-a)(y-b)f_{xy} + (y-b)^2 f_{yy}\right]

with all partials evaluated at $(a,b)$. Retaining only the linear terms gives the tangent-plane approximation, and it is the second-order block in square brackets whose sign is precisely what the discriminant test examines.

Test Your Knowledge

For the function z = x^3 y^2 + 4xy, the partial derivative of z with respect to x is:

A
B
C
D
Test Your Knowledge

The volume of a cylinder is V = pi r^2 h. If the radius is measured with a 1% error and the height with a 1% error, the maximum percentage error in the calculated volume is approximately:

A
B
C
D
Test Your Knowledge

At a stationary point of f(x, y) the discriminant rt - s^2 is negative. The point is a:

A
B
C
D
Test Your Knowledge

The function f(x, y) = x^3 + x^2 y + y^3 is homogeneous of degree:

A
B
C
D