5
$\begingroup$

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.

$\endgroup$
2
  • 3
    $\begingroup$ That is the idea, but you didn't completely complete the square. You should take the $x^2+4xy-4x=x^2+2x(2y-4)$ and complete that square before moving to complete the square with the $y^2$. $\endgroup$
    – OR.
    Apr 4, 2015 at 18:48
  • 2
    $\begingroup$ ... $x^2+2x(2y-2)$* $\endgroup$
    – OR.
    Apr 4, 2015 at 18:55

2 Answers 2

4
$\begingroup$

Write like this:

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

$\endgroup$
4
  • $\begingroup$ I can see that this factorization gives the correct values but how can you tell which factorization to carry out? $\endgroup$
    – JohnK
    Apr 4, 2015 at 18:52
  • 1
    $\begingroup$ @JohnK: Notice that the terms which are “left over” by your own factorization seem to remind us of $(x-2)^2$ But we already have a term of the form $(x+\ldots)^2$. So, putting the two together... $\endgroup$
    – Lucian
    Apr 4, 2015 at 18:59
  • $\begingroup$ @Lucian I see, thank you. $\endgroup$
    – JohnK
    Apr 4, 2015 at 19:00
  • 1
    $\begingroup$ Ignore the constant term. The 4xy tells you to think of (x+2y)^2. This takes care of x^2 and 4y^2 so you need a factor of (y+c)^2. To take care of the x term, we need to add a constant inside the (x+2y) term $\endgroup$ Apr 4, 2015 at 19:01
2
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ (+1) I like the method but I wouldn't have spotted the substitution. How did you realise that particular substitution? $\endgroup$
    – Karl
    Apr 4, 2015 at 19:03
  • $\begingroup$ Well, there is that $x$ there that you want to get rid of, if you want to get the minimum point. Also linear substitution usually doesn't destroy the structure of the function, so the minimum can still be found this way.. $\endgroup$
    – KittyL
    Apr 4, 2015 at 19:06
  • $\begingroup$ Thanks. I initially want to do $(x-2)^2-4+5(y-\frac{6}{10})^2-\frac{36}{100})+4xy+7$ So I was trying to ditch the $4xy$ $\endgroup$
    – Karl
    Apr 4, 2015 at 19:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .