# Lagrange Multipliers Example

Minimize $$f(x,y) = x^2+y^2$$ subject to the constraint $xy=3$.

I know the formula for Lagrange multipliers to be $\nabla f = \lambda \nabla g$ so we get a system of equations like this $$\begin{cases}f_x = \lambda g_x \\ f_y = \lambda g_y \end{cases}$$ However that gives me $2$ equations, but $3$ variables. I do not know what to do from here.

• There are $3$ equations, since $xy=3$. – André Nicolas Aug 15 '15 at 15:11
• Not an answer to your question, but consider circles $x^2+y^2=c$. We want the smallest $c$ such that the circle meets the rectangular hyperbola $xy=3$. Draw a picture. By symmetry we get the smallest $c$ when $x=y=\pm\sqrt{3}$ so $c=6$. – André Nicolas Aug 15 '15 at 15:22
• You also have $f_\lambda=xy-3$ – Claude Leibovici Aug 15 '15 at 15:56

HINT: Use $$\begin{cases} f_x = \lambda g_x \\ f_y = \lambda g_y \\ xy = 3\end{cases}$$ Note that $f_x = 2x, f_y = 2y, g_x = y, g_y = x$.
Here's another approach for fun. We can use the AM-GM mean: $$\sqrt{ab}\leq \frac{a+b}{2},\quad \text{for all}\ a,b\geq 0$$ where equality holds if and only if $a=b$. Use $a=x^2,\ b=y^2$ to get: $$\sqrt{x^2y^2}\leq \frac{x^2+y^2}{2},$$ and our minimum will be where $x=y$. This implies $x=y=\pm\sqrt{3}$ and thus: $$2\sqrt{(xy)^2} = 2|xy| = 6\leq x^2+y^2,$$ for all $x,y\in\mathbb{R}$ such that $xy=3$.
There is also a geometric solution: the graph of $xy=3$ is a rectangular hyperbola, so we'll have to find the closest points of the hyperbola from the origin.