Lagrange multiplier for two constraints?

110 Views Asked by At

$$\begin{array}{ll} \text{maximize} & −x^2−y^2+4x+6y\\ \text{subject to} & x+y \le 6\\ & y \le 2\\ & x ,y \geq 0\end{array}$$

I tried using the Lagrange multiplier method and set:

$$L=(-x^2-y^2+4x-6y)+a(6-x-y)+b(2-y).$$

And differentiated to get:

$$\frac{dL}{dx}=-2x+4-a$$ $$\frac{dL}{dy}=-2y+6-a-b$$ $$\frac{dL}{da}=6-x-y$$ $$\frac{dL}{DB}=2-y$$

Then by complementary slackness:

$$-2x+4-a=-2y+6-a-b.$$

But I don't know what to do next?

2

There are 2 best solutions below

1
On

As $f(x,y)=-(x-2)^2-(y-3)^2+13$, there’s no stationary point in the interior of the function’s domain. Now consider the critical points on the boundary.

First take a look at the vertices. For $x=0$ we have to find the critical points of $-y^2+6y$, that is $y=3$, but that’s not on the boundary.

Similarly:

For $y=0$ we find $x=2$ and $f(2,0)=4$.

For $y=2$ we find $x=2$ and $f(2,2)=12$.

For $y=6-x$ we find $x=2.5$ and $y=3.5$ which is out of bounds.

Now consider the edges, ie, the points where the boundary isn’t differentiable, namely $(0,0)$, $(0,2)$, $(4,2)$ and $(6,0)$. By comparison we find the minimum in $(6,0)$, its value is $-12$.

No need for Lagrange.

1
On

Note that you have really four constraints, and not two, but it is customary to treat them differently, and to speak of two functional constraints and two nonnegativity constraints.

There are several different ways that the Lagrange conditions can be phrazed. With the constraints and the Lagrange function that you give, I would write them as four pairs of inequalitites: $${\partial L \over \partial x} \leq 0, \qquad x\geq 0 \\ {\partial L \over \partial y} \leq 0, \qquad y\geq 0 \\ {\partial L \over \partial a}\geq 0,\qquad a\geq 0 \\ {\partial L \over \partial b} \geq 0, \qquad b \geq 0$$ Now, complementary slackness is not the condition that you have given, but the condition that there is at least one equality in each pair of inequalities. In particular, any strict inequality must be matched with an equality.

One (unimaginative) way of solving this system is to divide into $2^4=16$ different cases according to whether the four variables $x,y,a,b$ are $=0$ or $>0$, and to see if there are any candidates in each of the $16$ cases. But you will probably get a more readable solution if you consider the four cases (i) $a=b=0$, (ii) $a=0, b>0$, (iii) $a>0, b=0$, (iv) $a>0, b>0$, and look for solutions in each of them. It is when you consider each of these cases that you will need to use complementary slackness.