Multivariable calculus

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

For f(x, y) = ln(x^2 + y^2 + 1), the partial with respect to x is 2x/(x^2 + y^2 + 1) and the partial with respect to y is 2y/(x^2 + y^2 + 1). Each is the inside derivative over the inside, and the plus 1 keeps the argument positive, so both hold on the whole plane.

ln ⁣(x2+y2+1)\ln\!\left(x^{2}+y^{2}+1\right)
2xx2+y2+1\frac{2x}{x^{2}+y^{2}+1}
2yx2+y2+1\frac{2y}{x^{2}+y^{2}+1}

Use the inside derivative over the inside

For a logarithm of anything, xln(u)=1uux\frac{\partial}{\partial x}\ln(u) = \frac{1}{u}\frac{\partial u}{\partial x}. Here u=x2+y2+1u = x^{2}+y^{2}+1. Holding yy fixed makes both y2y^{2} and 11 constants, so ux=2x\frac{\partial u}{\partial x} = 2x.

fx=2xx2+y2+1\frac{\partial f}{\partial x} = \frac{2x}{x^{2}+y^{2}+1}
fy=2yx2+y2+1\frac{\partial f}{\partial y} = \frac{2y}{x^{2}+y^{2}+1}

At (1,2)(1,2) the inside is 1+4+1=61 + 4 + 1 = 6, so the partials are 26=13\frac{2}{6} = \frac{1}{3} and 46=23\frac{4}{6} = \frac{2}{3}. The denominator is shared, which makes the ratio of the two slopes just the ratio x:yx : y.

The mistake: splitting the logarithm of a sum

  • ln(x2+y2+1)\ln(x^{2}+y^{2}+1) is not ln(x2)+ln(y2)+ln(1)\ln(x^{2}) + \ln(y^{2}) + \ln(1). Logarithms split across products and quotients, never across sums, so there is no shortcut past the chain rule here.
  • Writing fx=1x2+y2+1\frac{\partial f}{\partial x} = \frac{1}{x^{2}+y^{2}+1} forgets the inside derivative 2x2x. That version would be nonzero on the whole yy-axis, where the true slope in xx is 00.
  • Writing 2x+2yx2+y2+1\frac{2x+2y}{x^{2}+y^{2}+1} differentiates the frozen variable as well.

Test any candidate at the origin. The surface has its lowest point there, f(0,0)=0f(0,0) = 0, so both partials must be 00. The correct formulas give 01=0\frac{0}{1} = 0; the version missing the inside derivative gives 11.

Domain and the radial picture

The argument x2+y2+1x^{2}+y^{2}+1 is at least 11, so it is never zero or negative and no domain restriction is needed. This is why courses use the plus 1 version: ln(x2+y2)\ln(x^{2}+y^{2}) has partials of the same shape, 2xx2+y2\frac{2x}{x^{2}+y^{2}} and 2yx2+y2\frac{2y}{x^{2}+y^{2}}, but both of those blow up at the origin, and ln(xy)\ln(xy) is undefined on half the plane.

f=2x2+y2+1(x,y)\nabla f = \frac{2}{x^{2}+y^{2}+1}\,(x,\,y)

The gradient is a positive multiple of the position vector, so steepest ascent is straight away from the origin and the level curves are circles. The gradient length is 2r1+r2\frac{2r}{1+r^{2}}, which is largest on the unit circle r=1r = 1, where it equals exactly 11.

Frequently asked questions

Can I split ln(x^2 + y^2 + 1) into separate logarithms first?

No. The logarithm of a sum does not split; only products and quotients do. Differentiate it as ln(u) with u = x^2 + y^2 + 1 and use the inside derivative over the inside.

Does this formula need a domain restriction?

No. The argument x^2 + y^2 + 1 is at least 1 for every point, so the function and both partials are defined everywhere in the plane, with no excluded points.