Find the $x$ and $y$ values that satisfy the constrained optimisation problem.

130 Views Asked by At

I have the following constrained optimisation problem. We have the following multivariable function:

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

This function is minimised on the line:

$$0 = \vec n \ (\vec x -\vec p)= \begin{bmatrix}-1\\1\end{bmatrix} \left(\begin{bmatrix}x\\y\end{bmatrix}-\begin{bmatrix}-2\\3\end{bmatrix} \right)$$

I have to use the Lagrange Multipliers to solve this problem and get the $x$ and $y$ values. I'm not sure how to go about doing this problem because normally I work with $g(x,y)$ as a linear equation which equals a constant (i.e. $x+y=12$). My initial idea was to write down the Lagrange Multipliers, since $f$ is subject to the constraint $g(x,y) = 0$ and simplify the line equation into a polynomial function. The function is as follows:

$$L(x, y, \lambda)=f(x,y)+\lambda (g(x,y)-c)$$

The line equation in its equivalent polynomial form:

$$-x+y-5 \equiv y-x = 5$$

Thus $c = 5$ and we have:

$$L(x,y, \lambda) = (4x^2+4y^2 +3xy -2x +4) - \lambda(-x+y-5)$$

From here I can find the gradient of $L$, which would be:

$$\nabla L= \begin{bmatrix}8x+3y-2+ \lambda\\8y +3x-\lambda\\x-y+5\end{bmatrix}$$

I then setup an augmented matrix and reduced it to RREF to solve for $x$ and $y$. The augmented matrix $A$ is as follows:

$$\left[\begin{array}{rrr|r} 8 & 3 & 1 & 2\\ 3 & 8 & -1 & 0\\ 1 & -1 & 0 & -5 \end{array}\right] \to ... \to \left[\begin{array}{rrr|r} 1 & 0 & 0 & -\frac{55}{22}\\ 0 & 1 & 0 & -\frac{57}{22}\\ 0 & 0 & 1 & -\frac{27}{2} \end{array}\right]$$

Therefore, $x = -2.50$ and $y=-2.59$. Hopefully this is correct but again, I'm not a 100% sure because of the line constraint.

Edit: There is a computation error in reducing the augmented matrix (RREF). As stated in the comments and answers, the correct answers are $x=-2.41$ and $y=2.59$.

2

There are 2 best solutions below

1
On BEST ANSWER

The minimization problem

$$ \min_{x,y}f(x,y)=4 x^2 + 4 y^2 + 3 x y - 2 x + 4,\ \ \text{s. t.}\ \ g(x,y) = y-x-5=0 $$

can be solved either by substitution of $y = x+5$ into $f(x,y)$ giving the unconstrained.

$$ \min_x f(x,x+5)=4 x^2+3 (x+5) x-2 x+4 (x+5)^2+4 $$

or using the Lagrange multipliers paradigm for the stationary points determination of

$$ L(x,y) = f(x,y)+\lambda g(x,y) $$

In this case the stationary points are the solutions for

$$ \nabla f +\lambda\nabla g = 0 $$

which means that the functions $f, g$ should be tangent at the solution $\{x^*, y^*\}$ or

$$ \nabla f(x^*, y^*) +\lambda\nabla g(x^*, y^*) = 0 $$

Follows a plot showing first $x\times f(x,x+5)$

enter image description here

and the tangency at $\{x^*, y^*\}$ in the case of the Lagrangian approach. In black the level curves for $f(x,y)$ in blue $g(x,y)=0$ and in red the solution point $\{-\frac{53}{22},\frac{57}{22}\}$. Note that in both plots, the minimum coordinate $x^* = -\frac{53}{22}$ is the same.

enter image description here

1
On

You have made some computational mistake, perhaps when you used the online calculator:

octave:1> rref([8, 3, 1, 2; 3, 8, -1, 0; 1, -1, 0, -5])
ans =

    1.00000    0.00000    0.00000   -2.40909
    0.00000    1.00000    0.00000    2.59091
    0.00000    0.00000    1.00000   13.50000

$x=-\frac{53}{2}, y=\frac{57}{22}, \lambda=\frac{27}{2}$.

You can try to use the online rref calculator here to obtain the rational form.