# How do you find the greatest common factors of variable expressions?

Sep 3, 2015

The 'normal' way of finding the GCF of two polynomials is to factor both of them completely, then pick out the common factors and multiply them together.

Alternatively you can use division.

#### Explanation:

Normal Method - Factor both polynomials first

For example:

Given $f \left(x\right) = {x}^{2} + 6 x + 9$ and $g \left(x\right) = {x}^{2} + x - 6$,

you can factor $f \left(x\right) = {\left(x + 3\right)}^{2}$ and $g \left(x\right) = \left(x + 3\right) \left(x - 2\right)$

hence the GCF is $\left(x + 3\right)$

Backup Method - Using division of polynomials

Given: $f \left(x\right) = {x}^{4} + 2 {x}^{3} + 4 {x}^{2} + 3 x + 2$
and: $g \left(x\right) = {x}^{4} + 3 {x}^{3} + 6 {x}^{2} + 5 x + 3$

If $f \left(x\right)$ and $g \left(x\right)$ have a common polynomial factor $p \left(x\right)$ then if we divide $f \left(x\right)$ by $g \left(x\right)$ (or vice versa), the remainder must be a multiple of $p \left(x\right)$.

For example, $g \left(x\right) = f \left(x\right) + \left({x}^{3} + 2 {x}^{2} + 2 x + 1\right)$

Let $h \left(x\right) = {x}^{3} + 2 {x}^{2} + 2 x + 1$

If we now divide $f \left(x\right)$ by $h \left(x\right)$ then any remainder will also be divisible by $p \left(x\right)$:

${x}^{4} + 2 {x}^{3} + 4 {x}^{2} + 3 x + 2$

$= \left({x}^{3} + 2 {x}^{2} + 2 x + 1\right) x + 2 {x}^{2} + 2 x + 2$

$= h \left(x\right) \cdot x + 2 \left({x}^{2} + x + 1\right)$

Next try dividing $f \left(x\right)$ by ${x}^{2} + x + 1$ ...

${x}^{4} + 2 {x}^{3} + 4 {x}^{2} + 3 x + 2 = \left({x}^{2} + x + 2\right) \left({x}^{2} + x + 1\right)$

This time there is no remainder, so $p \left(x\right) = {x}^{2} + x + 1$ is our GCF

For a more complex example, see http://socratic.org/questions/if-you-are-told-that-x-7-3x-5-x-4-4x-2-4x-4-0-has-at-least-one-repeated-root-how