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.
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)$:
In practice you differentiate normally, treating every other variable as a constant.
Example. For $z = x^3y^2 + 4xy$:
Equality of mixed partials
If $f$ and its second partial derivatives are continuous, then
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
and the total differential is
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
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
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:
Then classify using the second partial derivatives, conventionally written
The discriminant is $D = rt - s^2$:
| Condition | Nature 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
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
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.
For the function z = x^3 y^2 + 4xy, the partial derivative of z with respect to x is:
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:
At a stationary point of f(x, y) the discriminant rt - s^2 is negative. The point is a:
The function f(x, y) = x^3 + x^2 y + y^3 is homogeneous of degree: