Ta có:
\(3-S=\left(x^2+4y^2+9z^2\right)-\left(2x+4y+6z\right)\)
\(\Leftrightarrow3-S=\left(x^2-2x+1\right)+\left(4y^2-4y+1\right)+\left(9z^2-6z+1\right)-3\)
\(\Leftrightarrow6-S=\left(x-1\right)^2+\left(2y-1\right)^2+\left(3z-1\right)^2\ge0\)
\(\Leftrightarrow S\le6\)
\(S_{max}=6\) khi \(\left\{{}\begin{matrix}x-1=0\\2y-1=0\\3z-1=0\end{matrix}\right.\) \(\Leftrightarrow\left(x;y;z\right)=\left(1;\dfrac{1}{2};\dfrac{1}{3}\right)\)