Set
f(x,y) = x^2 +2y^2
so that our goal is to maximize f(x,y) = x^2 +2y^2
subject to x^2 +y^2 =1
By the method of Lagrange multipliers, we need to find simultaneous solutions to
∇f(x,y)=λ∇g(x,y)∇f(x,y)=λ∇g(x,y)andg(x,y)=0.g(x,y)=0.We compute∇f(x,y)=⟨−1,2y⟩∇f(x,y)=⟨−1,2y⟩and∇g(x,y)=⟨4x+2y,2x+2y⟩.∇g(x,y)=⟨4x+2y,2x+2y⟩.The vector equality⟨−1,2y⟩ =λ⟨4x+2y,2x+2y⟩⟨−1,2y⟩ =λ⟨4x+2y,2x+2y⟩is equivalent to the coordinate-wise equalities<span><span>−12y=λ(4x+2y)=λ(2x+2y).</span><span>−1=λ(4x+2y)2y=λ(2x+2y).</span></span>
Solving for λλ in each equation gives
<span><span>λλ<span><span>=−14x+2y</span><span>=yx+y.</span></span></span><span><span>λ<span>=−14x+2y</span></span><span>λ<span>=yx+y.</span></span></span></span>Since λλ must take on a consistent value throughout, the two right-hand sides of the above equations must be equal, and we can use this to solve for xx in terms of yy:<span><span><span>yx+yy(4x+2y)4xy+2y24xy+xx(4y+1)x</span><span><span>=−14x+2y</span>=−(x+y)=−x−y=−(2y2+y)=−(2y2+y)<span>=−<span>2y2+y4y+1</span>.</span></span></span><span><span>yx+y<span>=−14x+2y</span></span>y(4x+2y)=−(x+y)<span>4xy+2y2=−x−y</span><span>4xy+x=−(2y2+y)</span><span>x(4y+1)=−(2y2+y)</span><span>x<span>=−<span>2y2+y4y+1</span>.</span></span></span></span>
We must also satisfy the constraint g(x,y)=0g(x,y)=0, so plugging this in, we need
<span><span><span>g(x,y)2x2+2xy+y2−1<span>2<span>(2y2+y)2(4y+1)2</span>−2<span>2y3+y24y+1</span>+y2−1</span></span>=0=0=0.</span><span>g(x,y)=0<span>2x2+2xy+y2−1=0</span><span><span>2<span>(2y2+y)2(4y+1)2</span>−2<span>2y3+y24y+1</span>+y2−1</span>=0.</span></span></span>
At this point, we have reduced the problem to solving for the roots of a single variable polynomial, which any standard graphing calculator or computer algebra system can solve for us, yielding the four solutions
y≈−1.38,−0.31,−0.21,1.40.y≈−1.38,−0.31,−0.21,1.40.
Plugging these back in to <span><span>x=−<span>2y2+y4y+1</span></span><span>x=−<span>2y2+y4y+1</span></span></span> gives the corresponding xx-values of approximately 0.54,−0.54,0.81,−0.810.54,−0.54,0.81,−0.81. Our four candidates for the constrained global extrema, then, are the points (0.54,−1.38),(−0.54,−0.31),(0.81,−0.21),(−0.81,1.40)(0.54,−1.38),(−0.54,−0.31),(0.81,−0.21),(−0.81,1.40). To figure out which one is the global maximum we were asked for, we simply plug them all into f(x,y)f(x,y):
<span><span>f(0.54,−1.38)f(−0.54,−0.31)f(0.81,−0.21)f(−0.81,1.40)≈1.37≈0.63≈−0.76≈2.76.</span><span>f(0.54,−1.38)≈1.37f(−0.54,−0.31)≈0.63f(0.81,−0.21)≈−0.76f(−0.81,1.40)≈2.76.</span></span>
We conclude that the maximum value of <span>f(x,y)=y2−xf(x,y)=y2−x</span> subject to the constraint <span>g(x,y)=2x2+2xy+y2−1=0g(x,y)=2x2+2xy+y2−1=0</span> is 2.762.76, occurring at the point (−0.81,1.40)(−0.81,1.40).