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 f f f with respect to
x x x is
f x ( a , b ) = ∂ f ∂ x ( a , b ) = lim h → 0 f ( a + h , b ) − f ( a , b ) h f_x(a, b) = \frac{\partial f}{\partial x}(a, b) = \lim_{h \to 0} \frac{f(a + h, b) - f(a, b)}{h} f x ( a , b ) = ∂ x ∂ f ( a , b ) = h → 0 lim h f ( a + h , b ) − f ( a , b )
Only x x x moves; y y y stays at b b b . So in practice, treat every other variable
as a constant and differentiate as usual . The partial derivative f y f_y f y is the
same with the roles swapped.
Example 1 — Two partial derivatives
For f ( x , y ) = x 3 + x 2 y 3 − 2 y 2 f(x, y) = x^3 + x^2y^3 - 2y^2 f ( x , y ) = x 3 + x 2 y 3 − 2 y 2 , find f x ( 2 , 1 ) f_x(2, 1) f x ( 2 , 1 ) and f y ( 2 , 1 ) f_y(2, 1) f y ( 2 , 1 ) .
Holding y y y constant, the term − 2 y 2 -2y^2 − 2 y 2 is a constant and x 2 y 3 x^2y^3 x 2 y 3 is a constant
multiple of x 2 x^2 x 2 :
f x = 3 x 2 + 2 x y 3 f y = 3 x 2 y 2 − 4 y f_x = 3x^2 + 2xy^3
\qquad
f_y = 3x^2y^2 - 4y f x = 3 x 2 + 2 x y 3 f y = 3 x 2 y 2 − 4 y At ( 2 , 1 ) (2, 1) ( 2 , 1 ) : f x = 12 + 4 = 16 f_x = 12 + 4 = 16 f x = 12 + 4 = 16 and f y = 12 − 4 = 8 f_y = 12 - 4 = 8 f y = 12 − 4 = 8 .
Fix y = b y = b y = b and the surface z = f ( x , y ) z = f(x, y) z = f ( x , y ) is cut by the vertical plane y = b y = b y = b in
a curve, z = f ( x , b ) z = f(x, b) z = f ( x , b ) , a function of x x x alone. Its ordinary derivative at
x = a x = a x = a is the limit above. So f x ( a , b ) f_x(a, b) f x ( a , b ) is the slope of the slice of the
surface through the point, taken in the x x x direction. Likewise f y ( a , b ) f_y(a, b) f y ( a , b ) is
the slope of the slice in the y y y 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 -1 1 2 -3 -2 -1 1 2 3 4 x z
(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 − x 2 − 2 y 2 f(x, y) = 4 - x^2 - 2y^2 f ( x , y ) = 4 − x 2 − 2 y 2 : f x = − 2 x f_x = -2x f x = − 2 x , so f x ( 1 , 1 ) = − 2 f_x(1, 1) = -2 f x ( 1 , 1 ) = − 2 , matching the
tangent line in the figure. And f y = − 4 y f_y = -4y f y = − 4 y , so f y ( 1 , 1 ) = − 4 f_y(1, 1) = -4 f y ( 1 , 1 ) = − 4 : the slice in
the y y y direction falls twice as steeply.
Example 2 — The chain rule inside
Find the partial derivatives of f ( x , y ) = sin ( x 1 + y ) \displaystyle f(x, y) = \sin\!\left(\frac{x}{1 + y}\right) f ( x , y ) = sin ( 1 + y x ) .
With y y y fixed, the inside x 1 + y \tfrac{x}{1 + y} 1 + y x has derivative 1 1 + y \tfrac{1}{1 + y} 1 + y 1
in x x x . With x x x fixed, it is x ( 1 + y ) − 1 x(1 + y)^{-1} x ( 1 + y ) − 1 , with derivative − x ( 1 + y ) 2 -\tfrac{x}{(1 + y)^2} − ( 1 + y ) 2 x
in y y y :
f x = cos ( x 1 + y ) 1 1 + y f y = − cos ( x 1 + y ) x ( 1 + y ) 2 f_x = \cos\!\left(\frac{x}{1 + y}\right)\frac{1}{1 + y}
\qquad
f_y = -\cos\!\left(\frac{x}{1 + y}\right)\frac{x}{(1 + y)^2} f x = cos ( 1 + y x ) 1 + y 1 f y = − cos ( 1 + y x ) ( 1 + y ) 2 x
Example 3 — Second partial derivatives
Find all second partial derivatives of f ( x , y ) = x 3 + x 2 y 3 − 2 y 2 f(x, y) = x^3 + x^2y^3 - 2y^2 f ( x , y ) = x 3 + x 2 y 3 − 2 y 2 .
From f x = 3 x 2 + 2 x y 3 f_x = 3x^2 + 2xy^3 f x = 3 x 2 + 2 x y 3 and f y = 3 x 2 y 2 − 4 y f_y = 3x^2y^2 - 4y f y = 3 x 2 y 2 − 4 y :
f x x = 6 x + 2 y 3 f x y = 6 x y 2 f y x = 6 x y 2 f y y = 6 x 2 y − 4 f_{xx} = 6x + 2y^3
\qquad
f_{xy} = 6xy^2
\qquad
f_{yx} = 6xy^2
\qquad
f_{yy} = 6x^2y - 4 f xx = 6 x + 2 y 3 f x y = 6 x y 2 f y x = 6 x y 2 f y y = 6 x 2 y − 4 The mixed partials agree. Clairaut’s theorem guarantees this whenever the
second partial derivatives are continuous.
Example 4 — A rate in context
The temperature on a metal plate is T ( x , y ) = 100 − x 2 − 3 y 2 T(x, y) = 100 - x^2 - 3y^2 T ( x , y ) = 100 − x 2 − 3 y 2 degrees, with
x x x and y y y in centimeters. At ( 2 , 1 ) (2, 1) ( 2 , 1 ) , how fast does the temperature change
moving east, in the x x x direction? Moving north?
T x = − 2 x T_x = -2x T x = − 2 x and T y = − 6 y T_y = -6y T y = − 6 y , so T x ( 2 , 1 ) = − 4 T_x(2, 1) = -4 T x ( 2 , 1 ) = − 4 and T y ( 2 , 1 ) = − 6 T_y(2, 1) = -6 T y ( 2 , 1 ) = − 6 . Moving
east the temperature falls about 4 4 4 degrees per centimeter; moving north it
falls about 6 6 6 .
Example 5 — Three variables
Find f z f_z f z for f ( x , y , z ) = x y 2 z 3 f(x, y, z) = xy^2z^3 f ( x , y , z ) = x y 2 z 3 , and evaluate it at ( 1 , 1 , 2 ) (1, 1, 2) ( 1 , 1 , 2 ) .
Hold x x x and y y y fixed: f z = 3 x y 2 z 2 f_z = 3xy^2z^2 f z = 3 x y 2 z 2 , and f z ( 1 , 1 , 2 ) = 3 ⋅ 1 ⋅ 1 ⋅ 4 = 12 f_z(1, 1, 2) = 3 \cdot 1 \cdot 1 \cdot 4 = 12 f z ( 1 , 1 , 2 ) = 3 ⋅ 1 ⋅ 1 ⋅ 4 = 12 .
Common mistake
Differentiating the variable being held fixed. In f x f_x f x for x 2 y 3 x^2y^3 x 2 y 3 , the
factor y 3 y^3 y 3 is a constant: the answer is 2 x y 3 2xy^3 2 x y 3 , not 2 x ⋅ 3 y 2 2x \cdot 3y^2 2 x ⋅ 3 y 2 .
Common mistake
Treating a constant term as zero too early. In f x f_x f x for x 2 y 3 − 2 y 2 x^2y^3 - 2y^2 x 2 y 3 − 2 y 2 ,
the term − 2 y 2 -2y^2 − 2 y 2 differentiates to 0 0 0 because it contains no x x x . The term
x 2 y 3 x^2y^3 x 2 y 3 does contain x x x , so it survives as 2 x y 3 2xy^3 2 x y 3 .
Common mistake
Mixing up the order in f x y f_{xy} f x y . The subscripts read left to right:
differentiate first in x x x , then in y y y . Clairaut’s theorem makes the two orders
agree for well-behaved functions, but the notation still means something
definite.
Find f x f_x f x and f y f_y f y for f ( x , y ) = 3 x 2 y − 5 y 3 f(x, y) = 3x^2y - 5y^3 f ( x , y ) = 3 x 2 y − 5 y 3 , and evaluate them at ( 1 , 2 ) (1, 2) ( 1 , 2 ) .
Answer
f x = 6 x y f_x = 6xy f x = 6 x y , f y = 3 x 2 − 15 y 2 f_y = 3x^2 - 15y^2 f y = 3 x 2 − 15 y 2 ; at ( 1 , 2 ) (1, 2) ( 1 , 2 ) : 12 12 12 and − 57 -57 − 57
Full solution
Hold y y y fixed for f x f_x f x and x x x fixed for f y f_y f y . Then 6 ⋅ 1 ⋅ 2 = 12 6 \cdot 1 \cdot 2 = 12 6 ⋅ 1 ⋅ 2 = 12 and 3 − 60 = − 57 3 - 60 = -57 3 − 60 = − 57 .
Find f x f_x f x for f ( x , y ) = e x y f(x, y) = e^{xy} f ( x , y ) = e x y , and evaluate it at ( 0 , 3 ) (0, 3) ( 0 , 3 ) .
Answer
f x = y e x y f_x = ye^{xy} f x = y e x y ; 3 3 3
Full solution
The chain rule multiplies by the x x x -derivative of x y xy x y , which is y y y . At ( 0 , 3 ) (0, 3) ( 0 , 3 ) : 3 e 0 = 3 3e^0 = 3 3 e 0 = 3 .
Find both partial derivatives of f ( x , y ) = x y f(x, y) = \tfrac{x}{y} f ( x , y ) = y x at ( 4 , 2 ) (4, 2) ( 4 , 2 ) .
Answer
f x = 1 2 f_x = \tfrac{1}{2} f x = 2 1 and f y = − 1 f_y = -1 f y = − 1
Full solution
f x = 1 y f_x = \tfrac{1}{y} f x = y 1 and f y = − x y 2 f_y = -\tfrac{x}{y^2} f y = − y 2 x . At ( 4 , 2 ) (4, 2) ( 4 , 2 ) : 1 2 \tfrac{1}{2} 2 1 and − 4 4 -\tfrac{4}{4} − 4 4 .
Find f x f_x f x for f ( x , y ) = ln ( x 2 + y 2 ) f(x, y) = \ln(x^2 + y^2) f ( x , y ) = ln ( x 2 + y 2 ) at ( 1 , 1 ) (1, 1) ( 1 , 1 ) .
Answer
1 1 1
Full solution
f x = 2 x x 2 + y 2 f_x = \tfrac{2x}{x^2 + y^2} f x = x 2 + y 2 2 x , which is 2 2 \tfrac{2}{2} 2 2 at ( 1 , 1 ) (1, 1) ( 1 , 1 ) .
Find f x y f_{xy} f x y for f ( x , y ) = x 2 sin y f(x, y) = x^2\sin y f ( x , y ) = x 2 sin y .
Answer
2 x cos y 2x\cos y 2 x cos y
Full solution
f x = 2 x sin y f_x = 2x\sin y f x = 2 x sin y , then differentiate in y y y . Starting with f y = x 2 cos y f_y = x^2\cos y f y = x 2 cos y and differentiating in x x x gives the same.
Find f x x f_{xx} f xx and f y y f_{yy} f y y for f ( x , y ) = x 4 − 3 x 2 y + y 2 f(x, y) = x^4 - 3x^2y + y^2 f ( x , y ) = x 4 − 3 x 2 y + y 2 .
Answer
f x x = 12 x 2 − 6 y f_{xx} = 12x^2 - 6y f xx = 12 x 2 − 6 y and f y y = 2 f_{yy} = 2 f y y = 2
Full solution
f x = 4 x 3 − 6 x y f_x = 4x^3 - 6xy f x = 4 x 3 − 6 x y and f y = − 3 x 2 + 2 y f_y = -3x^2 + 2y f y = − 3 x 2 + 2 y . Differentiate each again in the same variable.
For f ( x , y ) = 4 − x 2 − 2 y 2 f(x, y) = 4 - x^2 - 2y^2 f ( x , y ) = 4 − x 2 − 2 y 2 , find f y ( 1 , 1 ) f_y(1, 1) f y ( 1 , 1 ) and say what it means.
Answer
− 4 -4 − 4 ; the slice x = 1 x = 1 x = 1 falls with slope − 4 -4 − 4 at y = 1 y = 1 y = 1 .
Full solution
f y = − 4 y f_y = -4y f y = − 4 y . In the plane x = 1 x = 1 x = 1 the surface is z = 3 − 2 y 2 z = 3 - 2y^2 z = 3 − 2 y 2 , whose slope at y = 1 y = 1 y = 1 is − 4 -4 − 4 .
For V ( r , h ) = π r 2 h V(r, h) = \pi r^2h V ( r , h ) = π r 2 h , find V r V_r V r and V h V_h V h at r = 3 r = 3 r = 3 , h = 10 h = 10 h = 10 .
Answer
V r = 60 π V_r = 60\pi V r = 60 π and V h = 9 π V_h = 9\pi V h = 9 π
Full solution
V r = 2 π r h V_r = 2\pi rh V r = 2 π r h and V h = π r 2 V_h = \pi r^2 V h = π r 2 . Widening the cylinder changes its volume more than lengthening it, at this size.
Find f z f_z f z for f ( x , y , z ) = x 2 + y z 2 f(x, y, z) = x^2 + yz^2 f ( x , y , z ) = x 2 + y z 2 at ( 1 , 2 , 3 ) (1, 2, 3) ( 1 , 2 , 3 ) .
Answer
12 12 12
Full solution
f z = 2 y z = 2 ⋅ 2 ⋅ 3 f_z = 2yz = 2 \cdot 2 \cdot 3 f z = 2 y z = 2 ⋅ 2 ⋅ 3 .
A student finds f x = 2 x ⋅ 3 y 2 f_x = 2x \cdot 3y^2 f x = 2 x ⋅ 3 y 2 for f ( x , y ) = x 2 y 3 f(x, y) = x^2y^3 f ( x , y ) = x 2 y 3 . What went wrong?
Hint
What happens to y 3 y^3 y 3 when y y y is held constant?
Answer
The factor y 3 y^3 y 3 is a constant for f x f_x f x and should not be differentiated. f x = 2 x y 3 f_x = 2xy^3 f x = 2 x y 3 .
Full solution
The student differentiated both factors, as if taking a total derivative. For f x f_x f x , only x x x varies, so y 3 y^3 y 3 rides along as a coefficient.