Multivariable calculus

Partial Derivatives of arctan(xy)

For f(x, y) = arctan(xy), the partial derivative with respect to x is y divided by 1 plus x squared y squared, and the partial derivative with respect to y is x divided by the same denominator. The inverse tangent contributes 1 over 1 plus the inside squared, and the chain rule contributes y or x.

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

The inverse tangent rule with an inside function

The single variable fact you need is dduarctanu=11+u2\frac{d}{du}\arctan u = \frac{1}{1+u^2}. With u=xyu = xy the denominator becomes 1+(xy)2=1+x2y21 + (xy)^2 = 1 + x^2y^2, and it is the same for both partials because it depends only on the inside.

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

At (1,1)(1,1) both partials equal 12\frac{1}{2}. The denominator never vanishes, so unlike most quotient answers this one is defined on the whole plane.

The mistake: squaring the wrong thing

The usual slip is writing the denominator as 1+xy21 + xy^2 or 1+x2y1 + x^2y, dropping half of the square. The rule squares the entire inside, so (xy)2=x2y2(xy)^2 = x^2y^2 and both variables appear squared.

  • Another version of the error is 1+x2+y21 + x^2 + y^2, which comes from squaring the terms separately as if the inside were a sum.
  • A quick check: on the line y=1y = 1 the function is arctanx\arctan x, so fx\frac{\partial f}{\partial x} must reduce to 11+x2\frac{1}{1+x^2} there. Substituting y=1y=1 into y1+x2y2\frac{y}{1+x^2y^2} gives exactly that.

What the gradient tells you about the shape

Both partials share a denominator, so f=11+x2y2(y,x)\nabla f = \frac{1}{1+x^2y^2}(y, x). The denominator is positive everywhere, so the direction of steepest ascent is always (y,x)(y,x) itself. The gradient of sin(xy)\sin(xy) lines up with the same vector, though that one reverses each time cos(xy)\cos(xy) changes sign. Both functions depend on xx and yy only through the product, which is what fixes the direction.

The size of the gradient tells a different story. Freeze x=2x = 2 and walk out in yy: the partial 21+4y2\frac{2}{1+4y^2} falls from 0.40.4 at y=1y = 1 to about 0.01980.0198 at y=5y = 5. That is the arctangent saturating along that line. Its values are trapped between π2-\frac{\pi}{2} and π2\frac{\pi}{2}, and a bounded function running out of room has to level off.

That makes arctan(xy)\arctan(xy) a standard soft threshold in modelling: hold one input fixed and the other traces an S shaped response that flattens once you push it far enough.

Do not turn that into a claim about the whole surface. On the hyperbola xy=10xy = 10 the point (10,10)\left(\sqrt{10},\sqrt{10}\right) has both partials near 0.0310.031, but (100,0.1)(100, 0.1) sits on the same curve with fy=1001010.99\frac{\partial f}{\partial y} = \frac{100}{101} \approx 0.99. The product alone does not fix the steepness, because the numerators yy and xx can be as lopsided as you like.

Frequently asked questions

Is the function differentiable everywhere?

Yes. The denominator 1+x2y21 + x^2y^2 is at least 11 at every point, so both partials are continuous on the whole plane and the function is differentiable there.

Why are the two partials mirror images of each other?

Because f(x,y)=f(y,x)f(x,y) = f(y,x). Swapping the variables leaves the function alone, so it must swap the two partials, and indeed y1+x2y2\frac{y}{1+x^2y^2} becomes x1+x2y2\frac{x}{1+x^2y^2}.