Find min and max of $4x^2-y^2-xy-2x+6y$ subject to $y=4-2x$, $x \geq 0$, $y \geq-2$.

2.2k Views Asked by At

I have a two variable function: $f(x,y)=4x^2-y^2-xy-2x+6y$. I need to find its absolute minimum and maximum under the constraints: $y=4-2x$, $x \geq 0$, and $y \geq-2$.

I am not sure how to do it, if to use the triangular domain that the three lines $x=0$, $y=-2$, and $y=4-2x$ creates, of is it Lagrange multipliers. I checked with MAPLE and it says that the min is $f(0.5,3)=7.5$ while the max is $f(3,-2)=20$. I couldn't get these results. How do I use Lagrange multipliers when in addition to $y=4-2x$ I also have the $x \geq 0$ and $y \geq -2$?

3

There are 3 best solutions below

5
On

There is no need to use Lagrange multipliers, because your constraint explicitly gives $y$ in terms of $x$. Instead, work out the range of possible $x$ values. You have $x \geq 0$ already. If you are going to have $y \geq -2$ then you have $4-2x \geq -2$, or $x \leq 3$. So you want to optimize the one variable function $g(x)=f(x,4-2x)$ over $[0,3]$.

0
On

It is probably easiest in using Lagrange multipliers to impose the one constraint $ \ 2x + y - 4 \ = \ 0 \ $ on the function $ \ f(x,y) \ = \ 4x^2 - y^2 - xy - 2x + 6y \ \ $ and then apply the conditions $ \ x \ \ge \ 0 \ $ and $ \ y \ \ge \ -2 \ \ $ to the result we find. What is being sought is the maximum and minimum $ \ z-$coordinates of the intersection of the function surface with the plane $ \ 2x + y \ = \ 4 \ \ $ between the lines where that plane meets the planes $ \ x \ = \ 0 \ $ and $ \ y \ = \ -2 \ \ . $ (We are not being asked to look at the triangular region on the function surface bounded by the three planes, since $ \ 2x + y \ = \ 4 \ \ $ is given as the constraint plane.

(Within that triangular region, we find that there is a critical point of the function at $ \ \left(\frac{10}{17} \ , \ \frac{46}{17} \right) \ \ . $ This proves to be a saddle point, as the Hessian for this function is $ \ \left[\begin{array}{cc} 8 & -1 \\ -1 & -2 \end{array}\right] \ \ . ) $

The Lagrange equations are $$ 8x \ - \ y \ - \ 2 \ - \ \lambda·2 \ \ = \ \ 0 \ \ , \ \ -2y \ - \ x \ + \ 6 \ - \lambda·1 \ \ = \ \ 0 \ \ . $$ We may solve these for $ \ \lambda \ $ to obtain $$ \lambda \ \ = \ \ 4x \ - \ \frac12·y \ - \ 1 \ \ = \ \ -x \ - \ 2y \ + \ 6 \ \ \Rightarrow \ \ 5x \ + \ \frac32·y \ = \ 7 \ \ . $$

(Note that $ \ \left(\frac{10}{17} \ , \ \frac{46}{17} \right) \ \ $ lies in this plane.)

The intersection of this plane with the constraint plane gives us $$ 10x \ + \ 3y \ \ = \ \ 14 \ \ , \ \ 6x \ + \ 3y \ \ = \ \ 12 \ \ \Rightarrow \ \ 4x \ \ = \ \ 2 \ \ \Rightarrow \ \ x \ = \ \frac12 \ \ , \ \ y \ = \ 3 \ \ . $$ From this, we obtain $ \ f\left(\frac12 \ , \ 3 \right) \ = \ 1 - 9 - \frac32 - 1 + 18 \ = \ \frac{15}{2} \ \ . $

This doesn't tell us, though, what kind of extremum this is, so we will also need to investigate the function at the intersections of the curve in the plane $ \ 2x + y \ = \ 4 \ \ $ with the boundary lines:

$ \mathbf{x \ = \ 0 \ \ , \ \ y \ = \ 4 \ \ : } \quad f\left(0 \ , \ 4 \right) \ = \ 0 - 16 - 0 - 0 + 24 \ = \ 8 \ \ ; $

$ \mathbf{x \ = \ 3 \ \ , \ \ y \ = \ -2 \ \ : } \quad f\left(3 \ , \ -2 \right) \ = \ 36 - 4 - (-6) - 6 + (-12) \ = \ 20 \ \ , $

as you had found. The constrained extremal values of the function are thus $$ \ f\left(\frac12 \ , \ 3 \right) \ \ = \ \ \frac{15}{2} \ \ \text{[absolute minimum]} \ \ \ , \ \ \ f\left(3 \ , \ -2 \right) \ = \ 20 \ \ \text{[absolute maximum]} \ \ . $$

0
On

Making $f(x,y) = 4x^2-y^2-xy-2x+6y$

and forming the Lagrangian

$$ L(x,y,\lambda,s) = f(x,y)+\lambda_1(y+2x-4)+\lambda_2(x-s_1^2)+\lambda_3(y+2-s_2^2) $$

with $s_1, s_2$ slack variables to transform the inequalities into equations, the stationary point determination is computed by solving

$$ \nabla_X L (x,y,\lambda,s) = 0,\ \ X = (x,y,\lambda_1,\lambda_2,\lambda_3,s_1,s_2) $$

or

$$ \left\{ \begin{array}{rcl} 2 \lambda _1+\lambda _2+8 x-y-2 & = & 0\\ \lambda _1+\lambda _3-x-2 y+6 & = & 0\\ 2 x+y-4 & = & 0\\ x-s_1^2 & = & 0\\ -s_2^2+y+2 & = & 0\\ \lambda _2 s_1 & = & 0\\ \lambda _3 s_2 & = & 0\\ \end{array} \right. $$

and after solving some linear systems configurated by the choices $\lambda_2s_1=\lambda_3s_2=0$ we have the solutions

$$ \left[ \begin{array}{cccccccc} f&x&y&\lambda_1&\lambda_2&\lambda_3&s_1^2&s_2^2\\ \frac{15}{2} & \frac{1}{2} & 3 & \frac{1}{2} & 0 & 0 & \frac{1}{2} & 5 \\ 8 & 0 & 4 & 2 & 2 & 0 & 0 & 6 \\ 20 & 3 & -2 & -12 & 0 & 5 & 3 & 0 \\ \end{array} \right] $$

so at $(x=\frac 12, y=3)$ we have the minimum $\frac{15}{2}$ which is interion to the feasible region. Here when $s_k=0$ indicates that the corresponding restriction is actuating.