How to maximize the function $f(x,y)= x^2+2y^2$ subjected to constraint $y-x^2+1=0$?

2.1k Views Asked by At

I want to maximize the function $f(x,y)= x^2+2y^2$ subjected to constraint $y-x^2+1=0$
Using Lagrange multipliers $$2x=\lambda(-2x) $$ hence $\lambda=-1$ $$4y=\lambda $$ hence $y=\frac{-1}{4}$
So the maximum is $\frac{7}{8}$ but the answer given is $2$ where am I wrong ?

2

There are 2 best solutions below

2
On BEST ANSWER

You can alternatively rewrite the constraint as $$x^2=y+1$$ so that your objective function becomes $$f(y)=y+1+2y^2$$ At $y=-\frac14$ the second derivative is positive, so there is minimum instead of a maximum. So, check at the extremes. For example $$x^2=y+1 \implies y\ge -1$$ For $y=-1$ you get that $x=0$ and indeed that $f(0,-1)=0+2(-1)^2=2$. But for $y\to+\infty$ the whole expression goes to $+\infty$ so the function is actually unbounded (if you have not omitted some constraints).

0
On

Going off dezdichado's suggestion,

  1. $2x=λ(−2x)$, where $x = 0$

  1. if $y = \frac{λ}{4}$, then $\frac{λ}{4} + 0^2 + 1 = 0$.

  2. $λ = -4, y = -1$.

  3. Plugging that into the original equation, $f(0, -1) = 0 + 2(-1)^2 = 2$.