An exercise using Lagrange's Multipliers

74 Views Asked by At

I am having some trouble finding the max and min of the below problem using Lagrange multipliers:

$$ f(x,y) = x^2 -2xy + 3y^2 \\ \text{subject to} \ \ x^2 + 2y^2 + x + y = 0$$

Is there a trick or something i am missing? that was a question in one of my friends test and no one was able to solve it.

--------------------------------------------------------//--------------------------------------------------------

i get:

$$ 2x-2y = \lambda(2x+1) \\ -2x+6y = \lambda(4y+1) \\ x^2 + 2y^2 + x + y = 0$$

i can't solve it, is there a shortcut?

3

There are 3 best solutions below

8
On

I assume you are looking for real solutions.

The Lagrangian function is: $$ L(x,y,\lambda)= x^2-2xy + 3y^2-\lambda(x^2+2y^2+x+y) $$

Taking derivatives with respect to $x, y, \lambda$ respectively yields: $$ 2x-2y -2\lambda x -\lambda=0$$

$$-2x+6y-4 \lambda y -\lambda = 0$$

$$x^2+2y^2+x+y=0$$

To solve the system (three equations, three unknowns), note that: $\lambda = \frac{2x-2y}{2x+1} = \frac{-2x+6y}{4y+1}$. Therefore: $$ (2x-2y)(1+4y) = (2x+1) (6y-2x) $$ or $$ 4x^2-8y^2-4xy+4x-8y=0 \,(I) $$ Multiplying the constraint by 4 gives: $$4x^2 + 8y^2 + 4x + 4y=0. \, (II)$$

Deducting (I) from (II) yields:

$$16y^2 + 4xy +12y=0$$

Therefore, either $y=0 \Rightarrow x=0$ or $x=-1$, or $16y+4x+12=0$. Combine the last equation with the constraint to find additional solutions, and you will get none (they are complex). So there are two solutions for $(x,y)$, namely $(0,0)$ and $(-1,0)$

You should check also the second order conditions at the optimum, e.g. bordered Hessian, or KKT conditions.

Plugging these values into the objective function gives: $f(0,0)=0$, $f(-1,0)=3$. The point (0,0) is a minimum; (-1,0) is a maximum.

0
On

The constraint defines a compact set so we know a solution exists.

The Lagrange equations are $E_1:2x-2y+ \lambda (1+2x) = 0$, $E_2: 6y-2x + \lambda (1+4y) = 0$.

Simplifying the equation $(1+4y)E_1-(1+2x)E_2 = 0$ gives $(1+x+y)(2y-x) = 0$.

If we let $y=-(1+x)$ in the constraint we get $(x+1)(3x+1) = 0$ which yields the candidates $(-1,0), (-{1 \over 3} , -{2 \over 3})$. A tedious computation shows that $f$ has value $1$ at both points.

If we let $x=2y$ in the constraint we get $y(2y+1) = 0$ which yields the candidates $(0,0),(-1, -{1 \over 2})$. Another computation shows that $f$ has value $0, {3 \over 4}$ respectively from which we see that the $\min$ is $0$ at $(0,0)$ and the $\max$ is $1$ at either $(-1,0), (-{1 \over 3} , -{2 \over 3})$.

Notes:

Note that the quadratic form $f(x,y)$ is positive definite and that $(0,0)$ satisfies the constraint. Hence $(0,0)$ is a (in fact, the) minimiser since $f(0,0) = 0$.

1
On

Starting from pendermath's answer, considering the equations $$2x-2y -2\lambda x -\lambda=0\tag1$$

$$-2x+6y-4 \lambda y -\lambda = 0\tag2$$

$$x^2+2y^2+x+y=0\tag3$$ solve $(1)$ and $(2)$ for $x$ and $y$. This gives $$x=-\frac{\lambda }{2 \lambda -1}\qquad \text{and} \qquad y=-\frac{\lambda }{2 (2 \lambda -1)}=\frac x 2$$ assuming $\lambda \neq \frac 12$.

Plug in $(3)$ to get $$\frac{3 (\lambda -1) \lambda }{2 (2 \lambda-1 )^2}=0$$ so the candidates $\lambda=0$ for which $x=y=0$ and $\lambda=1$ for which $x=-1$ and $y=\frac 12$