Multivariable calculus

Partial Derivatives of x^2y + y^2z + z^2x

For f(x,y,z) = x^2 y + y^2 z + z^2 x, the partial derivative with respect to x is 2xy + z^2, with respect to y is x^2 + 2yz, and with respect to z is y^2 + 2zx. Each one treats the other two variables as constants, so the single term that lacks that variable contributes nothing.

f(x,y,z)=x2y+y2z+z2xf(x,y,z) = x^2 y + y^2 z + z^2 x
fx=2xy+z2\frac{\partial f}{\partial x} = 2xy + z^2
fy=x2+2yz\frac{\partial f}{\partial y} = x^2 + 2yz
fz=y2+2zx\frac{\partial f}{\partial z} = y^2 + 2zx

Differentiate one variable at a time

A partial derivative in three variables is still an ordinary one variable derivative. To find fx\frac{\partial f}{\partial x}, freeze yy and zz at whatever values they hold and differentiate what is left as a function of xx alone.

Go term by term. In x2yx^2 y the factor yy is just a constant multiplier, so that term gives 2xy2xy. The term y2zy^2 z contains no xx at all, so it gives 00. In z2xz^2 x the factor z2z^2 is constant, and the derivative of xx is 11, so that term gives z2z^2.

fx=2xy+0+z2=2xy+z2\frac{\partial f}{\partial x} = 2xy + 0 + z^2 = 2xy + z^2

The function is cyclic: swapping xyzxx \to y \to z \to x returns the same expression. That means you can rotate the answer instead of redoing the work, which is a genuine shortcut and also a way to catch an arithmetic slip.

fy=x2+2yz,fz=y2+2zx\frac{\partial f}{\partial y} = x^2 + 2yz, \qquad \frac{\partial f}{\partial z} = y^2 + 2zx

The mistake: treating a constant as a zero

Students often decide that y2zy^2 z vanishes when differentiating with respect to yy, on the grounds that zz is being held constant. Constants multiply, they do not delete. Read the term as zy2z \cdot y^2, a constant times y2y^2, and its yy derivative is 2yz2yz.

The mirror image of that error is expecting every partial derivative to have three terms because ff has three terms. Here exactly one term is free of each variable, so each partial derivative has two terms. Count the surviving terms deliberately rather than by habit.

  • A term containing the variable: differentiate it, keeping the other letters as constant factors.
  • A term not containing the variable: it contributes 00.
  • A constant factor never disappears, it multiplies the derivative.

A check that catches a wrong coefficient

Every term of ff has total degree three, so ff is homogeneous of degree three and Euler's relation holds. It ties all three partial derivatives to the original function, so one substitution audits the whole answer.

xfx+yfy+zfz=3fx\frac{\partial f}{\partial x} + y\frac{\partial f}{\partial y} + z\frac{\partial f}{\partial z} = 3f

Test it at (1,2,3)(1,2,3). There f=23f = 23, and the partials come out to 1313, 1313 and 1010. The left side is 1(13)+2(13)+3(10)=691(13) + 2(13) + 3(10) = 69, and the right side is 3×23=693 \times 23 = 69. Had you written xyxy instead of 2xy2xy, the two sides would disagree and you would know at once.

Frequently asked questions

How do I evaluate the gradient at a specific point?

Differentiate first, substitute second. At (1,2,3)(1,2,3) the gradient is 13,13,10\langle 13, 13, 10 \rangle. If you substitute the numbers into ff before differentiating, you turn ff into a constant and every derivative collapses to zero.

Do the mixed partials come out the same in either order?

Yes. A polynomial is smooth everywhere, so Clairaut's theorem applies. Differentiating 2xy+z22xy + z^2 with respect to yy gives 2x2x, and differentiating x2+2yzx^2 + 2yz with respect to xx also gives 2x2x.