Lời giải:
Xét hiệu:
\(x^2+y^2+z^2-xy-yz-xz=\frac{2(x^2+y^2+z^2)-2(xy+yz+xz)}{2}\)
\(=\frac{(x-y)^2+(y-z)^2+(z-x)^2}{2}\)
Thấy rằng \((x-y)^2; (y-z)^2; (z-x)^2\geq 0\forall x,y,z\in\mathbb{R}\)
\(\Rightarrow \frac{(x-y)^2+(y-z)^2+(z-x)^2}{2}\geq 0\)
hay \(x^2+y^2+z^2-xy-yz-xz\geq 0\)
\(\Leftrightarrow x^2+y^2+z^2\geq xy+yz+xz\)
\(\Leftrightarrow x^2+y^2+z^2+2(xy+yz+xz)\geq 3(xy+yz+xz)\)
\(\Leftrightarrow (x+y+z)^2\geq 3(xy+yz+xz)\Leftrightarrow 9\geq 3(xy+yz+xz)\)
\(\Leftrightarrow xy+yz+xz\leq 3\)
Vậy \((P=xy+yz+xz)_{\max}=3\)
Dấu bằng xảy ra khi \(x=y=z=1\)