# Inequalities, but working around an absolute value

So what I want to prove is $$|xy+xz+yz- 2(x+y+z) + 3| \leq |x^2+y^2+z^2-2(x+y+z)+3|$$ for $$x,y,z\in \mathbb{R}$$, and I'm aware that the RHS is just $$|(x-1)^2+(y-1)^2+(z-1)^2|$$.

Now I'm able to prove that $$x^2+y^2+z^2 \geq xy+xz+yz$$ as this just follows from the AM-GM inequality. So I know that the statement without the absolute values must be true, i.e. $$xy+xz+yz- 2(x+y+z) + 3 \leq x^2+y^2+z^2-2(x+y+z)+3$$ But I can't see why I'm safe to just put absolute values on both sides here. Because I'm not sure why the LHS is guaranteed to be smaller in magnitude than the RHS?

(I thought about Cauchy-Schwarz being hidden here but then I realised that I could not see how.)

Edit: Alternatively I also understand that $$|xy+xz+yz| \leq |xy|+|xz|+|yz| \leq |x|^2+|y|^2+|z|^2 = x^2+y^2+z^2 = |x^2+y^2+z^2|$$ but then if I try to adapt this path, the $$-2(x+y+z)$$ bit throws me off

Since $$x^2+y^2+z^2-2(x+y+z)+3=\sum_{cyc}(x-1)^2\geq0,$$ we need to prove that $$x^2+y^2+z^2-2(x+y+z)+3 \geq xy+xz+yz- 2(x+y+z) + 3\geq$$ $$\geq-(x^2+y^2+z^2-2(x+y+z)+3)$$

The left inequality it's $$\sum_{cyc}(x-y)^2\geq0,$$ which is true and the right it's $$\sum_{cyc}(x^2+xy-4x+2)\geq0,$$ which is true for all reals $$x$$, $$y$$ and $$z$$.

We can prove it by numbers of ways, but I like the following.

Let $$x+y+z=3u$$, $$xy+xz+yz=3v^2$$, where $$v^2$$ can be negative, and $$xyz=w^3$$.

Thus, the last inequality does not depend on $$w^3$$, which says that it's enough to prove it for extreme value of $$w^3$$, which happens for equality case of two variables.

Let $$y=x$$.

Thus, we need to prove that $$3x^2+2(z-4)x+z^2-4z+6\geq0,$$ for which it's enough to prove that $$(z-4)^2-3(z^2-4z+6)\leq0$$ or $$(z-1)^2\geq0$$ and we are done!

Actually, the inequality $$\sum_{cyc}(x^2+xy-4x+2)\geq0$$ it's just $$\sum_{cyc}(x+y-2)^2\geq0,$$ but it's not so easy to see.

Hint: You have shown $$|xy+yz+zx|\leqslant |x^2+y^2+z^2|$$. Now replace $$(x,y,z)$$ with $$(x-1,y-1,z-1)$$

have you tried evaluating: $$(x-1)(y-1) + (y-1)(z-1) +(z-1)(x-1)$$ ?