Multivariable calculus

Gradient of arctan(xyz): Chain Rule with 1/(1+u^2)

For f(x, y, z) = arctan(xyz) the gradient is (yz, xz, xy) all divided by 1 + x^2 y^2 z^2. The outer derivative of arctan contributes the shared denominator and the inner gradient of xyz supplies the numerators. At (1, 1, 1) the gradient is (1/2, 1/2, 1/2).

f(x,y,z)=arctan(xyz)f(x,y,z) = \arctan\left(xyz\right)
f=11+x2y2z2yz,  xz,  xy\nabla f = \frac{1}{1 + x^2 y^2 z^2}\left\langle yz,\; xz,\; xy \right\rangle
fx=yz1+x2y2z2\frac{\partial f}{\partial x} = \frac{yz}{1 + x^2 y^2 z^2}
fy=xz1+x2y2z2\frac{\partial f}{\partial y} = \frac{xz}{1 + x^2 y^2 z^2}
fz=xy1+x2y2z2\frac{\partial f}{\partial z} = \frac{xy}{1 + x^2 y^2 z^2}

Outer derivative once, inner gradient three times

Let u=xyzu = xyz. The outer function is arctanu\arctan u, whose derivative is 11+u2\frac{1}{1+u^2}, and that factor is the same in all three components because it does not care which variable you are differentiating.

fx=11+u2ux=yz1+x2y2z2\frac{\partial f}{\partial x} = \frac{1}{1 + u^2}\cdot\frac{\partial u}{\partial x} = \frac{yz}{1 + x^2 y^2 z^2}

The inner gradient is the one you get for the plain product: u=yz,xz,xy\nabla u = \left\langle yz, xz, xy \right\rangle. So the whole calculation is a single scalar times a gradient you already know.

f=u1+u2=11+x2y2z2yz,  xz,  xy\nabla f = \frac{\nabla u}{1 + u^2} = \frac{1}{1 + x^2 y^2 z^2}\left\langle yz,\; xz,\; xy \right\rangle

This is the general chain rule for a function of one composite variable, (g(u))=g(u)u\nabla\left(g(u)\right) = g'(u)\nabla u. It says arctan(xyz)\arctan(xyz) and xyzxyz have gradients pointing in exactly the same direction at every point, so they share their level surfaces and their steepest ascent directions.

The mistake: the wrong thing inside the square

Two errors show up constantly. The first is writing the denominator as 1+xyz1 + xyz instead of 1+(xyz)21 + (xyz)^2. The arctangent derivative squares its argument, and here the argument is the whole product, so the square distributes over all three variables.

The second is dropping the numerator entirely and reporting 11+x2y2z2\frac{1}{1 + x^2y^2z^2} for every component. That is only the outer derivative. Without the inner factors yzyz, xzxz and xyxy the three components would be identical, which cannot be right for a function that treats a change in xx differently from a change in yy unless the point is symmetric.

  • Denominator: 1+u2=1+x2y2z21 + u^2 = 1 + x^2y^2z^2, the same in all three components.
  • Numerators: the gradient of the inside, yz,xz,xy\left\langle yz, xz, xy \right\rangle, different in each component.
  • Quick test at (1,2,3)(1,2,3): u=6u = 6, so the denominator is 37, and the numerators are 6, 3 and 2, giving three different values as expected.

Why the gradient dies away far from the origin

At (1,1,1)(1,1,1) the product is u=1u = 1, so the denominator is 2 and f=arctan1=π4f = \arctan 1 = \frac{\pi}{4}.

f(1,1,1)=12,  12,  12,f=320.866\nabla f(1,1,1) = \left\langle \tfrac{1}{2},\; \tfrac{1}{2},\; \tfrac{1}{2} \right\rangle, \qquad \left| \nabla f \right| = \frac{\sqrt{3}}{2} \approx 0.866

Compare that with the plain product xyzxyz, whose gradient at the same point is 1,1,1\left\langle 1,1,1 \right\rangle. The arctangent halves it here, and further out it shrinks much harder: the numerators grow like a product of two coordinates while the denominator grows like the square of a product of three.

That matches the shape of the function. Since arctanu<π2\left| \arctan u \right| < \frac{\pi}{2} for every uu, the values are trapped in a band of width π\pi, so the function has to flatten out. A bounded function cannot keep a large gradient over a large region.

Frequently asked questions

Why do arctan(xyz)\arctan(xyz) and xyzxyz have parallel gradients?

Because (g(u))=g(u)u\nabla\left(g(u)\right) = g'(u)\nabla u, and g(u)=11+u2g'(u) = \frac{1}{1+u^2} is a positive scalar. Multiplying a vector by a positive number changes its length but not its direction, so the two gradients point the same way at every point.

Where is the gradient of arctan(xyz)\arctan(xyz) zero?

On the coordinate axes. All three numerators yzyz, xzxz and xyxy vanish together only when at least two coordinates are zero, and the denominator is never zero, so the critical set is the union of the three axes.