It is given that
\(f\left( 1 \right) = 6\)
And
\(f\left( { - 1} \right) = f\left( 0 \right) = f\left( 2 \right) = 0\)
The function is zero at\(x = - 1\),\(x = 0\)and\(x = 2\)
Therefore, these are three roots of the cubic function.
Hence, we can express the function as
\(\begin{array}{l}f\left( x \right) = a\left( {x - \left( { - 1} \right)} \right)\left( {x - 0} \right)\left( {x - 2} \right)\\f\left( x \right) = ax\left( {x + 1} \right)\left( {x - 2} \right)\end{array}\)
Where a is constant, to find the value of a.
We know,\(f\left( 1 \right) = 6\)
Substituting the value into the expression
\(\begin{array}{c}f\left( 1 \right) = a\left( 1 \right)\left( {1 + 1} \right)\left( {1 - 2} \right)\\6 = a\left( 2 \right)\left( { - 1} \right)\\a = - 3\end{array}\)
Substituting the value of a into the function
\(\begin{array}{c}f\left( x \right) = - 3x\left( {x + 1} \right)\left( {x - 2} \right)\\ = - 3x\left( {{x^2} - 2x - x - 2} \right)\\ = - 3{x^3} + 3x + 6x\end{array}\)
The expression of the cubic function is \(\left( { - 3{x^3} + 3x + 6x} \right)\)