1. ## Factoring problem

Factor the expression:
$\displaystyle a^4+2a^3b-3a^2b^2-4ab^3+4b^4$
The answer is $\displaystyle (a-b)^2(a+2b)^2$(according to my book).

2. Hello, brainmixer!

Here's one of the ways to factor this polynomial . . .

Factor: .$\displaystyle a^4+2a^3b-3a^2b^2-4ab^3+4b^4$

Factor by grouping:

. . $\displaystyle a^2(a^2+2ab - 3b^2) - 4b^3(a - b)$

. . $\displaystyle = \;a^2{\color{blue}(a-b)}(a+3b) - 4b^3{\color{blue}(a-b)}$

. . $\displaystyle = \;(a-b)\cdot\bigg[a^2(a+3b) - 4b^3\bigg]$

. . $\displaystyle = \;(a-b)\cdot\bigg[a^3 {\color{red}+ \,3a^2b} - 4b^3\bigg]$

. . $\displaystyle = \;(a-b) \cdot\bigg[a^3 {\color{red}-\,a^2b + 4a^2b} - 4b^3\bigg]$

. . $\displaystyle = \;(a-b)\cdot\bigg[a^2(a-b) + 4b(a^2-b^2)\bigg]$

. . $\displaystyle = \;(a-b)\cdot\bigg[a^2{\color{blue}(a-b)} + 4b{\color{blue}(a-b)}(a+b)\bigg]$

. . $\displaystyle = \;(a-b)\cdot(a-b)\cdot\bigg[a^2 + 4b(a+b)\bigg]$

. . $\displaystyle = \;(a-b)^2\cdot[a^2+4ab+b^2]$

. . $\displaystyle = \;(a-b)^2\cdot(a+2b)^2$