# Thread: collecting like terms; two variables

1. ## collecting like terms; two variables

forgot how to do it, brains have gone to after the summer holiday;

collect the like terms;

x2 - 4ax - 5a2

= (x+a)(x-5a), not sure how to get there though, probably completing the square

2. ## Re: collecting like terms; two variables

note that if you do x = -a, you get $\displaystyle a^2 + 4a^2 - 5a^2 = 0$ so you can factor out (x--a) or (x+a).

so (x+a)*(x-5a) , because if you can factor out (x+a), and you do (x+a)*(x+b), then a*b = $\displaystyle -5a^2$ so b = -5a.

3. ## Re: collecting like terms; two variables

i appreciate the quick response, but I have no idea how you factor out (x+a) from a^2 + 4a^2 - 5a^2

4. ## Re: collecting like terms; two variables

For any polynomial p(x), if you can find a root r, so p(r) = 0, then (x-r) divides p(x) with remainder 0. so you get p(x) = (x-r)*quotient .

but in your case using the quadratic formula can also solve this dilemna.

So for $\displaystyle x^2 - 4ax - 5a^2$ the quadratic formula $\displaystyle \frac{4a \pm \sqrt{16a^2 - 4(1)(-5a^2)}}{2} = \frac{4a \pm \sqrt{36a^2}}{2}$ which gives roots $\displaystyle x_1 = -a, x_2 = 5a$ so (x--a)*(x-5a) also gives you the factorization.

5. ## Re: collecting like terms; two variables

Originally Posted by ndowner
forgot how to do it, brains have gone to after the summer holiday;

collect the like terms;

x2 - 4ax - 5a2

= (x+a)(x-5a), not sure how to get there though, probably completing the square
This is a slightly different way:

$\displaystyle x^2-4ax-5a^2 = x^2-4ax\color{red}+\left(\frac{4a}2 \right)^2 - 4a^2\color{black}-5a^2 = \underbrace{(x-2a)^2-9a^2}_{\text{difference of squares}}$

You can factor a difference of squares to:

$\displaystyle (x-2a)^2-9a^2 = \left( (x-2a)-3a\right)\left( (x-2a)+3a\right) = \boxed{(x-5a)(x+a)}$