Ta có \(x^2+1=x^2+xy+yz+xz=\left(x+y\right)\left(x+z\right)\)
\(y^2+1=\left(y+z\right)\left(y+x\right)\)
\(z^2+1=\left(z+x\right)\left(z+y\right)\)
Khi đó
\(S=x.\sqrt{\left(y+z\right)^2}+y.\sqrt{\left(x+z\right)^2}+z.\sqrt{\left(x+y\right)^2}=2\left(xy+yz+xz\right)=2\)