# Factorising Cubic Expressions with Rotating Three Variables such as $a^2+a^2c+ac^2-b^3-b^2c-bc^2$

For these sorts of factorisations involving rotation of variables, it would be a good idea to rearrange regarding only a specific variable.

## Example 1

Factorise $a^2+a^2c+ac^2-b^3-b^2c-bc^2$.

\begin{align} &= (ac^2-b^c)+(a^2c-b^2c)+(a^3-b^3) \\ &= (a-b)c^2+(a^2-b^2)c+(a^3-b^3) \\ &= (a-b)c^2+(a-b)(a+b)c+(a-b)(a^2+ab+b^2) \\ &= (a-b)\left[ c^2+(a+b)c+(a^2+ab+b^2) \right] \\ &= (a-b)(a^2+b^2+c^2+ab+bc+ca) \end{align}

## Example 2

Factorise $x^3+3ax^2+(3a^2-b^2)x+a^3-ab^2$.

\begin{align} &=(x^3+a^3)+(2ax^2+ax^2x)-(b^2x+ab^2) \\ &= (x+a)(x^2-ax+a^2)+3ax(x+a)-b^2(x+a) \\ &= (x+a)(x^2-ax+a^2+3ax-b^2) \\ &= (x+a)(x^2+2ax+a^2-b^2) \\ &= (x+a)\left[ (x+a)^2-b^2 \right] \\ &= (x+a)(x+a+b)(x+a-b) \end{align}

## Example 3

Factorise $a^2(b-c)+b^2(c-a)+c^2(a-b)$.

\begin{align} &=(b-c)a^2 + b^2c-ab^2 +ac^2-bc^2 \\ &= (b-c)a^2+(-ab^2+ac^2) +(b^2c-bc^2) \\ &= (b-c)a^2-(b^2-c^2)a +(b-c)bc \\ &= (b-c)a^2-(b-c)(b+c)a +(b-c)bc \\ &= (b-c) \left[ a^2-(b+c)a+bc \right] \\ &= (b-c)(a-b)(a-c) \end{align}

## Example 4

Factorise $a^2+b^2+c^2-2ab-2bc+2ac$.

\begin{align} &= a^2+(-2ab+2ac)+b^2+c^2-2bc \\ &= a^2-2(b-c)a+(b-c)^2 \\ &= \left[ a-(b-c)^2 \right] \\ &= (a-b+c)^2 \end{align}