I am trying to validate how Lagrange multipliers work.
Looking to maximize $f(x,y)=1-x^2$
along curve $x^2 + y^2 = 1$,
the solutions are $f(0, -1) = f(0,1)=1$.
However, according to Lagrange multipliers, the only $f$ contours that are tanget to this curve go through curve-minima $f(-1, 0)=f(1, 0)=0$.
Does this mean Lagrange multipliers do not catch all extrema? Or is there actually a $\lambda$ that satisfies those two maxima?
Let $L(x,y,\lambda) = 1-x^2 + \lambda(x^2+y^2 -1)$. Then, we have $$ \nabla_{(x,y)} L(x,y,\lambda) = \begin{bmatrix} -2x + 2\lambda x \\ 2\lambda y \end{bmatrix} = 0$$ if and only if
That is, the possible critical points are $(x,0,1)$ for $x\in\mathbb R$, $(0,y,0)$ for $y\in\mathbb R$, and $(0,0,\lambda)$ for $\lambda\notin\{0,1\}$. With the constraint $x^2+y^2=1$ they reduce to $(\pm 1,0,1)$ and $(0, \pm 1, 0)$.
Let us check the necessary and sufficient condition for a maximum. We have $$ H=(x,y,\lambda):=\nabla_{(x,y)}^2 L(x,y,\lambda) = \begin{bmatrix} -2 + 2\lambda \\ & 2\lambda \end{bmatrix} $$ and the tangent space $$ T(x,y) = \{ (h,k) \mid 2xh + 2yk = 0 \} = \{ r(y, -x) \mid r\in\mathbb R \}. $$
Since the gradient of $x^2+y^2-1$ does not vanish for any feasible point, every extremum needs to be critical. Thus, $x = 0, y=\pm1$ are both global maximizers, as they have the same function value $f(0,\pm1)=1$.