How do we use the picture to get the polynomial?

85 Views Asked by At

Calculate the solution $p\in \mathbb{P}^4$ off the following interpolatin exercise: \begin{align*}&p(0)=2 , \ p'(0)=3, \ p''(0)=1 \\ &p(1)=2, \ p'(1)=0\end{align*}

$$$$

I have done the following:

The polynomial that we are looking for is of the form \begin{equation*}p(x)=ax^4+bx^3+cx^2+dx+e\end{equation*}

The first two derivatives are \begin{align*}&p'(x)=4ax^3+3bx^2+2cx+d \\ &p''(x)=12ax^2+6bx+2c\end{align*}

Using the given conditions we get the system: \begin{align*}\begin{cases}p(0)=2 \\ p'(0)=3 \\ p''(0)=1 \\ p(1)=2 \\ p'(1)=0\end{cases} \Rightarrow \begin{cases}e=2 \\ d=3 \\ 2c=1 \\ a+b+c+d+e=2 \\ 4a+3b+2c+d=0\end{cases} \Rightarrow \begin{cases}e=2 \\ d=3 \\ c=\frac{1}{2} \\ b=-10 \\ a=\frac{13}{2}\end{cases}\end{align*}

Therefore we get the polynomial \begin{equation*}p(x)=\frac{13}{2}x^4-10x^3+\frac{1}{2}x^2+3x+2\end{equation*}

$$$$

Now I saw that there is an easier way to solve this using the following picture, but I haven't really understood how we use that. Do you have an idea?

enter image description here

2

There are 2 best solutions below

19
On

It is using the Newton interpolation polynomial (Hermite, see edit). $P_n = P_{n-1} + [y_0,...,y_n](x-x_0)...(x-x_{n-1})$. But instead of using the divided differences it uses the derivative. The divided differences is the discrete form of the n-th derivative.

$f[x_{i},\dots ,x_{i}]={\frac {f^{{(n)}}(x_i )}{n!}}$ Further read: https://en.wikipedia.org/wiki/Divided_differences

Thus: $P_4 = f(x_i)+f'(x_i)(x-x_0)+\frac{f''(x_i)}{2!}(x-x_0)(x-x_1)+\frac{f'''(x_i)}{3!}(x-x_0)(x-x_1)(x-x_2)$

Furthermore, the divided differences $[y_0,..,y_n]$ can be expressed in recursion (this may explain the tabular): $$[y_0,...,y_n] = \frac{[y_0,...,y_{n-1}]-[y_1,...,y_n]}{x_0-x_n}$$

I hope it helped :)

Edit: this picture uses Hermite interpolation (a modification of Newton interpolation).

Explaining the first three columns, they are defined to be (from https://ibb.co/V29yfR6): $$\bar{x_3}-\bar{x_0}, \bar{x_2}-\bar{x_0}, \bar{x_3}-\bar{x_0}$$ $$\bar{x_3}-\bar{x_1}, \bar{x_2}-\bar{x_1}$$ $$\bar{x_3}-\bar{x_2}$$

These differences are useful if you want to calculate the next divided difference (the last columns).

PS. The other columns are constructed by the recursive formula of the divided differences. If there is a 0 over 0 situation, then $\frac{f'}{n!}$ is used. (Both explained in the first part of the answer).

5
On

You may solve this directly with Taylor:

$$p(x) =\sum_{k=0}^4\frac{p^{(k)}(0)}{k!}x^k$$

Pluggin in the given values you get $$p(x) = p(0) + p'(0)x + \frac{p''(0)}{2}x^2 + \frac{p^{(3)}(0)}{6}x^3 + \frac{p^{(4)}(0)}{24}x^4 $$ $$= 2 + 3x + \frac{1}{2}x^2 + ax^3+bx^4$$

Now, use the other two conditions to find $a$ and $b$: $$0 = p'(1) =3+1+3a+4b$$ $$2 = p(1) = 2+3+\frac{1}{2} + a + b$$ $$\Rightarrow a=-10, b=\frac{13}{2}$$

$$\Rightarrow p(x) = 2 + 3x + \frac{1}{2}x^2 -10x^3+\frac{13}{2}x^4$$