The roots of polynomial $ p(x) $ are:
$$ \begin{aligned}x_1 &= -1.7161+0.9639i\\[1 em]x_2 &= -1.7161-0.9639i\\[1 em]x_3 &= 1.7161+3.1561i\\[1 em]x_4 &= 1.7161-3.1561i \end{aligned} $$Polynomial $ x^4+5x^2+31x+50 $ has no rational roots that can be found using Rational Root Test, so the roots were found using quartic formulas.