The roots of polynomial $ p(x) $ are:
$$ \begin{aligned}x_1 &= 1.4142\\[1 em]x_2 &= -1.4142\\[1 em]x_3 &= 2.2361\\[1 em]x_4 &= -2.2361\\[1 em]x_5 &= 2i\\[1 em]x_6 &= -2i \end{aligned} $$Polynomial $ x^6-3x^4-18x^2+40 $ has no rational roots that can be found using Rational Root Test, so the roots were found using Newton method.