# Math Help - Factoring by adding and subtracting a number

1. ## Factoring by adding and subtracting a number

Do you guys know the trick where you add and subtract the same number to an equation to render it factorable?
Like factoring x^2-x+1=0 or x^2+x-1=0

2. ## Re: Factoring by adding and subtracting a number

Originally Posted by sakonpure6
Do you guys know the trick where you add and subtract the same number to an equation to render it factorable?
Like factoring x^2-x+1=0 or x^2+x-1=0
sounds like you're talking about completing the square.

$$x^2+bx+c =$$

$$\left(x+\frac{b}{2}\right)^2+\left(c-\left(\frac{b}{2}\right)^2\right)$$

3. ## Re: Factoring by adding and subtracting a number

Let's look at what a perfect square looks like:

$$(x + a)^2 = x^2 + 2ax + a^2$$

Note the coefficient of x is 2a, which is twice what we were adding to x to square it.

So if we have an expression like:

$$x^2 + bx + c$$

we want "b" to be "twice of something", which we then square.

Well, b is obviously twice of b/2, so let's look at what (x + b/2) looks like when squared:

$$\left(x + \frac{b}{2}\right)^2 = x^2 + 2\frac{b}{2}x + \frac{b^2}{4} = x^2 + bx + \frac{b^2}{4}$$

so to get:

$$x^2 + bx + c$$

in the "form" we want, we have to add and subtract "the last part" which is:

$$\frac{b^2}{4}$$

In other words:

$$x^2 + bx + c = x^2 + bx + \frac{b^2}{4} - \frac{b^2}{4} + c = \left(x + \frac{b}{2}\right)^2 + \left(c - \frac{b^2}{4}\right)$$

which is what romsek wrote.

4. ## Re: Factoring by adding and subtracting a number

Originally Posted by sakonpure6
Do you guys know the trick where you add and subtract the same number to an equation to render it factorable?
Like factoring x^2-x+1=0 or x^2+x-1=0
It is certainly common to render something soluble by adding zero to it by means of + a - a or by multiplying by one by means of * a / a (a not equal to zero).

In terms of a quadratic, this adding zero by adding and subtracting an appropriate quantity is called completing the square, which is actually the source of the quadratic formula.

$x^2 + x - 1 = 0 \implies x^2 + x + \dfrac{1}{4} - 1 -\dfrac{1}{4} = 0 \implies x^2 + x + \dfrac{1}{4} = \dfrac{5}{4} \implies \left(x + \dfrac{1}{2}\right)^2 =\dfrac{5}{4} \implies$

$x + \dfrac{1}{2} = \pm \sqrt{\dfrac{5}{4}} = \pm \dfrac{1}{2} * \sqrt{5} \implies x = \dfrac{1}{2} * \left(\sqrt{5} - 1\right)\ or\ x = - \dfrac{1}{2} * \left(\sqrt{5} + 1\right).$

Let's check: $\left\{\dfrac{1}{2} * \left(\sqrt{5} - 1\right)\right\}^2 + \dfrac{1}{2} * \left(\sqrt{5} - 1\right) - 1 = \dfrac{1}{4} * (5 - 2\sqrt{5} + 1) + \dfrac{1}{2} * \sqrt{5} - \dfrac{1}{2} - 1 = \dfrac{5}{4} - \dfrac{1}{2} * \sqrt{5} + \dfrac{1}{4} + \dfrac{1}{2} * \sqrt{5} - \dfrac{3}{2} = 0.$

The "trick" here is finding the number to add and subtract. Look at the coefficient of x. Here it is 1. Divide it by two. Square it. In this case, it gives you 1/4.

Now you have $\left(x^2 + x + \dfrac{1}{4}\right) + \left(- 1 - \dfrac{1}{4}\right).$

But $(x^2 + 2ax + a^2 = (x + a)^2.$ See why we divided by 2 and squared. It gave us an expression that is a nice square.

If that is at all unclear, please ask for clarification.

5. ## Re: Factoring by adding and subtracting a number

Awesome, thank you guys. Very informative!!