Answer
The cubic function is $f\left( x \right)={{x}^{3}}-2{{x}^{2}}+3$.
Work Step by Step
To obtain the cubic function, at first we will find the coefficients a, b, c and d.
Since, $f\left( x \right)=a{{x}^{3}}+b{{x}^{2}}+cx+d$
So, $f\left( -1 \right)=0$ gives,
$\begin{align}
& f\left( -1 \right)=a{{\left( -1 \right)}^{3}}+b{{\left( -1 \right)}^{2}}+c\left( -1 \right)+d \\
& 0=-a+b-c+d \\
& -a+b-c+d=0
\end{align}$ (I)
$f\left( 1 \right)=2$ gives,
$\begin{align}
& f\left( 1 \right)=a{{\left( 1 \right)}^{3}}+b{{\left( 1 \right)}^{2}}+c\left( 1 \right)+d \\
& 2=a+b+c+d \\
& a+b+c+d=2
\end{align}$ (II)
$f\left( 2 \right)=3$ gives,
$\begin{align}
& f\left( 2 \right)=a{{\left( 2 \right)}^{3}}+b{{\left( 2 \right)}^{2}}+c\left( 2 \right)+d \\
& 3=8a+4b+2c+d \\
& 8a+4b+2c+d=3
\end{align}$ (III)
$f\left( 3 \right)=12$ gives,
$\begin{align}
& f\left( 3 \right)=a{{\left( 3 \right)}^{3}}+b{{\left( 3 \right)}^{2}}+c\left( 3 \right)+d \\
& 12=27a+9b+3c+d \\
& 27a+9b+3c+d=12
\end{align}$ (IV)
Equations (I), (II), (III) and (IV) give,
$\begin{align}
& -a+b-c+d=0 \\
& a+b+c+d=2 \\
& 8a+4b+2c+d=3 \\
& 27a+9b+3c+d=12
\end{align}$
Use the Gauss elimination method to obtain the solution of the above system of equations.
The matrix corresponding to the system of equations is as follows:
$\left[ \begin{matrix}
-1 & 1 & -1 & 1 & 0 \\
1 & 1 & 1 & 1 & 2 \\
8 & 4 & 2 & 1 & 3 \\
27 & 9 & 3 & 1 & 12 \\
\end{matrix} \right]$
Use the elementary row transformation to find the echelon form of the matrix.
${{R}_{1}}\to \left( -1 \right){{R}_{1}}$ gives,
$\left[ \begin{matrix}
1 & -1 & 1 & -1 & 0 \\
1 & 1 & 1 & 1 & 2 \\
8 & 4 & 2 & 1 & 3 \\
27 & 9 & 3 & 1 & 12 \\
\end{matrix} \right]$
${{R}_{2}}\to {{R}_{2}}+\left( -1 \right){{R}_{1}},{{R}_{3}}\to {{R}_{3}}+\left( -8 \right){{R}_{1}},{{R}_{4}}\to {{R}_{4}}+\left( -27 \right){{R}_{1}}$ give,
$\left[ \begin{matrix}
1 & -1 & 1 & -1 & 0 \\
0 & 2 & 0 & 2 & 2 \\
0 & 12 & -6 & 9 & 3 \\
0 & 36 & -24 & 28 & 12 \\
\end{matrix} \right]$
${{R}_{2}}\to \frac{1}{2}{{R}_{2}}$ gives,
$\left[ \begin{matrix}
1 & -1 & 1 & -1 & 0 \\
0 & 1 & 0 & 1 & 1 \\
0 & 12 & -6 & 9 & 3 \\
0 & 36 & -24 & 28 & 12 \\
\end{matrix} \right]$
${{R}_{3}}\to {{R}_{3}}+\left( -12 \right){{R}_{2}},{{R}_{4}}\to {{R}_{4}}+\left( -36 \right){{R}_{2}}$ give,
$\left[ \begin{matrix}
1 & -1 & 1 & -1 & 0 \\
0 & 1 & 0 & 1 & 1 \\
0 & 0 & -6 & -3 & -9 \\
0 & 0 & -24 & -8 & -24 \\
\end{matrix} \right]$
${{R}_{3}}\to -\frac{1}{6}{{R}_{3}}$ gives,
$\left[ \begin{matrix}
1 & -1 & 1 & -1 & 0 \\
0 & 1 & 0 & 1 & 1 \\
0 & 0 & 1 & \frac{1}{2} & \frac{3}{2} \\
0 & 0 & -24 & -8 & -24 \\
\end{matrix} \right]$
${{R}_{4}}\to {{R}_{4}}+\left( 24 \right){{R}_{4}}$ gives,
$\left[ \begin{matrix}
1 & -1 & 1 & -1 & 0 \\
0 & 1 & 0 & 1 & 1 \\
0 & 0 & 1 & \frac{1}{2} & \frac{3}{2} \\
0 & 0 & 0 & 4 & 12 \\
\end{matrix} \right]$
${{R}_{4}}\to \frac{1}{4}{{R}_{4}}$ gives,
$\left[ \begin{matrix}
1 & -1 & 1 & -1 & 0 \\
0 & 1 & 0 & 1 & 1 \\
0 & 0 & 1 & \frac{1}{2} & \frac{3}{2} \\
0 & 0 & 0 & 1 & 3 \\
\end{matrix} \right]$
Now, the matrix is in echelon form. Write the system of the linear equations of the matrix:
$a-b+c-d=0$ (V)
$b+d=1$ (VI)
$c+\frac{1}{2}d=\frac{3}{2}$ (VII)
$d=3$ (VIII)
Apply back substitution method:
Equation (VIII) gives,
$d=3$
Substitute the value of d in the equation (VII) as follows:
$\begin{align}
& c+\frac{1}{2}\left( 3 \right)=\frac{3}{2} \\
& c=0
\end{align}$
Substitute the values of d in the equation (VI)as follows:
$\begin{align}
& b+\left( 3 \right)=1 \\
& b=-2
\end{align}$
Substitute the values of b, c and d in the equation (V) as follows:
$\begin{align}
& a-\left( -2 \right)+\left( 0 \right)-\left( 3 \right)=0 \\
& a=1
\end{align}$
Now, substitute the values of a, b ,c and d in the function $f\left( x \right)=a{{x}^{3}}+b{{x}^{2}}+cx+d$ ,this gives,
$\begin{align}
& f\left( x \right)=\left( 1 \right){{x}^{3}}+\left( -2 \right){{x}^{2}}+\left( 0 \right)x+3 \\
& ={{x}^{3}}-2{{x}^{2}}+3
\end{align}$
Hence, the required cubic function is: $f\left( x \right)={{x}^{3}}-2{{x}^{2}}+3$