Ta có: \(\left(x-y\right)^2+\left(y-z\right)^2+\left(z-x\right)^2\ge0\)(đúng)
\(\Leftrightarrow2x^2+2y^2+2z^2-2\left(xy+yz+zx\right)\ge0\)
\(\Leftrightarrow x^2+y^2+z^2\ge xy+yz+zx\)
\(\Rightarrow3\left(xy+yz+zx\right)\le\left(x+y+z\right)^2\)
\(\Rightarrow3\left(xy+yz+zx\right)\le9\)(x+y+z=3)
\(\Rightarrow\left(xy+yz+zx\right)\le3\)
(Dấu "="\(\Leftrightarrow x=y=z=1\))
Hiển nhiên:
\(\frac{3}{4}\left(x-z\right)^2+\frac{1}{4}\left(x+z-2y\right)^2\ge0\)
\(\Leftrightarrow xy+yz+zx\le x^2+y^2+z^2\Leftrightarrow\left(xy+yz+zx\right)\le\frac{\left(x+y+z\right)^2}{3}=3\)
Đẳng thức xảy ra khi x = y = z = 1
Vậy Max B = 3.