Partial Differentiation: Partial Derivatives and Applications

By Engr. Henry Akpan

Calculus with More Than One Variable

The volume of a cylinder depends on both its radius and its height. The pressure of a gas depends on its temperature and its volume. A company's profit depends on the prices of several products. To ask how such a quantity changes, we need to vary one input at a time while holding the others fixed. That is partial differentiation. This tutorial, for MTH 201 and engineering mathematics, covers functions of two variables, first and second partial derivatives, the equality of mixed derivatives, the total differential and small-error estimates, the chain rule, stationary points with the second-derivative test, and a glimpse of partial differential equations, with worked examples throughout. It builds on the tutorials on differentiation and its applications.

Functions of Two Variables

A function z = f(x, y) gives one output for each pair of inputs (x, y). For example, the volume of a cylinder is V(r, h) = πr²h. Its graph is a surface in three dimensions, like a landscape, where (x, y) is the position on a map and z is the height of the ground.

First Partial Derivatives

The partial derivative of f with respect to x, written ∂f/∂x (or fx), is found by differentiating with respect to x while treating y as a constant. Similarly, ∂f/∂y (or fy) treats x as a constant.

The symbol ∂ (a curly d) reminds you that other variables are being held fixed. Geometrically, ∂f/∂x is the slope of the surface in the x-direction: the steepness you would feel walking due east across the landscape.

Worked example 1

Find the first partial derivatives of f(x, y) = x²y + 3xy².

Treating y as a constant: ∂f/∂x = 2xy + 3y².

Treating x as a constant: ∂f/∂y = x² + 6xy.

Worked example 2

Find the partial derivatives of (a) f = e^(xy) (b) g = sin x cos y.

(a) Using the chain rule, ∂f/∂x = y e^(xy), and ∂f/∂y = x e^(xy).

(b) ∂g/∂x = cos x cos y, and ∂g/∂y = −sin x sin y.

Worked example 3: a cylinder

For V = πr²h, find ∂V/∂r and ∂V/∂h, and interpret them when r = 5 cm and h = 10 cm.

∂V/∂r = 2πrh = 100π ≈ 314 cm³ per cm. Increasing the radius by a small amount, with the height fixed, increases the volume by about 314 times that amount.

∂V/∂h = πr² = 25π ≈ 78.5 cm³ per cm. Increasing the height adds about 78.5 cm³ for each centimetre.

At these dimensions, the volume is about four times more sensitive to changes in the radius than to changes in the height.

Second Partial Derivatives

Differentiating again gives four second derivatives:

  • ∂²f/∂x² (fxx): differentiate with respect to x twice.
  • ∂²f/∂y² (fyy): differentiate with respect to y twice.
  • ∂²f/∂x∂y and ∂²f/∂y∂x: the mixed derivatives, differentiating once with respect to each variable.

For all the functions met in practice (those with continuous second derivatives), the two mixed derivatives are equal: the order of differentiation does not matter. This result is known as Clairaut's (or Schwarz's) theorem.

Worked example 4

For f(x, y) = x²y + 3xy², find all the second partial derivatives.

From example 1: fx = 2xy + 3y², and fy = x² + 6xy.

  • fxx = 2y
  • fyy = 6x
  • ∂/∂y of fx = 2x + 6y
  • ∂/∂x of fy = 2x + 6y

The mixed derivatives agree, as expected. The same check for e^(xy) gives (1 + xy)e^(xy) both ways.

The Total Differential and Small Errors

If both x and y change by small amounts δx and δy, the total change in z = f(x, y) is approximately:

δz ≈ (∂z/∂x) δx + (∂z/∂y) δy

Each term is the effect of one change while the other variable is held fixed, and for small changes the effects simply add.

Worked example 5

A cylinder has radius 5 cm and height 10 cm. The radius increases by 0.1 cm and the height by 0.2 cm. Estimate the change in volume.

δV ≈ 2πrh δr + πr² δh = 2π(5)(10)(0.1) + π(25)(0.2) = 10π + 5π = 15π ≈ 47.1 cm³.

The exact change is π(5.1²)(10.2) − π(5²)(10) ≈ 48.1 cm³, so the estimate is close.

Percentage errors

For products and powers, dividing the total differential by z gives a neat rule. For V = πr²h:

δV/V ≈ 2(δr/r) + (δh/h)

So a 1% error in the radius and a 2% error in the height give about a 2 × 1% + 2% = 4% error in the volume. This is the rule for combining uncertainties used in physics practicals.

The Chain Rule for Several Variables

If z = f(x, y), where x and y both depend on t, then:

dz/dt = (∂z/∂x)(dx/dt) + (∂z/∂y)(dy/dt)

Worked example 6: related rates

The radius of a cylinder grows at 0.2 cm/s, and its height shrinks at 0.5 cm/s. How fast is the volume changing when r = 5 cm and h = 10 cm?

dV/dt = 2πrh (dr/dt) + πr² (dh/dt) = 100π(0.2) + 25π(−0.5) = 20π − 12.5π = 7.5π ≈ 23.6 cm³/s, increasing.

Stationary Points

A stationary point of f(x, y) is where the surface is flat in every direction: fx = 0 and fy = 0 together. To classify it, calculate:

D = fxx fyy − (fxy)²

  • If D is positive and fxx is positive, it is a local minimum (the bottom of a bowl).
  • If D is positive and fxx is negative, it is a local maximum (the top of a hill).
  • If D is negative, it is a saddle point: a minimum in one direction and a maximum in another, like a mountain pass or a horse's saddle.
  • If D = 0, the test is inconclusive.

Worked example 7

Find and classify the stationary point of f(x, y) = x² + y² − 4x + 6y.

fx = 2x − 4 = 0 gives x = 2, and fy = 2y + 6 = 0 gives y = −3.

fxx = 2, fyy = 2 and fxy = 0, so D = 4. D is positive and fxx is positive, so (2, −3) is a minimum, with value f(2, −3) = 4 + 9 − 8 − 18 = −13.

Completing the square confirms it: f = (x − 2)² + (y + 3)² − 13.

Worked example 8

Find and classify the stationary points of f(x, y) = x³ − 3x + y².

fx = 3x² − 3 = 0 gives x = ±1, and fy = 2y = 0 gives y = 0. So the stationary points are (1, 0) and (−1, 0).

fxx = 6x, fyy = 2 and fxy = 0, so D = 12x.

  • At (1, 0): D = 12, which is positive, and fxx = 6, which is positive, so it is a minimum.
  • At (−1, 0): D = −12, which is negative, so it is a saddle point.

A Glimpse of Partial Differential Equations

Equations involving partial derivatives describe how quantities vary in space and time. For example:

  • The Laplace equation fxx + fyy = 0 describes steady temperatures and electric potentials. The function u = x² − y² satisfies it, since uxx = 2 and uyy = −2.
  • The heat equation and the wave equation describe heat flow and vibrations, and they are central to physics and engineering courses at 200 level and above.

Common Mistakes with Partial Differentiation

  • Differentiating the "constant" variable. When finding ∂f/∂x, a term like 5y² is a constant and differentiates to 0, while 3xy² differentiates to 3y².
  • Forgetting the chain rule, for example writing ∂/∂x e^(xy) = e^(xy) instead of y e^(xy).
  • Finding stationary points using only one partial derivative. Both must be zero at the same time.
  • Using D = fxx fyy + (fxy)². The mixed term is subtracted.
  • Using the total differential for large changes. It is an approximation for small changes only.

Partial Differentiation: Practice Questions

  1. Find ∂f/∂x and ∂f/∂y for f(x, y) = x³y² + 2x − y.
  2. For the function in question 1, find the mixed derivative ∂²f/∂x∂y.
  3. Find ∂z/∂x for z = ln(x² + y²).
  4. The area of a rectangle is A = xy. Estimate the percentage error in A if x has a 2% error and y has a 1% error.
  5. Find and classify the stationary point of f(x, y) = 4 − x² − y² + 2x.
  6. Show that u = e^x sin y satisfies the Laplace equation uxx + uyy = 0.

Answers: 1. ∂f/∂x = 3x²y² + 2, and ∂f/∂y = 2x³y − 1. 2. 6x²y. 3. 2x ÷ (x² + y²). 4. About 2% + 1% = 3%. 5. fx = −2x + 2 = 0 and fy = −2y = 0, so the point is (1, 0). fxx = −2, fyy = −2 and fxy = 0, so D = 4 with fxx negative: a maximum, with value 5. 6. uxx = e^x sin y and uyy = −e^x sin y, which add to 0.

Conclusion

Partial differentiation measures how a function of several variables changes when one input varies and the others are held constant: ∂f/∂x treats y as fixed, and ∂f/∂y treats x as fixed. Second derivatives include the mixed derivatives, which are equal for well-behaved functions. The total differential δz ≈ fxδx + fyδy estimates small changes and errors, and the multivariable chain rule handles related rates. Stationary points, where fx = fy = 0, are classified with D = fxxfyy − (fxy)² as minima, maxima or saddle points. These tools lead on to the partial differential equations of physics and engineering.

Related Tutorials