# [how to factor ] X^ 4

1. Jan 30, 2012

### kougou

[how to factor!!!!!!!] X^ 4

1. The problem statement, all variables and given/known data
hello guys

we are doing partial fraction, and I have trouble factoring.

2. Relevant equations

for instance, this one: X^4 +X^5 +4

how do I factor this polynomials?

3. The attempt at a solution

After several attempts, I figure out its factors are (x^2 +1) (x^2 +4)
is there a systematic ways to factor x^3 or x^4 or even x^5?

than you

2. Jan 30, 2012

### SammyS

Staff Emeritus
Re: [how to factor!!!!!!!] X^ 4

Well, (x2 + 1)(x2+4) = x4 +5x2 + 4.

So you must have a typo or two or three somewhere !

3. Jan 30, 2012

### kougou

Re: [how to factor!!!!!!!] X^ 4

Is there a systematic ways of doing these factoring?

4. Jan 30, 2012

### Simon Bridge

Re: [how to factor!!!!!!!] X^ 4

"factorize" is, perhaps, a more common term for this, or "expand".

This one?

... you mean for 4th and 5th order polynomials?
Factorizing amounts to finding the roots of the polynomials - for an arbitrary polynomial this is non-trivial ... for instance, there is a numerical method involving eigenvalues... Order 5 is called a quintic and order 4 is a quartic. The links discuss how to solve them in gerneral.

You can see that it is actually going to be easier just to guess and use long-division.

Note: a polynomial of degree n has form:$$P_n=a_0x^0+a_1x^1+a_2x^2+ \cdots + a_{n-1}x^{n-1}+a_nx^n$$... and it can be factorized into form:$$(x-p_1)(x-p_2)\cdots (x-p_{n-1})(x-p_n)$$... where pn is the nth root of the polynomial. Bear in mind that some or all of these roots may be zero.

For example: $x^3-x = x(x^2-1)=(x+0)(x+1)(x-1)$

Over time you gain experience working these out.

Your example looks to have only one (real) root (between -1.5 and -1.75).

It is very useful to guide your guesses by graphing the polynomial. For hard ones like this, you can get a close estimate and use the Newton-Raphson method to refine it.
eg. N-R gives: p = -1.60411409672500
Code (Text):
ans = -1.50000000000000
octave:341> ans-((ans^4+ans^5+4)/(4*ans^3 + 5*ans^4))
ans = -1.62433862433862
octave:342> ans-((ans^4+ans^5+4)/(4*ans^3 + 5*ans^4))
ans = -1.60473066865962
octave:343> ans-((ans^4+ans^5+4)/(4*ans^3 + 5*ans^4))
ans = -1.60411468800661
octave:344> ans-((ans^4+ans^5+4)/(4*ans^3 + 5*ans^4))
ans = -1.60411409672554
octave:345> ans-((ans^4+ans^5+4)/(4*ans^3 + 5*ans^4))
ans = -1.60411409672500
octave:346> ans-((ans^4+ans^5+4)/(4*ans^3 + 5*ans^4))
ans = -1.60411409672500
octave:347> ans-((ans^4+ans^5+4)/(4*ans^3 + 5*ans^4))
ans = -1.60411409672500
Analytically, I suppose you could try long division in general - assume p is a root of f(x), then use long division to compute f(x)/(x-p) ... which will give you a quartic in p whose roots are also roots of the quintic. Then repeat for f(p)/(x-q) to get a cubic in q, and again for f(r)/(x-r) to get a quadratic which you can solve. This will give you 2 roots for f(r) (which may be complex) which you can use to get the roots of f(q) which you can use to get the remaining root of f(p) and so get p.

I've never done it - anyone see a problem with this?

Anyway - this is the sort of thing we give to a computer:
Code (Text):
octave:403> p=[1 1 0 0 0 4]
p =

1   1   0   0   0   4

octave:404> polyout(p,'x')
1*x^5 + 1*x^4 + 0*x^3 + 0*x^2 + 0*x^1 + 4
octave:405> roots(p)
ans =

-1.604114096724996 + 0.000000000000000i
-0.607996790143070 + 1.190333776161391i
-0.607996790143070 - 1.190333776161391i
0.910053838505568 + 0.753362200265109i
0.910053838505568 - 0.753362200265109i

... you have two pairs of complex roots, the factorization will have the form of the product of two quadratics and a line.

The function does this by computing the companion matrix for the polynomial then finding it's eigenvalues.
May be a bit ahead of you perhaps?

Last edited: Jan 30, 2012