How to minimize $x^2+4xy+5y^2-4x-6y+7$ without using calculus

452 Views Asked by At

I would like to find the smallest possible value of the function

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

without taking any derivatives. My thoughts were to complete the square on both $x$ and $y$ and choose appropriate values to make the nonnegative squared terms equal to $0$. Completing the square two times the function becomes

$$\left(x+2y \right)^2 + \left(y-3 \right)^2-4x-2$$

And then it seems appropriate to take $x=-2y$ and $y=3$. These values do not appear to be minimizers though, as calculus and the following graph can verify. The minimizing values appear to be $y=-1$ and $x=4$ instead.

enter image description here

Have I done something wrong in the above?

Thank you.

2

There are 2 best solutions below

4
On BEST ANSWER

Write like this:

$$(y+1)^2+(x+2y-2)^2+2.$$

3
On

Here is an alternative way. When you see there is an extra $x$ term there, you can do a change of variable $u=x+2y$ and $v=y-3$. Then $x=u-2y=u-2(v+3)$. Then the equation can be changed into

$$u^2+v^2-4u+8v+22$$

Using this you can do another normal completing the square.