Multivariable calculus

Partial Derivatives of (x + y)/(x^2 + y^2 + 1)

For f(x, y) = (x + y)/(x^2 + y^2 + 1) the partial with respect to x is (1 - x^2 + y^2 - 2xy) divided by (x^2 + y^2 + 1) squared, and the partial with respect to y is (1 + x^2 - y^2 - 2xy) over the same square. Swapping x and y turns either answer into the other, because it leaves f unchanged.

f(x,y)=x+yx2+y2+1f(x,y) = \frac{x + y}{x^2 + y^2 + 1}
fx=1x2+y22xy(x2+y2+1)2\frac{\partial f}{\partial x} = \frac{1 - x^2 + y^2 - 2xy}{\left(x^2 + y^2 + 1\right)^2}
fy=1+x2y22xy(x2+y2+1)2\frac{\partial f}{\partial y} = \frac{1 + x^2 - y^2 - 2xy}{\left(x^2 + y^2 + 1\right)^2}

Quotient rule with the other letter frozen

For fx\frac{\partial f}{\partial x}, hold yy fixed. The numerator x+yx + y is then xx plus a number, so its xx derivative is 11. The denominator has xx derivative 2x2x.

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

Expand the second product to 2x2+2xy2x^2 + 2xy and subtract. The x2x^2 already sitting in the first bracket absorbs one of the two, which is why the simplified numerator carries x2-x^2 rather than 2x2-2x^2.

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

Swapping the two letters leaves ff unchanged, so the yy partial is the same expression with xx and yy exchanged. There is no second computation to do.

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

At the origin both partials equal 11, so f(0,0)=1,1\nabla f(0,0) = \left\langle 1, 1 \right\rangle and the surface rises fastest along the diagonal. At (1,1)(1,1) both equal 19-\frac{1}{9}, so somewhere between those points the climb has already turned into a gentle descent.

The mistake: differentiating the frozen letter

Both letters appear in the numerator and both appear in the denominator, which is what makes this one easy to get wrong. During fx\frac{\partial f}{\partial x}, every yy on the page is a fixed number.

  • x(x+y)=1\frac{\partial}{\partial x}(x + y) = 1, not 1+y1 + y and not 22.
  • x(x2+y2+1)=2x\frac{\partial}{\partial x}\left(x^2 + y^2 + 1\right) = 2x, since y2+1y^2 + 1 contributes nothing.
  • The quotient rule numerator is uvuvu'v - uv' in that order, and reversing it flips the sign of the whole answer.

This function hands you a free check. Swap xx and yy in your answer for fx\frac{\partial f}{\partial x} and you must land exactly on your answer for fy\frac{\partial f}{\partial y}, because the swap does nothing to ff itself. If the two are not mirror images, at least one of them is wrong.

Where the surface is flat

The denominator is at least 11 everywhere, so both partials are defined on the whole plane and their signs are decided entirely by the numerators.

Set both numerators to zero. Subtracting one from the other kills the 11 and the 2xy-2xy, leaving 2(y2x2)=02\left(y^2 - x^2\right) = 0, so a critical point has to sit on y=xy = x or on y=xy = -x.

  • On y=xy = -x the first numerator becomes 1+2x21 + 2x^2, which is never zero, so that diagonal carries no critical point at all.
  • On y=xy = x it becomes 12x21 - 2x^2, which vanishes at x=±12x = \pm\frac{1}{\sqrt{2}}.
  • So there are exactly two critical points: (12,12)\left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right) and (12,12)\left(-\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}\right).

Those two points are the global maximum and the global minimum. Restricted to the diagonal y=xy = x the function is 2x2x2+1\frac{2x}{2x^2 + 1}, whose largest value is 22\frac{\sqrt{2}}{2} at x=12x = \frac{1}{\sqrt{2}}, and no point off the diagonal does better.

Frequently asked questions

Why is the derivative of the numerator just 1?

Because yy is held constant during the xx partial, so x+yx + y is xx plus a number. The derivative of xx is 11 and the derivative of the frozen yy is 00, so the whole numerator contributes a single 11.

What is the largest value this function takes?

22\frac{\sqrt{2}}{2}, about 0.7070.707, at (12,12)\left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right). The smallest is 22-\frac{\sqrt{2}}{2} at the opposite point, since f(x,y)=f(x,y)f(-x,-y) = -f(x,y) makes the surface antisymmetric through the origin.