I need to factor $P(x)$ in order to expand the fraction $\frac{1}{P(x)}$ in partial fractions. What I did I rewrote the original one as
$ P(x)=(b-\theta_1 x)(b-\theta_2x)(b_3 - \theta_3 x) $
then expanded it and equated coefficients at $x$ (e.g. for $x^3$ it would be $-\theta_1 \theta_2 \theta_3=b_3$ and so on). As a results algebra got really messy (e.g. see Wikipedia entry on roots of cubic function), so I wonder if there exists some easier method of doing it.