# Finding local maxima, minima, and saddle points of $f(x,y)=xy + \frac1x +\frac1y$

Can anyone show me whether my answer below is correct and complete? Specifically, I am not sure whether or not I defined the extrema in explicit-enough terms. Also, the graph of the function using http://web.monroecc.edu/manila/webfiles/calcNSF/JavaCode/CalcPlot3D.htm seems to present a somewhat different answer than I am getting using equations below. Perhaps someone might be able to point out other things I could improve to make this answer more correct. This is question 14.7.12 in the seventh edition of Stewart Calculus.

"Find the local maximum and minimum values, and saddle points, of $f(x,y)=xy + \frac{1}{x} +\frac{1}{y}$."
Here is my work:
$f_x(x,y) = y+\frac{-1}{x^2}=0$, so $yx^2 =1$
$f_y(x,y)=x+\frac{-1}{y^2}=0$, so $xy^2=1$
Thus, $yx^2=xy^2=1$ and $\frac{xy^2}{yx^2}=1=\frac{y}{x}=\frac{x}{y}$, so the critical points occur when $y=x$
$f_{xx}=\frac{2}{x^3}$
$f_{yy}=\frac{2}{y^3}$
$f_{xy}=1$
Use Second Derivatives Test: $D=D(a,b)=f_{xx}(a,b)f_{yy}(a,b)-[f_{xy}(a,b)]^2$
For $x=y$, we have $D=\frac{4}{x^6}-1>0$, thus, there are no saddle points.
$f_{xx} = \frac{2}{x^3}=\begin{cases}<0 ,& x < 0 \\udf ,& x=0\\>0,& x>0\end{cases}$
Thus, $x=y$ defines local maxima when $x<0$ and defines local minima when $x>0$
Highest maxima occur as $x\to\infty$ and as $x\to 0^+$
Lowest minima occur as $x\to -\infty$ and as $x\to 0^-$

-
How from $D(a,b)=f_{xx}(a,b)f_{yy}(a,b)-[f_{xy}(a,b)]^2=\dfrac{2}{x^3}\cdot \dfrac{2}{y^3}-1$ for $x=y$ you obtain $D=\dfrac{4}{x^3}+1>0$? – M. Strochyk Oct 29 '12 at 20:37
@M.Strochyk, Should be $-1$. Thanks for the catch. Your second catch caught a typo: $x^3 =y^3$ because $x=y$, so $\frac{2}{x^3}\cdot\frac{2}{y^3}=\frac{2}{x^3}\cdot\frac{2}{x^3}=\frac{4}{x^6}$. – CodeMed Oct 29 '12 at 20:47

Putting $f_x=0$ and $f_y=0$ you obtained the two equations $yx^2=1$ and $xy^2=1$. The solution of these two equations is not the line $x=y$, as you seem to think, but the single point $p:=(1,1)$. This is the only critical point in the domain ${\mathbb R}^2\setminus\{(x,y)\ |\ xy=0\}$ of $f$. One computes $$f_{xx}(p)=2, \quad f_{xy}(p)=1,\quad f_{yy}(p)=2\ ,$$ whence $f_{xx}(p)>0$ and $D(p):=(f_{xx}f_{yy}-f_{xy}^2)_p=3>0$. It follows that $f$ takes a local minimum at $p$.
When you restrict $f$ to the open first quadrant then $f$ in fact takes its global minimum value $3$ at $p$. This can be seen as follows: $$xy+{1\over x}+{1\over y}=\sqrt{y}\Bigl(x\sqrt{y}+{1\over x\sqrt{y}}\Bigr)+{1\over y}\geq 2\sqrt{y}+{1\over y}\qquad(x>0)\ ,$$ and here the right side has minimal value $3$ for $y=1$.
@CodeMed: Local extrema can only occur in critical points of $f$ or at boundary points of the domain of $f$. As the domain is considered an open set in your example the only critical point we have found remains. – Christian Blatter Oct 30 '12 at 9:26