\(2\left(x+2\right)^2-x^3-8=0\)
\(\Leftrightarrow\left(2x+4\right)\left(x+2\right)-\left(x^3+8\right)=0\)
\(\Leftrightarrow\left(2x+4\right)\left(x+2\right)-\left(x+2\right)\left(x^2-2x+4\right)=0\)
\(\Leftrightarrow\left(x+2\right)\left(2x+4-x^2+2x-4\right)=0\)
\(\Leftrightarrow\left(x+2\right)\left(-x^2+4x\right)=0\)
\(\Leftrightarrow-x\left(x+2\right)\left(x-4\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x=0\\x=-2\\x=4\end{matrix}\right.\)
Vậy \(S=\left\{0;-2;4\right\}\)