I am having a lot of trouble figuring out how to classify boundary extrema of a function.
For example, consider the function $f : E \to \mathbb{R}$ with $E = \{(x, y) \: | \: x^2 + y^2 \leq 1\}$ given by $f(x, y) = x^2 - x + 2y^2$. I have seen multiple ways of parametrizing the boundary, but what confuses me is that those methods give different possible boundary extrema.
Furthermore, if I know the possible boundary extrema, I am having trouble figuring out wether those are actual extrema of $f$, and wether they are weak or strong.
For example, you can parametrize the boundary by using that on the boundary, you have $x^2 + y^2 = 1$, so $y^2 = 1 - x^2$, so then $g(x) = x^2 - x + 2(1 - x^2) = -x^2 - x + 2$ parametrizes the boundary. Then the derivative is zero at $x = -\frac{1}{2}$, so $f$ possibly has extrema at $(-\frac{1}{2}, \frac{\sqrt{3}}{2})$ and $(-\frac{1}{2}, -\frac{\sqrt{3}}{2})$.
Parametrizing the boundary using $g(t) = f(\cos(t), \sin(t)) = -\cos(t) + \sin^2(t)$ however gives more extrema, since then $g'(t) = \sin(t)(1 + 2\cos(t))$, which is zero for $t \in \{0, \pi, \frac{2\pi}{3}, \frac{4\pi}{3} \}$, giving additional possible boundary extrema $(1, 0)$ and $(-1, 0)$, and also the two from before.
Even more confusing is $h : E \to \mathbb{R}$ given by $h(x, y) = x^2 + y^2 +x$, since then parametrizing using $x^2 + y^2 = 1$ gives zero possible boundary extrema, because the derivative of $g(x) = 1 + x$ is zero nowhere. So what is going on here? Why don't both ways of parametrizing the boundary work?
Thanks for reading, any amount of help would be greatly appreciated!
You forgot that when you do $y^2=1-x^2\implies f(x,y)=-x^2-x+2$, the values that $x$ can take belong to $[-1,1]$. So, it is not enough to see the points at which the derivative is $0$; you also have to check what happens at the extreme points of the interval $[-1,1]$, wich are $\pm1$.