Multivariable calculus

Gradient of x/(x^2+y^2+1): Quotient Rule Worked

For f(x, y) = x/(x^2 + y^2 + 1) the gradient has x-component (y^2 - x^2 + 1) and y-component -2xy, both divided by (x^2 + y^2 + 1) squared. The gradient is zero at (1, 0) and (-1, 0), which are the global maximum and minimum, with values 1/2 and -1/2.

f(x,y)=xx2+y2+1f(x,y) = \dfrac{x}{x^2 + y^2 + 1}
∇f(x,y)=1(x2+y2+1)2⟨y2−x2+1, −2xy⟩\nabla f(x,y) = \dfrac{1}{\left(x^2 + y^2 + 1\right)^2}\left\langle y^2 - x^2 + 1,\ -2xy \right\rangle
∂f∂x=y2−x2+1(x2+y2+1)2\frac{\partial f}{\partial x} = \frac{y^2 - x^2 + 1}{\left(x^2 + y^2 + 1\right)^2}
∂f∂y=−2xy(x2+y2+1)2\frac{\partial f}{\partial y} = \frac{-2xy}{\left(x^2 + y^2 + 1\right)^2}

Quotient rule for x, power rule for y

Write u=xu = x and v=x2+y2+1v = x^2 + y^2 + 1. For ∂f∂x\frac{\partial f}{\partial x} both parts depend on xx, so the quotient rule earns its keep.

∂f∂x=v ux−u vxv2=(x2+y2+1)(1)−x(2x)(x2+y2+1)2\frac{\partial f}{\partial x} = \frac{v\,u_x - u\,v_x}{v^2} = \frac{\left(x^2 + y^2 + 1\right)(1) - x(2x)}{\left(x^2 + y^2 + 1\right)^2}

Collect the numerator: x2+y2+1−2x2=y2−x2+1x^2 + y^2 + 1 - 2x^2 = y^2 - x^2 + 1.

∂f∂x=y2−x2+1(x2+y2+1)2\frac{\partial f}{\partial x} = \frac{y^2 - x^2 + 1}{\left(x^2 + y^2 + 1\right)^2}

For ∂f∂y\frac{\partial f}{\partial y} the numerator xx is a constant, so pull it out and use the power rule on v−1v^{-1}. No quotient rule is needed.

∂f∂y=x⋅∂∂y(v−1)=x⋅(−v−2)(2y)=−2xy(x2+y2+1)2\frac{\partial f}{\partial y} = x \cdot \frac{\partial}{\partial y}\left(v^{-1}\right) = x \cdot \left(-v^{-2}\right)(2y) = \frac{-2xy}{\left(x^2 + y^2 + 1\right)^2}

The mistake: reversing the two terms in the quotient rule

Writing u vx−v uxv2\frac{u\,v_x - v\,u_x}{v^2} flips the numerator's sign and produces x2−y2−1v2\frac{x^2 - y^2 - 1}{v^2}. The rule is bottom times the derivative of the top, minus top times the derivative of the bottom, in that order.

The sign error is easy to catch by testing the origin. Near (0,0)(0,0) the function behaves like f≈xf \approx x, so ∂f∂x\frac{\partial f}{\partial x} should be about +1+1 there. The correct formula gives 0−0+11=1\frac{0 - 0 + 1}{1} = 1. The reversed version gives −1-1, which would say the surface falls as xx increases through the origin, and that is plainly false.

  • Order matters: bottom times derivative of top comes first.
  • Do not reach for the quotient rule in the yy direction. The numerator has no yy, so a constant multiple and the power rule are cleaner and safer.
  • Always square the denominator, and leave it factored rather than expanding it.

Finding the two critical points

The denominator never vanishes, so the gradient is zero exactly when both numerators are zero. Start with −2xy=0-2xy = 0, which gives x=0x = 0 or y=0y = 0.

If x=0x = 0, the first numerator becomes y2+1y^2 + 1, which is never zero. That branch dies. If y=0y = 0, the first numerator becomes 1−x21 - x^2, which vanishes at x=±1x = \pm 1.

∇f(1,0)=⟨0,0⟩,f(1,0)=12\nabla f(1,0) = \langle 0, 0\rangle, \qquad f(1,0) = \tfrac{1}{2}

So the only critical points are (1,0)(1,0) and (−1,0)(-1,0). Since ∣f∣=∣x∣x2+y2+1≤∣x∣x2+1≤12\left|f\right| = \frac{|x|}{x^2+y^2+1} \le \frac{|x|}{x^2+1} \le \frac{1}{2} by the arithmetic mean and geometric mean inequality, and f→0f \to 0 far away, these are the global maximum 12\tfrac{1}{2} and global minimum −12-\tfrac{1}{2}.

Frequently asked questions

What is the gradient of x/(x^2+y^2+1) at the origin?

It is ⟨1,0⟩\langle 1, 0\rangle. The denominator equals 11 there, so the components reduce to 0−0+11=1\frac{0 - 0 + 1}{1} = 1 and 01=0\frac{0}{1} = 0. The surface climbs at rate 11 in the xx direction and is momentarily flat in the yy direction.

Along which curve does this gradient point straight down the y-axis direction?

Where the first component vanishes but the second does not, meaning y2−x2+1=0y^2 - x^2 + 1 = 0 with xy≠0xy \ne 0. That is the hyperbola x2−y2=1x^2 - y^2 = 1, off the xx-axis. On it the gradient is purely vertical.