Prove that $4x^2-8xy+5y^2\geq0$ - is this a valid proof?

I need to prove that $4x^2-8xy+5y^2\geq0$ holds for every real numbers $x, y$.

First I start with another inequality, i.e. $4x^2-8xy+4y^2\geq0$, which clearly holds as it can be factorized into $(2x-2y)^2\geq0$. Now we can add $y^2$ (which is always nonnegative) to the left side, thus obtaining $4x^2-8xy+5y^2\geq0$, which is always true - we've just added a nonnegative expression to another, so the sum is still greater or equal to zero.

Is my proof correct? I had it on my final math exam and would like to be sure.


Solution 1:

You gave a so called sum of squares certificate for the non-negativity. If you can write a polynomial as a sum of squares of polynomials, then it is non-negative, though the converse need not hold. You may look up the history of "Hilbert's 17th problem" for more details.

Solution 2:

Correct, and you can write it in one line if you don't need to justify the tiny steps:

$4x^2-8xy+5y^2 = (2x-2y)^2+y^2 \ge 0$.

Using this sum-of-squares technique you also get that equality occurs exactly when $2x-2y = 0$ and $y = 0$, or equivalently when $(x,y) = (0,0)$.