The Partial Derivative

Hold every variable but one still.

No single slope

On a curve y = f(x) there is one slope at each point, the derivative. On a surface z = f(x, y) there is no single slope: standing at one point, the ground may rise steeply one way, gently another way, and fall a third way.

Take f(x, y) = x²y at the point (1, 2), where the height is 1 × 2 = 2. A step of 0.1 in the x direction, to (1.1, 2), raises the height to 2.42. A step of 0.1 in the y direction, to (1, 2.1), raises it only to 2.1. The two directions climb at different rates.

Hold y constant

To measure the slope in the x direction, walk only in that direction. Then y does not change: it stays at 2. Putting y = 2 into f gives z = 2x², an ordinary function of one variable.

Its graph is the slice of the surface cut by the plane y = 2, a parabola. Its gradient is found by ordinary differentiation: d/dx of 2x² is 4x, which is 4 at x = 1. So at (1, 2) the surface rises 4 units for each unit moved in the x direction.

xz

The slice of z = x²y at y = 2, which is the parabola z = 2x², with its tangent at the point (1, 2). The tangent z = 4x − 2 has gradient 4: the slope of the surface in the x direction at that point.

The partial derivative

That slope is the partial derivative of f with respect to x, written ∂f/∂x. The curly ∂ is used in place of d to show that f depends on more than one variable and that all but one are held constant.

As a limit, ∂f/∂x at (a, b) is found from a step h in the x direction: take the change in height f(a + h, b) − f(a, b), divide it by h, and find the limit as h tends to 0. Only x moves; y stays at b. For x²y at (1, 2), steps of 0.1, 0.01 and 0.001 give the quotients 4.2, 4.02 and 4.002, which tend to 4.

In practice no limit is needed: treat y as a constant and differentiate in x by the ordinary rules. In x²y the y is a constant factor, so it stays, and x² becomes 2x. So ∂f/∂x = 2xy, which is 2 × 1 × 2 = 4 at (1, 2).

The other direction

The partial derivative with respect to y, ∂f/∂y, holds x constant and differentiates in y. In x²y the x² is now the constant factor and y differentiates to 1, so ∂f/∂y = x², which is 1 at (1, 2).

The slice at x = 1 is z = y, a straight line: a step h in the y direction changes the height by exactly h, so the difference quotient is exactly 1 for every step. At (1, 2) the surface rises 4 per unit in the x direction and 1 per unit in the y direction.

For f(x, y) = x²y + 5y², the term 5y² has no x in it, so under ∂/∂x it is a constant and contributes 0: ∂f/∂x = 2xy. Under ∂/∂y it contributes 10y, so ∂f/∂y = x² + 10y. At (1, 2) the slopes are 4 and 1 + 20 = 21.

xy(1.5, 0.5)xzhold y constanthold y constanthold x constant

hold y constant — the slice is an ordinary curve, and the partial derivative is its gradient: 3

Find a point where the x-slope is zero

The surface f = x² + 2y²: its contour map on the left, and on the right the slice through the point (1.5, 0.5). Holding y constant, the slice is z = x² + 0.5, and its gradient at x = 1.5 is ∂f/∂x = 2x = 3. Holding x constant instead, the slice is z = 2.25 + 2y², and its gradient is ∂f/∂y = 4y = 2.

The usual mistakes

Treating y as a variable while differentiating in x. Using the product rule on x²y in x gives 2xy + x² dy/dx, but y is held constant, so the second term is not there: ∂f/∂x = 2xy.

Deleting the constant instead of keeping it. Under ∂/∂x the y in x²y is a constant factor, and a constant factor stays in the derivative, so the answer is 2xy, not 2x.

Differentiating a term with no x in it. Under ∂/∂x, the term 5y² is a constant, so it gives 0, not 10y.

Air under a piston

In the application below, the pressure of the air in a cylinder depends on its temperature T and its volume V. Holding V constant gives the rate at which the pressure rises with the temperature, and holding T constant gives the rate at which it falls as the volume grows.

Worked example: Air Under a Piston: How Fast the Pressure Changes With the Temperature and With the Volume, and the Volume That Holds It Steady

Question A cylinder closed by a sliding piston holds a fixed amount of air. When the air is at a temperature of T kelvin and fills a volume of V liters, its pressure is P(T, V) = 25TV kilopascals. At present T = 300 and V = 75. (a) Find the pressure, and the partial derivatives ∂ P∂ T and ∂ P∂ V at the present state, and say what each one means. (b) The air is then warmed slowly while the piston moves to keep the pressure the same. Use the partial derivatives to find the rate, in liters per kelvin, at which the volume must grow, and the volume after the air has warmed by 6 kelvin.

  1. 1.(a) At the present state, P(300, 75) = 25 × 30075 = 750075 = 100 kilopascals, close to the pressure of the air outside.

    96100104727578volume V, literspressure P, kPa300 K(a) P = 25 × 300 / 75 = 100 kPa
    96100104727578volume V, literspressure P, kPa300 K(a) P = 25 × 300 / 75 = 100 kPa
    (a) At 300 kelvin and 75 liters the pressure is 100 kilopascals. The curve is the cross-section T = 300: the pressure against the volume at that temperature.
  2. 2.To find ∂ P∂ T, hold V constant and differentiate with respect to T: ∂ P∂ T = 25V = 2575 = 13. With the volume held at 75 liters, the pressure rises by about 13 of a kilopascal for each kelvin of warming.

    96100104727578volume V, literspressure P, kPa300 K306 K(a) P = 25 × 300 / 75 = 100 kPaV held: 25/V = 1/3 kPa per K
    96100104727578volume V, literspressure P, kPa300 K306 K(a) P = 25 × 300 / 75 = 100 kPaV held: 25/V = 1/3 kPa per K
    Holding the volume at 75 liters and warming by 6 kelvin moves up to the curve T = 306, a rise of 6 × 13 = 2 kilopascals: ∂ P∂ T = 13.
  3. 3.To find ∂ P∂ V, hold T constant, so that P = 25T × V−1: ∂ P∂ V = −25TV2 = −75005625 = −43. With the temperature held at 300 kelvin, the pressure falls by about 43 kilopascals for each extra liter.

    96100104727578volume V, literspressure P, kPa300 K306 Kslope −4/3(a) P = 25 × 300 / 75 = 100 kPaV held: 25/V = 1/3 kPa per KT held: −25T/V2= −4/3 kPa per liter
    96100104727578volume V, literspressure P, kPa300 K306 Kslope −4/3(a) P = 25 × 300 / 75 = 100 kPaV held: 25/V = 1/3 kPa per KT held: −25T/V2= −4/3 kPa per liter
    Holding the temperature at 300 kelvin, the gradient of the curve at V = 75 is ∂ P∂ V = −43 kilopascals per liter.
  4. 4.(b) Small changes Δ T and Δ V change the pressure by about 13Δ T − 43Δ V. For the pressure to stay the same this must be 0, so 43Δ V = 13Δ T and Δ V = 14Δ T. The volume must grow at 0.25 liters per kelvin.

    96100104727578volume V, literspressure P, kPa300 K306 Kslope −4/3(a) P = 25 × 300 / 75 = 100 kPaV held: 25/V = 1/3 kPa per KT held: −25T/V2= −4/3 kPa per liter(b) V must grow (1/3)/(4/3) = 0.25 L per K
    96100104727578volume V, literspressure P, kPa300 K306 Kslope −4/3(a) P = 25 × 300 / 75 = 100 kPaV held: 25/V = 1/3 kPa per KT held: −25T/V2= −4/3 kPa per liter(b) V must grow (1/3)/(4/3) = 0.25 L per K
    (b) To bring the pressure back to 100 kilopascals after warming, the volume must grow by 14 of a liter for each kelvin.
  5. 5.After 6 kelvin of warming, the volume must grow by 0.25 × 6 = 1.5 liters, to 76.5 liters. Check: P(306, 76.5) = 25 × 30676.5 = 765076.5 = 100 kilopascals, so the pressure is unchanged.

    96100104727578volume V, literspressure P, kPa300 K306 Kslope −4/376.5 L(a) P = 25 × 300 / 75 = 100 kPaV held: 25/V = 1/3 kPa per KT held: −25T/V2= −4/3 kPa per liter(b) V must grow (1/3)/(4/3) = 0.25 L per K6 K warmer: V = 75 + 1.5 = 76.5 L
    96100104727578volume V, literspressure P, kPa300 K306 Kslope −4/376.5 L(a) P = 25 × 300 / 75 = 100 kPaV held: 25/V = 1/3 kPa per KT held: −25T/V2= −4/3 kPa per liter(b) V must grow (1/3)/(4/3) = 0.25 L per K6 K warmer: V = 75 + 1.5 = 76.5 L
    After 6 kelvin of warming the volume is 76.5 liters, on the curve T = 306, at a pressure of 100 kilopascals.

Answer: (a) 100 kilopascals; ∂ P∂ T = 13 ≈ 0.333 kilopascals per kelvin at a fixed volume, and ∂ P∂ V = −43 ≈ −1.333 kilopascals per liter at a fixed temperature; (b) 0.25 liters per kelvin, so 76.5 liters after 6 kelvin of warming

Common mistakes

  • Writing ∂ P∂ V = −25V2 and dropping the T. Holding T constant makes 25T a constant factor, 7500 here, and a constant factor stays in the derivative.
  • Answering that the volume must shrink by 0.25 liters per kelvin. Warming raises the pressure, so the volume has to grow to bring it back down; it is the negative sign of ∂ P∂ V that lets the two changes cancel.

More partial derivatives problems, worked step by step →

Practice The Partial Derivative in the app