\(f\left(x\right)=x^{2018}\left(x^2-2x-1\right)+5\left(x^2-2x-1\right)+8\)
Với \(x=1-\sqrt{2}\) ta có:
\(x^2-2x-1=\left(1-\sqrt{2}\right)^2-2\left(1-\sqrt{2}\right)-1\)
\(=3-2\sqrt{2}-2+2\sqrt{2}-1=0\)
\(\Rightarrow f\left(1-\sqrt{2}\right)=\left(1-\sqrt{2}\right)^{2018}.0+5.0+3=3\)