Ta có:
\(x^2+y^2+z^2-2x+4y-6z=-14\)
\(\Leftrightarrow x^2+y^2+z^2-2x+4y-6z+14=0\)
\(\Leftrightarrow x^2+y^2+z^2-2x+4y-6z+1+4+9=0\)
\(\Leftrightarrow\left(x^2-2x+1\right)+\left(y^2+4y+4\right)+\left(z^2-6z+9\right)=0\)\(\Leftrightarrow\left(x^2-2x.1+1^2\right)+\left(y^2+2y.2+2^2\right)+\left(z^2-2z.3+3^2\right)=0\)
\(\Leftrightarrow\left(x-1\right)^2+\left(y+2\right)^2+\left(z-3\right)^2=0\)
Lại có:
\(\left(x+1\right)^2\ge0\)
\(\left(y+2\right)^2\ge0\)
\(\left(z-3\right)^2\ge0\)
\(\Rightarrow\)\(\left(x-1\right)^2+\left(y+2\right)^2+\left(z-3\right)^2\ge0\)
Dấu "=" chỉ xảy ra khi và chỉ khi \(x-1=y+2=z-3=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x=1\\y=-2\\z=3\end{matrix}\right.\)
Khi đó: \(x+y+z=1-2+3=2\)