# $a^2b + abc + a^2c + ac^2 + b^2a + b^2c + abc +bc^2$ factorisation

I came across this from a university mathematics resource page but they do not provide answer to this.

$(a^2+b^2+c^2)(a+b+c) - (a^3 + b^3 + c^3) + 2abc$

But I don't think this is the correct solution. How should I spot how to factorise expression here?

I wish to learn more of this seemingly complex and uncommon algebra factorisation.
Can you recommend me a book or a website for this?

There seem to be only common factorisations when I google.

Many thanks in advance,
Chris

Denote by $f(a,b,c)$ the polynomial above. Note that it vanishes for $b=-a$, or $c=-a$ or $b=-c$ (this is symmetric). Then it is easy to see that $$f(a,b,c)=(a + b)(a + c)(b + c).$$
$$a^2b+abc+a^2c+ac^2+b^2a+b^2c+abc+bc^2$$ $$=ab(a+b+c)+ac(a+b+c)+b^2c+bc^2$$ $$=(a+b+c)(ab+ac)+bc(b+c)$$ $$=a(a+b+c)(b+c)+bc(b+c)$$ $$=(b+c)[a(a+b+c)+bc]$$ $$=(b+c)[a^2+ab+ab+bc]$$ $$=(b+c)[a(a+b)+c(a+b)]$$ $$=(b+c)(a+b)(a+c)$$
From What I see $$ab(a+c)+ac(a+c)+b^2(a+c)+bc(a+c)=(a+c)(ab+ac+b^2+bc)$$ $$=(a+c)(a(b+c)+b(b+c))=(a+b)(b+c)(a+c)$$
slightly different: $$(a+b)c^2 + (a+b)^2 c + (a+b)ab = (a+b) \left(c^2+(a+b)c+ab\right)=(a+b)(c+a)(c+b)$$