Maximize $f(x,y) = x+y$ subject to $x^2+xy+y^2+y=1$

constraintslagrange multipliermultivariable-calculusoptimizationqclp

I'm stuck trying to find the maximum value and at which point it occurs of the function
$$f(x,y) = x + y,$$
subject to the constraint $x^2 +xy +y^2 + y = 1$.

my working so far is

$f_x = \lambda g_x \rightarrow 1 = \lambda \cdot (2x + y)$

$f_y = \lambda g_y \rightarrow 1 = \lambda \cdot (x + 2y + 1) $

so im left with the system.

$\lambda \cdot (2x + y) – 1 = 0$

$\lambda \cdot (x + 2y + 1) – 1 = 0 $

$x^2 + xy + y^2 + y -1 = 0$

I dont know what I have missed but the maximum value is $1$ at $(1, 0)$, I'm not sure how I get to that.

Best Answer

Your start looks fine except some $1$'s need to be multiplied by $\lambda$. For the second equation I get $\lambda \cdot (x+2y + 1) - 1 = 0$

Now you have to solve the system of equations. Solve one equation for one variable and substitute. For example, $\lambda = \frac{1}{2x+y}$ from the first equation. Plug that into the second. We get $$ \frac{1}{2x+y} \cdot(x + 2y + 1) = 1$$ which can be solved for either x or y by multiplying and rearranging to get $y = x-1$. Plug that into the last equation and solve for the possible values of $x$.