Đặt \(\left(a;b;c\right)=\left(x+1;y+1;z+1\right)\) \(\Rightarrow x;y;z\in\left[0;1\right]\)
Do \(x;y;z\in\left[0;1\right]\) nên ta có:
\(x\left(x-1\right)+y\left(y-1\right)+z\left(z-1\right)\le0\)
\(\Leftrightarrow x^2+y^2+z^2\le x+y+z\)
Đồng thời : \(\left(x-1\right)\left(y-1\right)\left(z-1\right)\le0\)
Ta có:
\(P=\left(x-y\right)^2+\left(y-z\right)^2+\left(z-x\right)^2=2x^2+2y^2+2z^2-2xy-2yz-2zx\)
\(\Rightarrow\dfrac{P}{2}=x^2+y^2+z^2-xy-yz-zx\le x+y+z-xy-yz-zx\le xyz+x+y+z-xy-yz-zx\)
\(\Rightarrow\dfrac{P}{2}\le xyz+x+y+z-xy-yz-zx-1+1=\left(x-1\right)\left(y-1\right)\left(z-1\right)+1\le1\)
\(\Rightarrow P\le2\)
Vậy \(P_{max}=2\) khi \(\left(x;y;z\right)=\left(0;0;1\right);\left(0;1;1\right)\) và các hoán vị hay \(\left(a;b;c\right)=\left(1;1;2\right);\left(1;2;2\right)\) và các hoán vị