Ta có: \(\left(x-2018\right)^3+\left(x-2019\right)^3-\left(2x-4037\right)^3=0\)
\(\Leftrightarrow\left(x-2018\right)^3+\left(x-2019\right)^3-\left[\left(2x-4036\right)-1\right]^3=0\)
\(\Leftrightarrow\left(x-2018\right)^3+\left(x-2019\right)^3-\left[2\left(x-2018\right)-1\right]^3=0\)
Đặt x-2018=a
Phương trình trở thành: \(a^3+\left(a-1\right)^3-\left[2a-1\right]^3=0\)
\(\Leftrightarrow a^3+a^3-3a^2+3a-1-\left(8a^3-12a^2+6a-1\right)=0\)
\(\Leftrightarrow2a^3-3a^2+3a-1-8a^3+12a^2-6a+1=0\)
\(\Leftrightarrow-6a^3+9a^2-3a=0\)
\(\Leftrightarrow-3a\left(2a^2-3a+1\right)=0\)
\(\Leftrightarrow a\left(2a-1\right)\left(a-1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}a=0\\2a-1=0\\a-1=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}a=0\\a=\dfrac{1}{2}\\a=1\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x-2018=0\\x-2018=\dfrac{1}{2}\\x-2018=1\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x=2018\\x=\dfrac{4037}{2}\\x=2019\end{matrix}\right.\)
Vậy: \(S=\left\{2018;\dfrac{4037}{2};2019\right\}\)