Answer
The solution is
$$f(x)=-3x^3+3x^2+6x=-3x(x+1)(x-2)$$
Work Step by Step
The general expression for the cubic function is
$$f(x)=ax^3+bx^2+cx+d,$$
where $a$, $b$, $c$, and $d$ are constants. We can find them from the given conditions:
$f(1)=6\Rightarrow a1^3+b1^2+c\cdot1+d=6\Rightarrow a+b+c+d=6;$
$f(-1)=0\Rightarrow a(-1)^3+b(-1)^2+c(-1)+d=-a+b-c+d=0;$
$f(0)=0\Rightarrow a0^3+b0^2+c\cdot0+d=0\Rightarrow d=0.$
$f(2)=a2^3+b2^2+c\cdot2+d=0\Rightarrow8a+4b+2c+d=0$
First, we can put $d=0$ everywhere.
$$a+b+c=6\\
-a+b-c=0\\
8a+4b+2c=0$$
Now add the first and the second equation:
$$a+b+c+(-a+b-c)=6+0$$
and this becomes
$$2b=6\Rightarrow b=3.$$
Divide the last equation by $2$ and add the second one to it with $b=3$:
$$\frac{1}{2}(8a+4\cdot3+2c)+(-a+3-c)=0+0$$
and this becomes
$$4a+6+c-a+3-c=0$$
and finally
$$3a+9=0\Rightarrow 3a=-9\Rightarrow a=-3.$$
Now put $a=-3$ and $b=3$ into the first equation to find $c$:
$$-3+3+c=6\Rightarrow c=6.$$
Now we have
$$a=-3,\quad b=3,\quad c=6,\quad d=0$$
so the required cubic function is
$$f(x)=-3x^3+3x^2+6x.$$