Multivariable calculus

Second partials of ln(1 + x^2 + y^2)

For f(x,y) = ln(1 + x^2 + y^2) write u = 1 + x^2 + y^2. Then f_xx = (2 + 2y^2 - 2x^2)/u^2, f_yy = (2 + 2x^2 - 2y^2)/u^2, and the mixed partial f_xy = f_yx = -4xy/u^2. Adding the two pure second partials gives 4/u^2, which is positive everywhere.

f(x,y)=ln(1+x2+y2)f(x,y) = \ln\bigl(1 + x^{2} + y^{2}\bigr)
fx=2x1+x2+y2\frac{\partial f}{\partial x} = \frac{2x}{1 + x^{2} + y^{2}}
fy=2y1+x2+y2\frac{\partial f}{\partial y} = \frac{2y}{1 + x^{2} + y^{2}}

Second and mixed partials

2fx2=2+2y22x2(1+x2+y2)2\frac{\partial^2 f}{\partial x^2} = \frac{2 + 2y^{2} - 2x^{2}}{\left(1 + x^{2} + y^{2}\right)^{2}}
2fyx=4xy(1+x2+y2)2\frac{\partial^2 f}{\partial y\,\partial x} = \frac{-4xy}{\left(1 + x^{2} + y^{2}\right)^{2}}
2fy2=2+2x22y2(1+x2+y2)2\frac{\partial^2 f}{\partial y^2} = \frac{2 + 2x^{2} - 2y^{2}}{\left(1 + x^{2} + y^{2}\right)^{2}}

Chain rule for the log, quotient rule for the second round

Set u=1+x2+y2u = 1 + x^2 + y^2, which is at least 11 everywhere, so the logarithm is defined on the whole plane and there is no domain restriction to worry about. The log rule gives inner over outer.

fx=2xu,fy=2yu\frac{\partial f}{\partial x} = \frac{2x}{u}, \qquad \frac{\partial f}{\partial y} = \frac{2y}{u}

Differentiating 2x/u2x/u in xx needs the quotient rule, with uu depending on xx through x2x^2.

2fx2=2u2x(2x)u2=2+2y22x2u2\frac{\partial^2 f}{\partial x^2} = \frac{2u - 2x(2x)}{u^{2}} = \frac{2 + 2y^{2} - 2x^{2}}{u^{2}}

For the mixed partial, the numerator 2x2x is a constant with respect to yy, so only the denominator moves. Writing 2xu12x\,u^{-1} and differentiating gives 2xu22y-2x\,u^{-2}\cdot 2y.

2fyx=4xyu2\frac{\partial^2 f}{\partial y\,\partial x} = \frac{-4xy}{u^{2}}

The mistake: expanding u too early, or too late

Two opposite errors show up. The first is forgetting that uu contains x2x^2 and treating the denominator as a constant, which produces fxx=2/uf_{xx} = 2/u and loses the entire second term. The second is expanding uu into 1+x2+y21 + x^2 + y^2 inside the quotient rule and then mishandling the algebra, usually by cancelling 2u2u against 4x24x^2.

Keep uu as a single symbol through the differentiation and substitute only at the end. That is what turns 2u4x22u - 4x^2 into 2+2y22x22 + 2y^2 - 2x^2 in one clean step.

Sanity check at the origin: u=1u = 1, so fxx=2f_{xx} = 2, fyy=2f_{yy} = 2 and fxy=0f_{xy} = 0. The surface is a bowl there, which matches the fact that ln(1+r2)\ln(1 + r^2) increases as you move away from the origin in any direction.

Symmetry and the Laplacian

Because the function depends only on r2=x2+y2r^2 = x^2 + y^2, swapping xx and yy leaves it unchanged, and that symmetry is visible in the answers: fyyf_{yy} is fxxf_{xx} with the roles of xx and yy exchanged. Clairaut symmetry holds too, and differentiating 2y/u2y/u in xx returns the same 4xy/u2-4xy/u^2.

Add the pure second partials and the x2x^2 and y2y^2 terms cancel.

2f=2+2y22x2u2+2+2x22y2u2=4u2>0\nabla^{2} f = \frac{2 + 2y^{2} - 2x^{2}}{u^{2}} + \frac{2 + 2x^{2} - 2y^{2}}{u^{2}} = \frac{4}{u^{2}} > 0

A positive Laplacian everywhere means the average curvature never turns downward, so this surface has no local maximum anywhere. Its one critical point, at the origin, is the local minimum you would expect from a bowl. Note that fxxf_{xx} alone does turn negative once x2>1+y2x^2 > 1 + y^2, so the individual curvatures do change sign even though their sum does not.

Frequently asked questions

Does ln(1 + x^2 + y^2) need a domain restriction?

No. The inside is 1+x2+y21 + x^2 + y^2, which is at least 11 for every real xx and yy, so the logarithm and all of its partial derivatives are defined and continuous on the entire plane.

Why is the mixed partial negative in the first quadrant?

Because fxy=4xy/(1+x2+y2)2f_{xy} = -4xy/(1+x^2+y^2)^2, which is negative when xx and yy have the same sign. Increasing yy makes the surface less steep in the xx direction, since the growing denominator flattens the slope 2x/u2x/u.