Solve the problems
max(min) f (x, y) = x² + y² s.t. g(x, y) = x² + xy + y²= 3
For both the maximization and the minimization problems, the Lagrangian is
{\mathcal{L}}(x,y)=x^{2}+y^{2}-\lambda(x^{2}+x y+y^{2}-3)so the three FOCs to consider are
{\mathcal{L}}_{1}^{\prime}(x,y)=2x-\lambda(2x+y)=0 (i)
\mathcal{L}_{2}^{\prime}(x,y)=2y-\lambda(x+2y)=0 (ii)
x^{2}+x y+y^{2}-3=0 (iii)
Let us eliminate λ from (i) and (ii). From (i) we get λ = 2x/(2x + y) provided that y \neq −2x. Inserting this value of λ into (ii) gives
2y={\frac{2x}{2x+y}}(x+2y)This reduces to y² = x², and so y = ±x, which leaves us with three possibilities:
1. Suppose, first, that y = x. Then, (iii) yields x² = 1, so x = 1 or x = −1. This gives the two solution candidates (x, y) = (1, 1) and (−1,−1), with λ = 2/3.
2. Alternatively, suppose y = −x. Then (iii) yields x² = 3, so x =\sqrt{3} or x = −\sqrt{3}. This gives the two solution candidates (x, y) = (\sqrt{3},−\sqrt{3}) and (−\sqrt{3},\sqrt{3}), with λ = 2.
3. It only remains to consider the case y = −2x. Then from (i) we have x = 0 and so y = 0. But this contradicts (iii), so this case cannot occur.
We have found the only four points (x, y) that can solve the problem. Furthermore,
f(1,1)=f(-1,-1)=2\mathrm{~and~}f(\sqrt{3},-\sqrt{3})=f(-\sqrt{3},\sqrt{3})=6We conclude that if the problem has solutions, then (1, 1) and (−1,−1) solve the minimization problem, whereas (\sqrt{3},−\sqrt{3}) and (−\sqrt{3},\sqrt{3}) solve the maximization problem.
Geometrically, the equality constraint determines an ellipse. The problem is therefore to find what points on the ellipse are nearest to or furthest from the origin. See Fig. 14.3.1; it is “geometrically obvious” that such points exist.