Multivariable calculus

Partial Derivatives of x ln(x^2 + y^2 + 1)

For f(x,y) = x ln(x^2 + y^2 + 1), the partial with respect to x is ln(x^2 + y^2 + 1) + 2x^2/(x^2 + y^2 + 1), and the partial with respect to y is 2xy/(x^2 + y^2 + 1). The x-partial needs the product rule; the y-partial needs only the chain rule.

f(x,y)=xln ⁣(x2+y2+1)f(x,y) = x \ln\!\left(x^{2} + y^{2} + 1\right)
fx=ln ⁣(x2+y2+1)+2x2x2+y2+1\frac{\partial f}{\partial x} = \ln\!\left(x^{2}+y^{2}+1\right) + \frac{2x^{2}}{x^{2}+y^{2}+1}
fy=2xyx2+y2+1\frac{\partial f}{\partial y} = \frac{2xy}{x^{2}+y^{2}+1}

Why the +1 matters, and how to differentiate

The argument x2+y2+1x^{2}+y^{2}+1 is at least 1 everywhere, so the logarithm is defined on the whole plane and the function is smooth. That is the point of the +1+1: without it the log blows up at the origin and the partials would not exist there.

For fx\frac{\partial f}{\partial x}, the function is a product of xx and ln(x2+y2+1)\ln(x^{2}+y^{2}+1), and both factors depend on xx. Apply the product rule, then the chain rule with ddulnu=1u\frac{d}{du}\ln u = \frac{1}{u} on the second piece.

fx=ln ⁣(x2+y2+1)+x2xx2+y2+1\frac{\partial f}{\partial x} = \ln\!\left(x^{2}+y^{2}+1\right) + x \cdot \frac{2x}{x^{2}+y^{2}+1}
fx=ln ⁣(x2+y2+1)+2x2x2+y2+1\frac{\partial f}{\partial x} = \ln\!\left(x^{2}+y^{2}+1\right) + \frac{2x^{2}}{x^{2}+y^{2}+1}

For fy\frac{\partial f}{\partial y} the leading xx is a constant, so only the log is differentiated. The inside has yy-derivative 2y2y, and the log contributes the reciprocal of the inside.

fy=2xyx2+y2+1\frac{\partial f}{\partial y} = \frac{2xy}{x^{2}+y^{2}+1}

The mistake: turning the log into a reciprocal too early

Students often write fx=x2xx2+y2+1\frac{\partial f}{\partial x} = \frac{x \cdot 2x}{x^{2}+y^{2}+1} and stop. That is the product rule with the first term missing. The derivative of xx is 1, and 1 times ln(x2+y2+1)\ln(x^{2}+y^{2}+1) is not zero, so the log term survives into the answer.

  • The xx-partial keeps a bare logarithm term. If your answer has no log in it, you dropped the first product rule term.
  • The yy-partial has no logarithm term, because the factor being differentiated is the log itself and the other factor is constant.
  • The chain rule numerator is 2x2x for the xx-partial and 2y2y for the yy-partial. Mixing them up is the other frequent slip.

One more check: swap yy for y-y in the original function and nothing changes, so ff is even in yy. An even function has an odd yy-partial, and 2xyx2+y2+1\frac{2xy}{x^{2}+y^{2}+1} does flip sign when yy does. Symmetry checks like this catch sign errors fast.

Evaluating on the x-axis

At (1,0)(1,0) the inside is 22, so fx(1,0)=ln2+22=ln2+1\frac{\partial f}{\partial x}(1,0) = \ln 2 + \frac{2}{2} = \ln 2 + 1, roughly 1.6931.693.

f(1,0)=ln2+1,  0\nabla f(1,0) = \langle \ln 2 + 1,\; 0 \rangle

The yy-component is zero along the entire xx-axis, since every term in 2xyx2+y2+1\frac{2xy}{x^{2}+y^{2}+1} carries a factor of yy. Geometrically the xx-axis is a ridge line of the surface in the yy direction.

Frequently asked questions

Can I use log rules to simplify before differentiating?

There is nothing to split here: ln(x2+y2+1)\ln(x^{2}+y^{2}+1) is a log of a sum, and logs do not distribute over sums. Only a log of a product or a quotient can be broken up. Differentiate as it stands with the product and chain rules.

Is the function defined everywhere?

Yes. The argument x2+y2+1x^{2}+y^{2}+1 has minimum value 1 at the origin and grows outward, so it is always positive and the logarithm is always defined. The denominators in both partials are the same quantity, so they never vanish either.