Inequality: $x^2+y^2+xy\ge 0$ [duplicate]

I want to prove that $x^2+y^2+xy\ge 0$ for all $x,y\in \mathbb{R}$.

My "proof": Suppose wlog that $x\ge y$, so $x^2\cdot x\ge x^2\cdot y\ge y^2\cdot y=y^3$ (because $x^2\ge 0$ so we can multiply both sides by it without changing the inequality sign) giving $x^3\ge y^3$. Substracting we have $x^3-y^3\ge 0$ or $(x-y)(x^2+xy+y^2)\ge 0$. Since $x\ge y$ we can divide by $x-y$ to get $x^2+xy+y^2\ge 0$.

Is it right?

Thanks for your help!


Solution 1:

Note that we can prove it by $$x^2+y^2+xy=\left(x+\frac y2\right)^2+\frac{3}{4}y^2\ge 0.$$

Solution 2:

The question posed was whether the OP's proof is correct. Mark Bennet pointed out one flaw in comments, namely that you can't divide by $x-y$ if $x=y$. It's worth noting another problem with the proof: You can indeed suppose wlog that $x\ge y$, from which $x^2\cdot x\ge x^2\cdot y$ follows (because $x^2\ge0$), but the full inequality, ending in $\ge y^2\cdot y=y^3$, does not. If, for example, $x=2$ and $y=-1$, we do not have $2^2\cdot(-1)\ge(-1)^2\cdot(-1)$.

Solution 3:

One (simple) way:

let t = x2 + y2 + xy

then t - xy ≥ 0 since it is the sum of two real squares x2 + y2

and t + xy ≥ 0 since it is the square of the real (x + y) [since (x + y)2 = x2 + y2 + 2xy]

adding these, we get 2t ≥ 0, therefore t ≥ 0