# How do you approach when completing the square?

If $$M = 3x^2 - 8xy + 9y^2 - 4x + 6y + 13$$, where $$x,y\in\mathbb R$$, then $$M$$ must be:

a) positive $$\qquad$$b) negative $$\qquad$$c) $$0 \qquad$$ d) an integer

I somehow managed to figure it out by completing the square but in order to do so, it took me a lot of time and I'm not sure if every time I could solve such problems.

This whole expression can be written as: $$2(x - 2y)^2 + (x - 2)^2 + (y + 3)^2$$ which implies $$M$$ is positive.

My point is sometimes I'm lucky and I could group them in squares but other times not. Is there any particular technique/method which always works?

Secondly I also wanna know what you guys observe when completing the squares?

• In my opinion, the key term that must be focused on first is the $8xy$ term. This is because there seems to be wiggle room everywhere else, re raising/lowering the $x^2$ or $y^2$ terms. So, the 1st try should be $(ax + by)^2$ where $2ab = 8.$ Then, try to make everything fit around that. Sep 16 at 8:47
• While you should definitely solidify your ability to pick an approach for the hard math, there is a parallel part of any math problem (especially when applied with units in a real world scenario) that would completely answer this question. You should always ask Does my answer make sense? and that often means getting a rough idea in your head of pos/neg and/or order of magnitude. Use it to validate any calculations. In this case options c and d don't make sense (x=0.123, y=0.357). Plus c can't be true without d. Then plug in y=1, x=1 and you get 3 - 8 + 9 - 4 + 6 + 13 -> positive. Sep 16 at 17:10

\begin{align} &3x^2 - 4x(2y+1)+ (9y^2 + 6y + 13-M)=0\\ \implies &\Delta_x=4(2y+1)^2-3(9y^2+6y+13-M)≥0\\ \implies &3M≥11y^2+2y+35\\ \implies &3M≥11 \left(y + \frac{1}{11}\right)^2 + \frac{384}{11}\\ \implies &3M≥\frac{384}{11}\\ \implies &M≥\frac{128}{11}>0.\end{align}
• Ah nice, $\Delta_x$ is the discriminant of the quadratic in $x$. Nice idea
• @Navdeep To optimize the polynomial, the roots are considered real. If we are talking about complex numbers, then $M=0$ can be and $M > 0$ can also be. It can be $M<0$ too. So your question loses its meaning. Notice, when completing the square you assumed that $x,y$ were real. Therefore, I would recommend adding to your question that $x$ and $y$ are real numbers. Otherwise, the polynomial cannot be optimized. Sep 16 at 15:52