Theory:

We will now extend this idea of expanding algebraic terms/numbers with cubic order using the identities.
Let us derive the cubic identities with the help of known square identities.
1. We will now prove \((a+b)^3\)\(=\) \(a^3+3a^2b+3ab^2+b^3\) by direct multiplication.
 
Consider the LHS \((a+b)^3\).
 
Here \((a+b)\) raised to the power \(3\).  It means we need to multiply \((a+b)\) by itself for two times.
 
That is \((a+b)\times(a+b)\times(a+b)\) \(=\) \((a+b)^3\)
 
\((a+b)^3\) \(=\) \([(a+b)\times(a+b)]\)\(\times(a+b)\)
 
\(=\) \((a+b)^2\times(a+b)\)
 
\(=\) \((a^2+b^2+2ab)\)\(\times(a+b)\)
 
Apply the distributive property.
 
\(=\) \(a^2\times a\)\(+b^2\times a\)\(+2ab\times a\)\(+a^2\times b\)\(+b^2\times b\)\(+2ab\times b\)
 
\(=\) \(a^3+ab^2+2a^2b+a^2b+b^3+2ab^2\)
 
\(=\) \(a^3+3a^2b+3ab^2+b^3\)
 
\(=\) RHS
 
Thus, the identity is \((a+b)^3\) \(=\) \(a^3+3a^2b+3ab^2+b^3\).
 
 
2. We will now prove \((a-b)^3\) \(=\) \(a^3-3a^2b+3ab^2-b^3\) by direct multiplication.
 
Consider the LHS \((a-b)^3\).
 
Here \((a-b)\) raised to the power \(3\).  It means we need to multiply \((a-b)\) by itself for two times.
 
That is \((a-b)\times (a-b)\times(a-b)\)\(=\)\((a-b)^3\).
 
\((a-b)^3\) \(=\) \([(a-b)\times(a-b)]\)\(\times(a-b)\)
 
\(=\) \((a-b)^2\)\(\times(a+b)\)
 
\(=\) \(a^2+b^2-2ab\)\(\times(a-b)\)
 
Apply the distributive property.
 
\(=\) \(a^2\times a\)\(+(b^2\times a)\)\(+(-2ab\times a)\)\(+(a^2\times -b)\)\(b^2\times -b)\)\(+(-2ab\times -b)\)
 
\(=\) \(a^3+ab^2-2a^2b-a^2b-b^3+2ab^2\)
 
\(=\) \(a^3-3a^2b+3ab^2-b^3\)
 
\(=\) RHS
 
Thus, the identity is \((a-b)^3\) \(=\) \(a^3-3a^2b+3ab^2-b^3\)
 
 
3. We will now prove \((x+a)(x+b)(x+c)\) \(=\) \(x^3\)\(+(a+b+c)x^2\)\(+(ab+bc+ca)x+abc\).
 
 Consider the LHS, \((x+a)(x+b)(x+c)\).
 
Apply the distributive property for the first two terms.
 
\([(x+a)(x+b)](x+c)\) \(=\) \([(x\times x)]\)\(+(x\times b)\)\(+(a\times x)\)\(+(a\times b)]\)\((x+c)\)
 
\(=\) \((x^2+bx+ax+ab)\)\((x+c)\)
 
Again apply distributive law.
 
\((x^2+bx+ax+ab)(x+c)\)
 
\(=\) \((x^2\times x)\)\(+(bx\times x)\)\(+(ax\times x)\)\(+(ab\times x)\)\(+(x^2\times c)\)\(+(bx\times c)\)\(+(ax\times c)\)\(+(ab\times c)\).
 
\(=\) \(x^3+bx^2\)\(+ax^2+abx\)\(+cx^2+bcx\)\(+acx+abc\)
 
Separate the cubic, square, variables and constants terms.
 
\(=\) \(x^3+ax^2\)\(+bx^2+cx^2\)\(+abx+bcx\)\(+acx+abc\)
 
\(=\) \(x^3+(a+b+c)x^2+(ab+bc+ac)x+abc\)
 
\(=\) RHS
 
Thus we have the identity \((x+a)(x+b)(x+c)\) \(=\) \(x^3\)\(+(a+b+c)x^2\)\(+(ab+bc+ca)x+abc\).
Let us summarize identities.
I.a+b3=a3+3a2b+3ab2+b3
 
II.ab3=a33a2b+3ab2b3
 
III.(x+a)(x+b)(x+c)=x3+(a+b+c)x2+(ab+bc+ca)x+abc