Multivariable calculus

Partial Derivatives of xy ln(z^2 + 1)

For f(x,y,z) = xy ln(z^2 + 1), the partial derivative with respect to x is y ln(z^2 + 1), with respect to y is x ln(z^2 + 1), and with respect to z is 2xyz divided by (z^2 + 1). Only the z partial needs the chain rule, since the logarithm is a constant factor for the other two.

f(x,y,z)=xyln(z2+1)f(x,y,z) = xy\ln\left(z^2 + 1\right)
fx=yln(z2+1)\frac{\partial f}{\partial x} = y\ln\left(z^2 + 1\right)
fy=xln(z2+1)\frac{\partial f}{\partial y} = x\ln\left(z^2 + 1\right)
fz=2xyzz2+1\frac{\partial f}{\partial z} = \frac{2xyz}{z^2 + 1}

Identify the constant factor first

Before differentiating, look at which factors involve the variable at hand. For fx\frac{\partial f}{\partial x} the block yln(z2+1)y\ln(z^2+1) contains no xx, so the whole thing is one constant multiplier and the derivative of the remaining xx is 11.

fx=yln(z2+1),fy=xln(z2+1)\frac{\partial f}{\partial x} = y\ln\left(z^2 + 1\right), \qquad \frac{\partial f}{\partial y} = x\ln\left(z^2 + 1\right)

The zz partial is the only one that does real work. Now xyxy is the constant and you differentiate ln(z2+1)\ln(z^2+1) by the chain rule: one over the inside, times the derivative of the inside, which is 2z2z.

fz=xy2zz2+1=2xyzz2+1\frac{\partial f}{\partial z} = xy\cdot\frac{2z}{z^2 + 1} = \frac{2xyz}{z^2 + 1}

The mistake: differentiating a constant block anyway

Seeing a logarithm makes many students differentiate it no matter which variable they were asked about, producing something like yz2+1\frac{y}{z^2+1} for the xx partial. The logarithm has no xx in it, so with respect to xx it is a number, and numbers ride along untouched.

The reverse mistake shows up in the zz partial, where students drop the xyxy because those variables are held constant. Held constant means it stays as a multiplier. If you find yourself with an answer to a zz question that has no xx or yy in it, something has been deleted that should have survived.

  • For the xx and yy partials, ln(z2+1)\ln(z^2+1) is a constant factor and is copied down.
  • For the zz partial, xyxy is a constant factor and is copied down.
  • Only one factor is ever differentiated here, because the variables never share a factor.

Checking the answers at a point

Take (2,3,1)(2,3,1). There z2+1=2z^2+1 = 2, so ln(z2+1)=ln20.6931\ln(z^2+1) = \ln 2 \approx 0.6931. That gives fx=3ln22.0794f_x = 3\ln 2 \approx 2.0794 and fy=2ln21.3863f_y = 2\ln 2 \approx 1.3863, while fz=2(2)(3)(1)2=6f_z = \frac{2(2)(3)(1)}{2} = 6.

Two structural facts help confirm the shape of the answers. Multiplying the first two partial derivatives by their own variables both return ff itself, since xfx=yfy=xyln(z2+1)x f_x = y f_y = xy\ln(z^2+1). And on the plane z=0z = 0 the logarithm is ln1=0\ln 1 = 0, so all three partial derivatives vanish there, which is why the whole plane z=0z = 0 consists of critical points.

Frequently asked questions

Why is ln(z^2 + 1) safe to use for every real z?

The logarithm needs a positive argument, and z2+1z^2 + 1 is at least 11 for every real zz. So there is no domain restriction, unlike lnz\ln z which would force z>0z > 0.

What is the mixed partial with respect to x and then y?

Differentiate fx=yln(z2+1)\frac{\partial f}{\partial x} = y\ln(z^2+1) with respect to yy, which gives ln(z2+1)\ln(z^2+1). Doing it in the other order gives the same result, as Clairaut's theorem requires.