Given the following data pairs, find the interpolating polynomial of degree 3 and estimate the value of y corresponding to x = 1.5.

4.7k Views Asked by At

So i was given this question

Given the following data pairs, find the interpolating polynomial of degree 3 and estimate the value of y corresponding to x = 1.5.

a) $(0, 1), (1, 2), (2, 5), (3, 10)$

I have never seen such a question and there are no theorem's on how to go about it. I've seen a different example where they set up an equation like

$p(x)$ = $r_0$ + $r_1x$ + $r_2x^2$ + $r_3x^3$

I do not see how they came about this.

3

There are 3 best solutions below

0
On

The interpolating polynomial has the shape

$$p(x) = r_0 + r_1x + r_2 x^2 + r_3x^3$$

Also, the interpolating polynomial has the following properties:

$$p(0)=1\\ p(1)=2\\ p(2)=5\\ p(3)=10$$

5
On

use the Lagrange interpolating formula as follow $$y=L_0y_0+L_1y_1+L_2y_2+L_3y_3$$ so that $$L_0=\frac{(x-x_1)(x-x_2)(x-x_3)}{(x_0-x_1)(x_0-x_2)(x_0-x_3)}$$ $$L_1=\frac{(x-x_0)(x-x_2)(x-x_3)}{(x_1-x_0)(x_1-x_2)(x_1-x_3)}$$ $$L_2=\frac{(x-x_0)(x-x_1)(x-x_3)}{(x_2-x_0)(x_2-x_1)(x_2-x_3)}$$ $$L_3=\frac{(x-x_0)(x-x_1)(x-x_2)}{(x_3-x_0)(x_3-x_1)(x_3-x_2)}$$
$x_0=0,x_1=1,x_2=2,x_3=3,y_0=1,y_1=2,y_2=5,y_3=10$

then plug $x=1.5$

0
On

This is Lagrange's interpolation polynomial: given $n+1$ pairs $(x_k,y_k)_{0\le k\le n}$ of real numbers, it is the (unique) polynomial $p(x)$ of degree $\le n$ such that $p(x_k)=y_k$ for all $k=0,\dots n$. The solution easy to find with some linear alggebra, is $$p(x)=\sum_{k=0}^n y_k\frac{(x-x_0)(x-x_1)\dots(x-x_{k-1})(x-x_{k+1})\dots(x-x_n)}{(x_k-x_0)(x_k-x_1)\dots (x_k-x_{k-1}) (x_k-x_{k+1})\dots(x_k-x_n)}$$ Hence in the present case, we have \begin{align*}p(x)=0\cdot\frac{(x-1)(x-2)(x-3)}{-6}+2\cdot\frac{x(x-2)(x-3)}{2}\\{}+5\cdot\frac{x(x-1)(x-3)}{-2}+10\cdot\frac{x(x-1)(x-2)}{6}.\end{align*}

To efficiently compute the value of this polynomial at a given point $x$, you can use Neville's algorithm, along the following scheme: $$\begin{matrix} p_{00}(x)=y_0\\ &p_{01}(x)=\dfrac{(x_0-x)p_{10}(x)+(x-x_1)p_{00}(x)}{x_0-x_1} \\ p_{10}(x)=y_1&&p_{02}(x)=\dfrac{(x_0-x)p_{11}(x)+(x-x_2)p_{01}(x)}{x_0-x_2} \\ &p_{11}(x)=\dfrac{(x_1-x)p_{20}(x)+(x-x_2)p_{10}(x)}{x_1-x_2} \\ p_{20}(x)=y_2&& p_{12}(x)=\dfrac{(x_1-x)p_{21}(x)+(x-x_3)p_{11}(x)}{x_1-x_3} \\\\ &p_{21}(x)=\dfrac{(x_2-x)p_{30}(x)+(x-x_3)p_{20}(x)}{x_2-x_3} \\ p_{30}(x)=y_3 \end{matrix}$$ and finally $$ p_{03}(x)=\frac{(x_0-x)p_{12}(x)+(x-x_3)p_{02}(x)}{x_0-x_3}. $$