TITLE: Why $a^3 - b^3 = (a – b) (a^2 + ab + b^2)$?
QUESTION [0 upvotes]: Why $a^3 - b^3$ is equal to  $(a–b) (a^2 + ab + b^2)$, How to calculate it. 
if I multiply  $(a-b)(a-b)(a-b)$  then I have got $(a-b)(a^2+b^2)$ and it is not the same as above.

REPLY [0 votes]: You can do it like this:\begin{eqnarray}
a^3-b^3 &=& a^3\color{red}{-a^2b+a^2b}-b^3\\
&=& (a^3-a^2b)+(a^2b-b^3)\\
&=& a^2(a-b)+b(a^2-b^2)\\
&=& a^2(a-b)+b(a-b)(a+b)\\
&=& (a-b)(a^2+b(a+b))\\
&=& (a-b)(a^2+ab+b^2)
\end{eqnarray}
{"set_name": "stack_exchange", "score": 0, "question_id": 3235663}