# Factoring polynomials in general

1. Nov 6, 2012

### beaf123

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

I was wondering how people intuitively see how to decompose functions?

For example:

x^2 + 5x - 14, how do you solve that to be (x+7)(x-2) without a calculator?

Do you use a specific method or do you just sit for a while trying and failing?

The question is a bit stupid, but were wondering if there is a formula or a simple method that Im missing?

2. Nov 6, 2012

### Mentallic

It's trial and error really, but with some practice you can do it within seconds. Or, if you're willing to put a little more effort in, you'll get the answer without having to resort to trial and error.

Ok, with the trial and error method -
If you expand the factored form, you'll get $$(x+7)(x-2) = x^2-2x+7x-7*2$$ by the FOIL method. Notice 7*2 = 14, but I purposely wrote it that way. So it's clear that we want our quadratic to be of the form (x+a)(x+b) where a*b is equal to the constant term, in this case, -14. Now, the only integers that multiply together to get -14 are
-1 and 14
1 and -14
-2 and 7
2 and -7

So how do we know which combination to use? It all comes down to what the coefficient of x is, in our case, 5. So which combination from the options add together to give 5? That would be 7 and -2, so that is the combination we use.

The method without trial and error would be to use the quadratic formula. There's heaps of that on the internet that you can read about.

3. Nov 6, 2012

### haruspex

One way is to assume there's a nice factorisation and try a few values.
In the above, try x=1 - no, that gives -8; for sufficiently large x it will be positive, so must be a root > 1. Try 3 - no that gives +10, so ....

4. Nov 7, 2012

### HallsofIvy

Staff Emeritus
Typically, when we say "factor" we mean "separate into factors with integer coefficients". (x+ a)(x+ b)= x2+ (a+b)x+ ab so, in the case you give we observe that 14 can only be factored as (1)(14) or (2)(7). Neither 1+ 14 nor 1- 14 gives 5 but 7- 2= 5 so it must be (x- 2)(x+ 7) with "+" or "-" chosen to give the correct signs.

Of course, "almost all" polynomials cannot be factored with integer coefficients. In that case, the best we can do is set the polynomial equal to 0, solve the equation in some other way and then use the solutions to find the factors. For example, to try to factor $x^2- 8x+ 3$ we first observe that "3" can only be factored as (1)(3) (3 is prime) and that none of 1+ 3, 1- 3, -1+ 3, -1- 3 will give -8. But we can "complete the square" to see that $x^2- 8x+ 3= x^2- 8x+ 16- 16+ 3= (x- 4)^2- 13$ so that the solutions to $$x^2- 8x+ 3= 0$$ are $4+\sqrt{13}$ and $4- \sqrt{3}$ so that $x^2- 8x+ 3= (x- 4- \sqrt{13})(x- 4+ \sqrt{13})$.