Artificial intelligent assistant

How to maximize the function $f(x,y)= x^2+2y^2$ subjected to constraint $y-x^2+1=0$? 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 ?

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).

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1ca5a5597843ff62f288b4f274fae93a