Có: \(x+y+z=3\)
\(\Leftrightarrow x^2+y^2+z^2+2\left(xy+yz+zx\right)=9\)
Vì: \(\left(x-y\right)^2+\left(y-z\right)^2+\left(z-x\right)^2\ge0,\forall x,y,z\)
\(\Leftrightarrow x^2-2xy+y^2+y^2-2yz+z^2+z^2-2zx+x^2\ge0\)
\(\Leftrightarrow2\left(x^2+y^2+z^2\right)\ge2\left(xy+yz+zx\right)\)
\(\Leftrightarrow x^2+y^2+z^2\ge xy+yz+zx\)
\(\Leftrightarrow3\left(xy+yz+zx\right)\le x^2+y^2+z^2+2\left(xy+yz+zx\right)=9\)
\(\Leftrightarrow xy+yz+zx\le3\)
Vậu GTLN của P là 3 khi \(x=y=z=1\)