The function is .
Algebraic formula : .
Here and .
Rewrite the function using difference of cube formula.
.
The polynomial can be written in product of linear and quadratic factors as .