Verify that the polynomials
$p(x) = 5x^3 - 27x^2 + 45x - 21$
$q(x) = x^4 - 5x^3 +8x^2 - 5x + 3$
Interpolate the data:
x| 1|2|3|4
y| 2|1|6|27
Verify that the polynomials
$p(x) = 5x^3 - 27x^2 + 45x - 21$
$q(x) = x^4 - 5x^3 +8x^2 - 5x + 3$
Interpolate the data:
x| 1|2|3|4
y| 2|1|6|27
Example take the point $(x,y)=(1,2)$ and let's see if $p(x)=y$ passes through $(1,2)$:
for $x=1$ we have
$p(1)=5(1)−27(1)+45(1)−21(1)=2=y$
Then you should verify this for every point and for both function. The exercise was not asking you to interpolate the points, it was asking to verify if the provided functions do.
Just verify whether $Xa=y$, where $X$ is the Van Der Monde matrix: $$ X=\left(\matrix{1 & x_0 & x_0^2 & x_0^3\\ 1 & x_1 & x_1^2 & x_1^3\\ 1 & x_2 & x_2^2 & x_2^3\\ 1 & x_3 & x_3^2 & x_3^3}\right), $$ and $x_i$'s are the $x$'s that you wrote; $a$ is the polynomial coefficient vector: $$ a=(5,-27,45,-21), $$ and $y$ is the vector of the $y$'s that you wrote.
So, just compute $Xa$ and see if coincides with $y$. Repeat also for $q(x)$, i.e., choose the right $a$.