Multivariable calculus

Second Partial Derivatives of arctan(xy)

Write Q = 1 + x^2 y^2. For f(x,y) = arctan(xy) the second partials are f_xx = -2xy^3/Q^2, f_yy = -2x^3 y/Q^2, and the mixed partial f_xy = (1 - x^2 y^2)/Q^2. The mixed partial equals 1 at the origin and changes sign along the curves xy = 1 and xy = -1.

f(x,y)=arctan(xy)f(x,y) = \arctan(xy)
fx=y1+x2y2\frac{\partial f}{\partial x} = \frac{y}{1 + x^{2}y^{2}}
fy=x1+x2y2\frac{\partial f}{\partial y} = \frac{x}{1 + x^{2}y^{2}}

Second and mixed partials

2fx2=2xy3(1+x2y2)2\frac{\partial^{2} f}{\partial x^{2}} = \frac{-2xy^{3}}{\left(1 + x^{2}y^{2}\right)^{2}}
2fyx=1x2y2(1+x2y2)2\frac{\partial^{2} f}{\partial y\,\partial x} = \frac{1 - x^{2}y^{2}}{\left(1 + x^{2}y^{2}\right)^{2}}
2fy2=2x3y(1+x2y2)2\frac{\partial^{2} f}{\partial y^{2}} = \frac{-2x^{3}y}{\left(1 + x^{2}y^{2}\right)^{2}}

From the arctangent rule to the second partials

The one variable rule is dduarctanu=11+u2\frac{d}{du}\arctan u = \frac{1}{1 + u^{2}}. With u=xyu = xy the chain rule supplies a factor yy for an xx derivative and a factor xx for a yy derivative. Write Q=1+x2y2Q = 1 + x^{2}y^{2}, which is never zero.

fx=yQ,fy=xQ\frac{\partial f}{\partial x} = \frac{y}{Q}, \qquad \frac{\partial f}{\partial y} = \frac{x}{Q}

For fxxf_{xx} the numerator yy is constant in xx, so differentiate Q1Q^{-1} and multiply. Since Qx=2xy2\frac{\partial Q}{\partial x} = 2xy^{2}, the result carries three powers of yy.

2fx2=y(2xy2Q2)=2xy3Q2\frac{\partial^{2} f}{\partial x^{2}} = y \cdot \left(-\frac{2xy^{2}}{Q^{2}}\right) = \frac{-2xy^{3}}{Q^{2}}

The mixed partial is a real quotient rule, because differentiating yQ\frac{y}{Q} in yy moves both the numerator and the denominator.

2fyx=Qy(2x2y)Q2=1+x2y22x2y2Q2=1x2y2Q2\frac{\partial^{2} f}{\partial y\,\partial x} = \frac{Q - y\left(2x^{2}y\right)}{Q^{2}} = \frac{1 + x^{2}y^{2} - 2x^{2}y^{2}}{Q^{2}} = \frac{1 - x^{2}y^{2}}{Q^{2}}

The mistake students make

The first error is forgetting the inner derivative, writing fx=11+x2y2\frac{\partial f}{\partial x} = \frac{1}{1 + x^{2}y^{2}} with no factor of yy. Every second partial then comes out wrong, and the symmetry check fails immediately.

The second error is treating fxyf_{xy} like fxxf_{xx}, holding the numerator fixed and differentiating only Q1Q^{-1}. That gives 2x2y2Q2-\frac{2x^{2}y^{2}}{Q^{2}} and loses the QQ term from the numerator, which is precisely the piece that makes fxy(0,0)=1f_{xy}(0,0) = 1 rather than 00.

Use the point x=y=1x = y = 1 as a check. There Q=2Q = 2, so the correct values are fxx=24=0.5f_{xx} = -\frac{2}{4} = -0.5 and fxy=04=0f_{xy} = \frac{0}{4} = 0. A formula that does not give zero for the mixed partial on the hyperbola xy=1xy = 1 is wrong.

Symmetry and what the mixed partial shows

Because arctan(xy)\arctan(xy) is unchanged when xx and yy trade places, fyyf_{yy} is fxxf_{xx} with the letters swapped, and the mixed partial must be symmetric in xx and yy on its own. The expression 1x2y2Q2\frac{1 - x^{2}y^{2}}{Q^{2}} passes that test, since it depends only on the product xyxy.

Clairaut's theorem confirms the same thing analytically. Differentiating xQ\frac{x}{Q} in xx gives Qx(2xy2)Q2=1x2y2Q2\frac{Q - x(2xy^{2})}{Q^{2}} = \frac{1 - x^{2}y^{2}}{Q^{2}}, and every derivative here is continuous because Q1Q \geq 1 everywhere.

The sign of fxyf_{xy} tells you how the surface twists. It is positive inside the region xy<1|xy| < 1, zero on the hyperbolas xy=±1xy = \pm 1, and negative beyond them, which is the arctangent flattening toward its horizontal asymptotes.

Frequently asked questions

Why is arctan(xy) smooth everywhere when arctan of a quotient is not?

The denominator 1+x2y21 + x^{2}y^{2} is at least 1 at every point, so nothing divides by zero. A function like arctan(y/x)\arctan(y/x) fails on the line x=0x = 0, where the quotient itself is undefined.

What is the Hessian determinant of arctan(xy)?

It is 4x4y4(1x2y2)2Q4\frac{4x^{4}y^{4} - (1 - x^{2}y^{2})^{2}}{Q^{4}} with Q=1+x2y2Q = 1 + x^{2}y^{2}. At the origin this equals 1-1, so the origin is a saddle point of the surface.