I completed the following constrained optimisation problem:
Maximum and minimum values of $f(x,y) = x^2 + 2xy + y^2$ on the ellipse $g(x,y) = 2x^2 + y^2 - xy - 4x = 0$.
$\nabla f = \lambda \nabla g$
$\therefore (2x + 2y, 2x + 2y) = \lambda(4x - y - 4, 2y - x)$
We have a system of 3 equations in 3 unknowns:
$2x + 2y = \lambda(4x - y - 4)$,
$2x + 2y = \lambda(2y - x)$,
$2x^2 + y^2 - xy - 4x = 0$.
$\\$
$2x + 2y = \lambda(4x - y - 4)$
$\implies \lambda = \dfrac{2x + 2y}{4x - y - 4} \forall \ 4x - y - 4 \not= 0$
$\\$
$2x + 2y = \lambda(2y - x)$
$\implies \dfrac{2x + 2y}{2y - x} \forall \ 2y - x \not= 0$
$\\$
$\therefore \dfrac{2x + 2y}{4x - y - 4} = \dfrac{2x + 2y}{2y - x} \forall \ y \not= \dfrac{x}{2}, y \not= 4x - 4$ Remember this part: This is where my confusion lies.
But if we continue with our reasoning, we get the following (correct) points of potential maxima/minima:
$(x,y) = (0,0)$, $(x,y) = (1, -1)$, $(x,y) = (2,2)$, and $(x,y) = \left(\dfrac{2}{7}, \dfrac{-6}{-7}\right)$.
And, finally, using these points we find that $f_{max} = 16$ at $(x,y) = (2,2)$, and $f_{min} = 0$ at $(x,y) = (0,0)$ and $(x,y) = (1,-1)$.
But here's the problem: We had above that $y \not= \dfrac{x}{2}$; therefore, $(x,y) = (0,0)$ would get us $0 \not= \dfrac{0}{2} \implies 0 \not= 0$, which is obviously false. Also, as we just saw, $(0,0)$ is a solution for $f_{min}$!
The algebra here is confusing me, since we cannot have $y = \dfrac{x}{2}$, but $(0,0)$ is apparently the minima. Is this not a contradiction? Did I do something wrong? Or am I supposed to discard the solution $(0,0)$ and just have $f_{min} = 0$ at $(1, -1)$? What am I misunderstanding?
I would greatly appreciate it if people could please take the time to clarify this.
I think the confusion is this:
$y \neq \frac x 2$ is not a result of your calculations at any point (and therefore not to be understood as a restriction on the set of solutions), but an assumption you make to get from
$2x + 2y = \lambda(2y - x)$
to
$\lambda = \dfrac{2x + 2y}{2y - x} $
This means that you still have to consider the possibility that $2y-x = 0$, and solve the set of equations under this assumption - which eventually yields the $x=y=0$ solution.
An analogy: Suppose we have
$3x = x^2$
What you are doing is:
$\implies x=3 \,$ if $\, x\neq0$
Which is correct, but does not imply that $ x$ is not $0$!
Rather, we still need to check whether the other possibility, $x=0$, also leads to viable solutions (which here, it does.)