Multivariable Calculus · Undergraduate

Partial Derivatives

Quick answer

A partial derivative measures how a function of several variables changes when one input moves and the others stay fixed. To compute ∂f/∂x, treat every other variable as a constant and differentiate with the ordinary rules. Geometrically, f_x(a, b) is the slope of the curve cut from the surface z = f(x, y) by the plane y = b. Differentiating again gives second partial derivatives, and for the functions met in practice the two mixed partials f_xy and f_yx are equal, which is Clairaut's theorem.

What you'll learn

  • Compute first partial derivatives with the usual rules
  • Interpret a partial derivative as the slope of a slice
  • Compute second partial derivatives, including mixed ones
  • Use partial derivatives as rates of change in context

One variable at a time

A function of two variables can change in many directions at once. The simplest way to measure change is to move in one coordinate direction and hold the other coordinate still. The partial derivative of ff with respect to xx is

fx(a,b)=∂f∂x(a,b)=lim⁡h→0f(a+h,b)−f(a,b)hf_x(a, b) = \frac{\partial f}{\partial x}(a, b) = \lim_{h \to 0} \frac{f(a + h, b) - f(a, b)}{h}

Only xx moves; yy stays at bb. So in practice, treat every other variable as a constant and differentiate as usual. The partial derivative fyf_y is the same with the roles swapped.

Why a partial derivative is a slope

Fix y=by = b and the surface z=f(x,y)z = f(x, y) is cut by the vertical plane y=by = b in a curve, z=f(x,b)z = f(x, b), a function of xx alone. Its ordinary derivative at x=ax = a is the limit above. So fx(a,b)f_x(a, b) is the slope of the slice of the surface through the point, taken in the xx direction. Likewise fy(a,b)f_y(a, b) is the slope of the slice in the yy direction.

The slice y = 1 of z = 4 − x² − 2y², with its tangent line at x = 1 In the plane y = 1 the surface z = 4 − x² − 2y² leaves the downward parabola z = 2 − x². At x = 1 the parabola has height 1, and its tangent line there, z = 3 − 2x, has slope −2, which is f_x(1, 1). -2-112-3-2-11234xz (1, 1)
  • slice: z = 2 − x²
  • tangent, slope −2
The slice y = 1 of z = 4 − x² − 2y², with its tangent line at x = 1

For f(x,y)=4−x2−2y2f(x, y) = 4 - x^2 - 2y^2: fx=−2xf_x = -2x, so fx(1,1)=−2f_x(1, 1) = -2, matching the tangent line in the figure. And fy=−4yf_y = -4y, so fy(1,1)=−4f_y(1, 1) = -4: the slice in the yy direction falls twice as steeply.

Worked examples

Common mistakes

Practice problems

  1. Find fxf_x and fyf_y for f(x,y)=3x2y−5y3f(x, y) = 3x^2y - 5y^3, and evaluate them at (1,2)(1, 2).

    Answer

    fx=6xyf_x = 6xy, fy=3x2−15y2f_y = 3x^2 - 15y^2; at (1,2)(1, 2): 1212 and −57-57

    Full solution

    Hold yy fixed for fxf_x and xx fixed for fyf_y. Then 6⋅1⋅2=126 \cdot 1 \cdot 2 = 12 and 3−60=−573 - 60 = -57.

  2. Find fxf_x for f(x,y)=exyf(x, y) = e^{xy}, and evaluate it at (0,3)(0, 3).

    Answer

    fx=yexyf_x = ye^{xy}; 33

    Full solution

    The chain rule multiplies by the xx-derivative of xyxy, which is yy. At (0,3)(0, 3): 3e0=33e^0 = 3.

  3. Find both partial derivatives of f(x,y)=xyf(x, y) = \tfrac{x}{y} at (4,2)(4, 2).

    Answer

    fx=12f_x = \tfrac{1}{2} and fy=−1f_y = -1

    Full solution

    fx=1yf_x = \tfrac{1}{y} and fy=−xy2f_y = -\tfrac{x}{y^2}. At (4,2)(4, 2): 12\tfrac{1}{2} and −44-\tfrac{4}{4}.

  4. Find fxf_x for f(x,y)=ln⁡(x2+y2)f(x, y) = \ln(x^2 + y^2) at (1,1)(1, 1).

    Answer

    11

    Full solution

    fx=2xx2+y2f_x = \tfrac{2x}{x^2 + y^2}, which is 22\tfrac{2}{2} at (1,1)(1, 1).

  5. Find fxyf_{xy} for f(x,y)=x2sin⁡yf(x, y) = x^2\sin y.

    Answer

    2xcos⁡y2x\cos y

    Full solution

    fx=2xsin⁡yf_x = 2x\sin y, then differentiate in yy. Starting with fy=x2cos⁡yf_y = x^2\cos y and differentiating in xx gives the same.

  6. Find fxxf_{xx} and fyyf_{yy} for f(x,y)=x4−3x2y+y2f(x, y) = x^4 - 3x^2y + y^2.

    Answer

    fxx=12x2−6yf_{xx} = 12x^2 - 6y and fyy=2f_{yy} = 2

    Full solution

    fx=4x3−6xyf_x = 4x^3 - 6xy and fy=−3x2+2yf_y = -3x^2 + 2y. Differentiate each again in the same variable.

  7. For f(x,y)=4−x2−2y2f(x, y) = 4 - x^2 - 2y^2, find fy(1,1)f_y(1, 1) and say what it means.

    Answer

    −4-4; the slice x=1x = 1 falls with slope −4-4 at y=1y = 1.

    Full solution

    fy=−4yf_y = -4y. In the plane x=1x = 1 the surface is z=3−2y2z = 3 - 2y^2, whose slope at y=1y = 1 is −4-4.

  8. For V(r,h)=πr2hV(r, h) = \pi r^2h, find VrV_r and VhV_h at r=3r = 3, h=10h = 10.

    Answer

    Vr=60πV_r = 60\pi and Vh=9πV_h = 9\pi

    Full solution

    Vr=2πrhV_r = 2\pi rh and Vh=πr2V_h = \pi r^2. Widening the cylinder changes its volume more than lengthening it, at this size.

  9. Find fzf_z for f(x,y,z)=x2+yz2f(x, y, z) = x^2 + yz^2 at (1,2,3)(1, 2, 3).

    Answer

    1212

    Full solution

    fz=2yz=2⋅2⋅3f_z = 2yz = 2 \cdot 2 \cdot 3.

  10. A student finds fx=2x⋅3y2f_x = 2x \cdot 3y^2 for f(x,y)=x2y3f(x, y) = x^2y^3. What went wrong?

    Hint

    What happens to y3y^3 when yy is held constant?

    Answer

    The factor y3y^3 is a constant for fxf_x and should not be differentiated. fx=2xy3f_x = 2xy^3.

    Full solution

    The student differentiated both factors, as if taking a total derivative. For fxf_x, only xx varies, so y3y^3 rides along as a coefficient.

Frequently asked questions

How do you take a partial derivative?

Differentiate with respect to one variable while treating every other variable as a constant. All the rules of single-variable calculus apply.

What does a partial derivative mean geometrically?

f_x(a, b) is the slope, in the x direction, of the curve where the surface z = f(x, y) meets the vertical plane y = b.

What notations are used for partial derivatives?

∂f/∂x, f_x and ∂z/∂x all mean the partial derivative with respect to x. The curly ∂ signals that other variables are being held fixed.

What are mixed partial derivatives?

Second derivatives taken with respect to two different variables, such as f_xy, which differentiates first in x and then in y.

Does the order of differentiation matter?

Not when the second partial derivatives are continuous, which covers nearly every function met in practice. Clairaut's theorem then gives f_xy = f_yx.

What to learn next