Here is the problem:
Find an extrema of $f(x,y)=y^2+x$ with the given condition $x^2+2y^2=1$.
I solved it this way:
$L(x,y,\phi)=y^2+x+\lambda(x^2+2y^2-1)$
$\frac{\delta L}{\delta x}=1+2\lambda x =0$
$\frac{\delta L}{\delta y}=2y+4\lambda y =2y(1+2\lambda)=0$
$\frac{\delta L}{\delta \phi}=x^2+2y^2-1 =0$
$=>$
$x=\frac{-1}{2\lambda};\quad y=0;\quad\lambda=\pm\frac{1}{2};\quad= >\quad x=\pm1$.
After that I took the second derivative from $L$ and got this:
$P_1 =(1,0)$ when $\lambda=-\frac{1}{2}$ – is the relative maximum ($L''<0$), $f(x,y)=1$, and
$P_2 =(-1,0)$ when $\lambda=\frac{1}{2}$ – is the relative minimum ($L''>0$), $f(x,y)=-1$.
I wanted to check myself with the given solutions, and here what it says:
The solution:
$f(x,y)=\frac{1}{2}-\frac{x^2}{2}+x, x\in[-1,1]$,
$(1,0)$ – the maximum, $f(1,0)=1$,
$(-1,0)$ – the minimum, $f(-1,0)=-1$.
And my question is – why it says the solution is the function with only one $\lambda=-\frac{1}{2}$ value? I can't get it. Maybe I'm doing something wrong?
The first equation gives $x=-\frac{1}{2\lambda}$ as you say. This division is justified because when $\lambda=0$ you get an inconsistent equation. (Mathematically this is because this function has no critical points.)
But the second equation can be satisfied two ways: either $y=0$ or $\lambda=-1/2$. The latter gives you a value of $x$ from the first equation and then you can use the constraint to get corresponding value(s) of $y$. For the former you can just go directly to the constraint to get the corresponding value(s) of $x$, because the first equation is just going to get you a value of $\lambda$ which you do not really need.
That said, the solution you're showing isn't using Lagrange multipliers, it is just using direct substitution of the constraint to replace $y^2$ in the objective function, and then using the constraint to restrict $x$ to be within an interval.