LECTURE 15

Partial Derivatives

Functions of several variables — it's simpler than you think.

The Hook

A molecule's energy depends on multiple coordinates:

$$V(r_1, r_2, \theta) = \text{function of bond lengths and angle}$$

For water: V depends on two O-H distances and the H-O-H angle.

Question: How does V change if we stretch just one bond, holding everything else fixed?

Answer: That's a partial derivative.

$$\frac{\partial V}{\partial r_1} = \text{rate of change of } V \text{ with respect to } r_1 \text{, holding } r_2 \text{ and } \theta \text{ constant}$$

Partial differentiation = ordinary differentiation with some variables treated as constants.
That's the whole idea. Everything else is notation.

When to Use Partial Derivatives

SituationWhat You Need
"How does Y change with X, holding Z fixed?"∂Y/∂X
Energy depends on multiple coordinates∂V/∂qi
Thermodynamic state functions(∂G/∂T)P, (∂G/∂P)T
Finding equilibrium geometrySet all ∂V/∂qi = 0
Checking stabilityHessian matrix of second partials

How to Compute

To find ∂f/∂x:

  1. Treat all other variables as constants
  2. Differentiate with respect to x using ordinary rules

That's it.

Example: f(x, y) = x²y + 3xy² − y³

∂f/∂x (treat y as constant):

$$\frac{\partial f}{\partial x} = 2xy + 3y^2 - 0 = 2xy + 3y^2$$

(The −y³ term has no x, so its derivative w.r.t. x is 0.)

∂f/∂y (treat x as constant):

$$\frac{\partial f}{\partial y} = x^2 + 6xy - 3y^2$$

Example: f(x, y) = exy

Using the chain rule with y as constant:

$$\frac{\partial f}{\partial x} = ye^{xy}, \quad \frac{\partial f}{\partial y} = xe^{xy}$$

Notation

NotationMeaning
∂f/∂xPartial of f with respect to x
fxSame (subscript notation)
(∂f/∂x)yExplicitly showing y is held constant
fx(a, b)Partial evaluated at point (a, b)

The subscript outside the parentheses shows what's held constant. This is essential in thermodynamics.

Interactive: Surface and Partial Derivatives

Visualizing ∂f/∂x and ∂f/∂y as Slopes
f(x,y) = x² + y²

The Gradient

Gradient: The vector of all partial derivatives:

$$\nabla f = \left( \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y} \right)$$

The gradient points in the direction of steepest ascent. Its magnitude is the rate of steepest ascent.

For potential energy: Force = −∇V (points downhill)

Gradient Vectors on Contour Plot
Gradient vectors (red) point perpendicular to contours, in the direction of steepest increase.

Critical Points in Multiple Variables

Critical point: Where ∇f = 0 (all partial derivatives are zero).

Second Derivative Test (2D)

At a critical point (a, b), compute:

$$D = f_{xx} \cdot f_{yy} - (f_{xy})^2 = \det(\text{Hessian})$$

ConditionType
D > 0 and fxx > 0Local minimum
D > 0 and fxx < 0Local maximum
D < 0Saddle point
D = 0Inconclusive
Types of Critical Points
Select a surface type to see the critical point classification.

The Hessian Matrix

Hessian: The matrix of second partial derivatives:

$$\mathbf{H} = \begin{pmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{pmatrix}$$

Eigenvalues of H determine the nature of critical points:

Clairaut's Theorem

If fxy and fyx are both continuous, then:

$$f_{xy} = f_{yx}$$

The order of differentiation doesn't matter.

Chemistry: Thermodynamic Partials

Ideal Gas: PV = nRT

P as a function of V and T: $P = \frac{nRT}{V}$

$$\left(\frac{\partial P}{\partial T}\right)_V = \frac{nR}{V}$$

(At constant volume, pressure increases linearly with temperature.)

$$\left(\frac{\partial P}{\partial V}\right)_T = -\frac{nRT}{V^2}$$

(At constant temperature, pressure decreases as volume increases.)

The Cyclic Rule

For state functions:

$$\left(\frac{\partial P}{\partial T}\right)_V \left(\frac{\partial T}{\partial V}\right)_P \left(\frac{\partial V}{\partial P}\right)_T = -1$$

Chemistry: Potential Energy Surfaces

A molecule's equilibrium geometry minimizes V(q1, q2, ..., qn):

Necessary condition: $\frac{\partial V}{\partial q_i} = 0$ for all i (all forces zero)

Hessian eigenvalues give vibrational frequencies:

2D Potential Energy Surface
Contours show V(r1, r2). At equilibrium (red dot), ∇V = 0. The green arrow shows the force direction at a displaced point.

Total Differential

Total differential: How f changes when x and y both change:

$$df = \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy$$

Error Propagation

If f depends on measured quantities x and y with uncertainties δx and δy:

$$(\delta f)^2 \approx \left(\frac{\partial f}{\partial x}\right)^2(\delta x)^2 + \left(\frac{\partial f}{\partial y}\right)^2(\delta y)^2$$

Example: V = πr²h with r = 2.0 ± 0.1 cm, h = 5.0 ± 0.2 cm gives V = 62.8 ± 6.8 cm³

Summary

ConceptKey Formula
∂f/∂xDifferentiate treating other variables as constants
Gradient∇f = (∂f/∂x, ∂f/∂y, ...)
Force from potentialF = −∇V
Critical pointsWhere ∇f = 0
HessianHij = ∂²f/∂xi∂xj
Total differentialdf = ∑ (∂f/∂xi)dxi
Mixed partialsfxy = fyx