[Math] Find the interpolating polynomial of degree $3$ that interpolates $f(x) = x^3$

numerical methods

Find the interpolating polynomial of degree $3$ that interpolates $f(x) = x^3$ at the nodes $x_0=0, x_1 = 1, x_2=2, x_3 = 3$.

Here are my workings below

The basic Lagrange polynomials are:

$$L_0(x) = \frac{(x-1)(x-2)(x-3)}{(0-1)(0-2)(0-3)}$$

$$L_1(x) = \frac{(x-0)(x-2)(x-3)}{(1-0)(1-2)(1-3)}$$

$$L_2(x) = \frac{(x-0)(x-1)(x-3)}{(2-0)(2-1)(2-3)}$$

$$L_3(x) = \frac{(x-0)(x-1)(x-2)}{(3-0)(3-1)(3-2)}$$

Then the interpolating polynomial is:

$$P(x) = L_0(x)+(1)^3L_1(x)+(2)^3L_2(x)+(3)^3L_3(x)$$

Am I allowed to find the interpolating polynomial using these basic lagrange polynomials? and is my $P(x)$ correct? I wasn't sure if the first term should be $L_0(x)$?

Best Answer

Your calculations are correct.

The final result is

$P_3(x) = 0.0 + 0.5 (x-3) (x-2) (x+0)-4 (x-3) (x-1) (x+0)+4.5 (x-2) (x-1) (x+0) = x^3$

The formula for the error bound is given by:

$$E_n(x) = {f^{(n+1)}(\xi(x)) \over (n+1)!} \times (x-x_0)(x-x_1)...(x-x_n)$$

So, we have

$$E_3(x) = {f^{(4)}(\xi(x)) \over 4!} \times (x-0)(x-1)(x-2)(x-3)$$

The fourth derivative of $f(x) = x^3$ is zero, so $E_3(x) = 0$.

The reason for this is if $f(x) = $ polynomial of degree $M$ where $M \le N$, then $$f^{(n)}(x) = 0 \implies E_n(x) = 0 ~\forall~ x$$

Therefore $P_3(x)$ is an exact representation of $f(x) = x^3$.

Related Question