Answer
The quadratic function is $f\left( x \right)={{x}^{2}}-x+3$.
Work Step by Step
To obtain the quadratic function, at first we will find the coefficients a, b, c.
Since, $f\left( x \right)=a{{x}^{2}}+bx+c$.
So, $f\left( -1 \right)=5$ gives,
$\begin{align}
& f\left( -1 \right)=a{{\left( -1 \right)}^{2}}+b\left( -1 \right)+c \\
& 5=a-b+c \\
& a-b+c=5
\end{align}$ (I)
$f\left( 1 \right)=3$ gives,
$\begin{align}
& f\left( 1 \right)=a{{\left( 1 \right)}^{2}}+b\left( 1 \right)+c \\
& 3=a+b+c \\
& a+b+c=3
\end{align}$ (II)
$f\left( 2 \right)=5$ gives,
$\begin{align}
& f\left( 2 \right)=a{{\left( 2 \right)}^{2}}+b\left( 2 \right)+c \\
& 5=4a+2b+c \\
& 4a+2b+c=5
\end{align}$ (III)
Equations (I), (II) and (III) give,
$\begin{align}
& a-b+c=5 \\
& a+b+c=3 \\
& 4a+2b+c=5
\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 & 5 \\
1 & 1 & 1 & 3 \\
4 & 2 & 1 & 5 \\
\end{matrix} \right]$
The matrix will be converted into the echelon form by using the elementary row transformation.
${{R}_{2}}\to {{R}_{2}}+\left( -1 \right){{R}_{1}},{{R}_{3}}\to {{R}_{3}}+\left( -4 \right){{R}_{1}}$ give,
$\left[ \begin{matrix}
1 & -1 & 1 & 5 \\
0 & 2 & 0 & -2 \\
0 & 6 & -3 & -15 \\
\end{matrix} \right]$
${{R}_{2}}\to \frac{1}{2}{{R}_{2}}$ gives,
$\left[ \begin{matrix}
1 & -1 & 1 & 5 \\
0 & 1 & 0 & -1 \\
0 & 6 & -3 & -15 \\
\end{matrix} \right]$
${{R}_{3}}\to {{R}_{3}}+\left( -6 \right){{R}_{2}}$ gives,
$\left[ \begin{matrix}
1 & -1 & 1 & 5 \\
0 & 1 & 0 & -1 \\
0 & 0 & -3 & -9 \\
\end{matrix} \right]$
${{R}_{3}}\to -\frac{1}{3}{{R}_{3}}$
$\left[ \begin{matrix}
1 & -1 & 1 & 5 \\
0 & 1 & 0 & -1 \\
0 & 0 & 1 & 3 \\
\end{matrix} \right]$
Since, the matrix is in the echelon form, so, express the system of linear equations corresponding to the echelon form of the matrix as follows:
$a-b+c=5$ (IV)
$b=-1$ (V)
$c=3$ (VI)
Apply back substitution method:
Equation (VI) gives,
$c=3$
Equation (V) gives,
$b=-1$
Substitute the values of b and c in the equation (IV) as follows
$\begin{align}
& a-\left( -1 \right)+\left( 3 \right)=5 \\
& a=1
\end{align}$
Now, substitute the values of a, b, and c in the function $f\left( x \right)=a{{x}^{2}}+bx+c$ ,this gives,
$\begin{align}
& f\left( x \right)=\left( 1 \right){{x}^{2}}+\left( -1 \right)x+\left( 3 \right) \\
& ={{x}^{2}}-x+3
\end{align}$
Hence, the required quadratic function is: $f\left( x \right)={{x}^{2}}-x+3$