Multivariable calculus

Gradient of x/(1 + y^2 + z^2): Quotient and Chain

For f(x, y, z) = x/(1 + y^2 + z^2) the gradient is (1/D, -2xy/D^2, -2xz/D^2) where D = 1 + y^2 + z^2. The x component is easy because the denominator holds no x. The other two need the chain rule and pick up a minus sign. At (2, 1, 1) the gradient is (1/3, -4/9, -4/9).

f(x,y,z)=x1+y2+z2f(x,y,z) = \frac{x}{1 + y^2 + z^2}
f=11+y2+z2,  2xy(1+y2+z2)2,  2xz(1+y2+z2)2\nabla f = \left\langle \frac{1}{1 + y^2 + z^2},\; \frac{-2xy}{\left(1 + y^2 + z^2\right)^2},\; \frac{-2xz}{\left(1 + y^2 + z^2\right)^2} \right\rangle
fx=11+y2+z2\frac{\partial f}{\partial x} = \frac{1}{1 + y^2 + z^2}
fy=2xy(1+y2+z2)2\frac{\partial f}{\partial y} = \frac{-2xy}{\left(1 + y^2 + z^2\right)^2}
fz=2xz(1+y2+z2)2\frac{\partial f}{\partial z} = \frac{-2xz}{\left(1 + y^2 + z^2\right)^2}

Skip the quotient rule where you can

Let D=1+y2+z2D = 1 + y^2 + z^2. For the xx partial, DD contains no xx, so ff is just 1D\frac{1}{D} times xx and the derivative is that coefficient.

fx=11+y2+z2\frac{\partial f}{\partial x} = \frac{1}{1 + y^2 + z^2}

For yy and zz it is cleaner to write f=xD1f = xD^{-1} and use the power rule with the chain rule than to run the full quotient rule. With xx frozen, y(D1)=D2Dy\frac{\partial}{\partial y}\left(D^{-1}\right) = -D^{-2}\frac{\partial D}{\partial y} and Dy=2y\frac{\partial D}{\partial y} = 2y.

fy=x(D2)(2y)=2xy(1+y2+z2)2\frac{\partial f}{\partial y} = x \cdot \left(-D^{-2}\right)\left(2y\right) = \frac{-2xy}{\left(1 + y^2 + z^2\right)^2}

The zz component follows the same path with 2z2z in place of 2y2y. The quotient rule gives the identical answer, since the numerator derivative term is zero, but it takes twice the writing and offers twice the chance of a sign error.

The mistake: a first power in the denominator

The most common wrong answer is fy=2xy1+y2+z2\frac{\partial f}{\partial y} = \frac{-2xy}{1 + y^2 + z^2}, with the denominator left unsquared. Differentiating D1D^{-1} produces D2D^{-2}, so the power in the denominator always goes up by one.

  • Check the far field. As yy grows, ff flattens out toward zero, so fy\frac{\partial f}{\partial y} must shrink faster than ff does. A squared denominator does that, an unsquared one does not.
  • The minus sign is real: increasing y\left| y \right| makes the denominator bigger and pushes ff toward zero, so for positive xx and yy the function decreases.
  • A third slip is treating DD as a constant for yy as well, which gives zero for two of the three components.

Substituting a point, and why there are no critical points

At (2,1,1)(2, 1, 1) the denominator is D=1+1+1=3D = 1 + 1 + 1 = 3, so f=23f = \frac{2}{3} and D2=9D^2 = 9.

f(2,1,1)=13,  49,  49\nabla f(2,1,1) = \left\langle \frac{1}{3},\; \frac{-4}{9},\; \frac{-4}{9} \right\rangle

Reading the signs: pushing xx up increases ff, while pushing yy or zz away from zero decreases it, because they only enlarge the denominator. The yy and zz components are equal here because the point is symmetric in those two coordinates.

The xx component is 1D\frac{1}{D}, which is strictly positive everywhere. So f\nabla f is never the zero vector, and this function has no local maxima or minima anywhere in space. It has no global ones either: along the xx-axis the denominator is 1 and f=xf = x, which runs off to ++\infty one way and -\infty the other.

Frequently asked questions

Do I have to use the quotient rule here?

No. Rewriting f=x(1+y2+z2)1f = x\left(1+y^2+z^2\right)^{-1} and using the power rule with the chain rule gives the same components with less algebra. The quotient rule is fine, but its numerator derivative term is zero for yy and zz, so it adds work.

Why is the xx component free of xx?

Because ff is linear in xx: with yy and zz fixed, ff is a straight line through the origin with slope 11+y2+z2\frac{1}{1+y^2+z^2}. The slope of a line does not depend on where you are along it.