# Third degree polynomial $P(x) = b_0 + b_1 x +b_2 x^2 +b_3 x^3$

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.

-
Do you have specific coefficients? That might make a big difference. – André Nicolas Nov 8 '11 at 23:47
The best I can say without specific coefficients is that you should guess. If the coefficients are integer, and the problem is from a text book or similar, I would be willing to bet a lot of money that the solutions are integer as well. That will make the guessing job quite a lot easier. – Arthur Nov 8 '11 at 23:51
All $b_k$ are integers. No, this is not a textbook example. Unfortunately I didn't find anywhere any systematic approach to factoring a polynomial and deriving coefficients. – sigma.z.1980 Nov 8 '11 at 23:55
If the bit at Wikipedia goes too fast for you, you might want to do things the way Américo did here. – J. M. Nov 9 '11 at 0:02

If the cubic doesn't factor over the integers, the answer is guaranteed to be messy. Let the roots of the cubic be $r,s,t$, so the cubic factors (over the complex numbers) as $b_3(x-r)(x-s)(x-t)$. Write

$${1\over{\rm cubic}}={a\over x-r}+{b\over x-s}+{c\over x-t}$$

multiply through by the cubic to get

$$1=b_3(a(x-s)(x-t)+b(x-r)(x-t)+c(x-r)(x-s))$$

evaluate succesively at $x=r$, $x=s$, and $x=t$ to get

$$a={1\over b_3(r-s)(r-t)}$$

etc.

-
thanks, but it's not much different from equating the coefficients, I still end up with three fractions. – sigma.z.1980 Nov 9 '11 at 4:24
How many fractions do you think you should end up with? You want to expand 1/cubic in partial fractions, right? If cubic has three real roots, you will need one fraction for each, don't you think? – Gerry Myerson Nov 9 '11 at 5:08
$\frac{1}{(x^2-r)(x-s)}$ is one of the possibilities – sigma.z.1980 Nov 9 '11 at 20:19
Yes, but if you had $(ax+b)/(x^2-r)$ then under the usual interpretation of the term "partial fractions" you would be expected to continue to $c/(x-\sqrt r)+d/(x+\sqrt r)$. Also, the chances that a random cubic would factor as $(x^2-r)(x-s)$ are one in infinity. – Gerry Myerson Nov 10 '11 at 0:24
@GerryMyerson It depends where the problem comes from though... If we pick a random cubic with integer coefficients, the chances it has 3 integer roots are also one in infinity, yet the ones we solve in "easy" classes always have integer solutions... – N. S. Dec 9 '11 at 4:59