\(B=2x+12y+6z-x^2-4y^2-z^2-18\)
\(B=-\left(x^2-2x+1\right)-\left[\left(2y\right)^2-12y+9\right]-\left(z^2-6z+9\right)\)
\(B=-\left(x-1\right)^2-\left(2y-3\right)^2-\left(z-3\right)^2\)
Vì \(-\left(x-1\right)^2< 0\)Với mọi x
\(-\left(2y-3\right)^2< 0\)Với mọi y
\(-\left(z-3\right)^2< 0\)Với mọi z
Nên \(-\left(x-1\right)^2-\left(2y-3\right)^2-\left(z-3\right)^2< 0\)Với mọi x, y, z
Vậy GTLN của B \(\Leftrightarrow-\left(x-1\right)^2-\left(2y-3\right)^2-\left(z-3\right)^2=0\)
\(\left\{{}\begin{matrix}-\left(x-1\right)^2=0\\-\left(2y-3\right)^2=0\\-\left(z-3\right)^2=0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}x=1\\y=1,5\\z=3\end{matrix}\right.\)