# find extrema of f(x,y)=x^2+y^2-xy with constraint x+2y-16=0

*print*Print*list*Cite

### 1 Answer

You need to use the Lagrange multipliers to evaluate the possible extrema of the function.

You need to define a function `F(x,y,lambda), ` such that:

`F(x,y,lambda) = f(x,y) + lambda*g(x,y)`

`F(x,y,lambda) = x^2+y^2-xy + lambda*(x+2y-16)`

You need to evaluate the partial derivatives of the function `F(x,y,lambda), ` such that:

`F_x = 2x - y + lambda`

`F_y = 2y - x + 2lambda`

`F_lambda = x + 2y - 16`

Since from the first expression `2x - y + lambda = 0` yields `lambda = y - 2x ` and from the second expression, `2y - x + 2lambda = 0` yields `2lambda = x - 2y` , hence `lambda = (x - 2y)/2` , then, you need to set up the equation, such that:

`lambda = lambda => y - 2x = (x - 2y)/2`

Multiplying both sides by 2, yields:

`2y - 4x = x - 2y `

Yes, it should be `x - 2y` instead of `y - 2x` , hence, evaluating from this point,yields:

`2y + 2y = 4x + x => 4y = 5x`

Since, from the third expression, `x + 2y = 16,` then, multiplying by 2, yields:

`2x + 4y = 32`

Replacing 5x for 4y, yields:

`2x + 5x = 32 => 7x = 32 => x = 32/7`

`y = 5x/4 => y = (5*32)/(4*7) => y = 40/7`

**Hence, evaluating the critical point, yields **`(32/7;40/7).`

**Sources:**