# Simplification of equation

How to get alternative form from equation 1)

$$1) -a^2 + a + b^2 -b$$

to equation 2)

$$2) (a-b)(a+b-1)$$

• Your second equation appears to be missing a negative sign. $-a^2+a+b^2-b=-(a-b)(a+b-1)$ – Ian Miller May 2 '17 at 9:44
• Hint $a^2 - b^2 = (a+b)(a-b)$ (difference of squares). – Toby Mak May 2 '17 at 9:46

$$-a^2+a+b^2-b=-(a^2-b^2)+(a-b)$$

$$=-(a-b)(a+b)+(a-b)$$

To make it more obvious let $C=a-b$

$$=-C(a+b)+C$$

$$=C\big(-(a+b)+1\big)$$

$$=-C\big((a+b)-1\big)$$

$$=-(a-b)(a+b-1)$$

Group terms and factor, e.g. by first using $\color{blue}{a^2-b^2=(a-b)(a+b)}$ and then putting the common term $\color{red}{a-b}$ up front: \begin{align}-a^2 + a + b^2 -b & = -\left(\color{blue}{a^2-b^2}\right)+a-b \\[4 pt] & = -\color{blue}{\left(a-b\right)\left(a+b\right)}+a-b \\[4 pt] & = -\color{red}{\left( a-b \right)} \left( \left(a+b\right)+1\right) \\[4 pt] & = -\left( a-b \right) \left( a+b+1\right) \end{align} Note that there's an extra minus (missing in your answer).

First rearrange the equation slightly:

$$b^2-a^2+a-b$$

Note that we have a 'difference of two squares'

$$(b-a)(b+a)+a-b$$

Recognise that $a-b\equiv -(b-a)$

$$(b-a)(b+a)-(b-a)$$

Now we have $(b-a)$ as a common factor so factorise:

$$(b-a)\left ((b+a)-1 \right)$$

becomes

$$(b-a)(b+a-1)$$

and

$$-(a-b)(a+b-1)$$

Another way would be polynomial division.

$-a^2 + a + b^2 - b : (a-b) = -a -b +1$

$a^2 - ab$

$-ab +a +b^2 -b$

$ab -b^2$

$a - b$