Finding local extrema

108 Views Asked by At

I am supposed to find local extrema of function: $f\left ( x,y \right > )=x^{2}+y^{2}-5xy$ on triangle ABC, where A=$\left ( 1,1 \right )$, B=$\left ( 3,2 \right )$, C=$\left ( 1,7 \right )$

I already found equation for line segment AB: y=$\frac{1}{2}x+\frac{1}{2}$,for line segment AC: y=$1$ and for line segment BC: y=$\frac{-15}{2}x+\frac{19}{2}$

Then I made the partial derivation: $$\frac{\phi f}{\phi x}=2x-5y $$ $$\frac{\phi f}{\phi y}=2y-5x $$ I am supposed to solve it with Lagrange multiplier.

But I do not know, how to continue. Can anyone help me?

2

There are 2 best solutions below

1
On

The most straightforward way is to substitute, for each of the line segments, the expression you obtained for y into the original function, so you obtain a function of only one variable, x. Then differentiate and set the derivative equal to 0. Solve, substitute back to obtain y and check that the point (x,y) is between the end-points of the segment. You may have to check separately if the point is an end-point, i.e. a vertex A,B or C. To use Lagrange multipliers, first find the gradient vector of the objective function, viz. [2x-5y,2y-5x]. Then on each constraint, e.g. side AB, find the gradient vector of "constraint=0". Set the gradient vector of the objective equal to a scalar multiple of the gradient vector of the constraint. You have 3 equations, the constraint and the 2 components and 3 unknowns, x,y and the scalar. Each (x,y) is a critical point.

0
On

If you intend to solve this extrema problem using the Lagrange multipliers, the following procedure is a way to do it. Define

$$ \cases{ f(x,y) = x^2+y^2-5x y\\ g_1(x,y,e_1) = y-\frac 12(x+1)-e_1^2\\ g_2(x,y,e_2) = x-1-e_2^2\\ g_3(x,y,e_3) = -y+2-\frac 52(x-3)-e_3^2 } $$

Here $e_k$ are introduced as slack variables with the purpose of transform the inequality constraints into equality constraints.

Next, form the Lagrangian

$$ L(x,y,\lambda,e) = f(x,y) + \sum_{k=1}^3\lambda_k g_k(x,y,e_k) $$

Now, determine the stationary points

$$ \nabla L = \left\{ \begin{array}{rcl} -\frac{\lambda _1}{2}+\lambda _2+\frac{5 \lambda _3}{2} & = & 0\\ \lambda _1+\lambda _3 & = & 0\\ -e_1^2-\frac{1}{2} (x+1)+y & = & 0\\ -e_2^2+x-1 & = & 0\\ e_3^2+\frac{5 (x-3)}{2}+y-2 & = & 0\\ -2 e_1 \lambda _1 & = & 0\\ -2 e_2 \lambda _2 & = & 0\\ 2 e_3 \lambda _3 & = & 0\\ \end{array} \right. $$

After solving for $(x,y,\lambda_k,e_k)$ we obtain

$$ \left( \begin{array}{ccccccccc} f & x & y & \lambda_1 & \lambda_2 & \lambda_3 & e_1^2 & e_2^2 & e_3^2\\ -\frac{7581}{316} & \frac{190}{79} & \frac{551}{158} & 0 & 0 & \frac{399}{79} & \frac{141}{79} & \frac{111}{79} & 0 \\ -17 & 3 & 2 & \frac{47}{6} & 0 & \frac{19}{6} & 0 & 2 & 0 \\ -\frac{21}{4} & 1 & \frac{5}{2} & 0 & \frac{21}{2} & 0 & \frac{3}{2} & 0 & \frac{9}{2} \\ -3 & 1 & 1 & 3 & \frac{9}{2} & 0 & 0 & 0 & 6 \\ 15 & 1 & 7 & 0 & \frac{111}{2} & -9 & 6 & 0 & 0 \\ \end{array} \right) $$

NOTE

There are $5$ stationary points, all at the boundary. This can be determined because when a restriction is active, the corresponding slack variable is null.

enter image description here