Estimate the error of interpolating ,,,

38 Views Asked by At

Estimate the error of interpolating (${lnx}$) . at ${x=3}$ with an interpolation polynomial with base points ${x=1 , x=2 , x=4 , x=6 }$ .

2

There are 2 best solutions below

0
On

Error should be:
E=$ln$(3)-P(3)
where P is the interpolating polynomial. P=$\sum_{k = 0}^3 l_kf_k$
where $l_k$ is the the lagrange polynomial.

0
On

Well, the polynomial $p$ that you need has

$$ p(1) = ln(1) = 0\\ p(2) = ln(2)\\ p(4) = ln(4) = 2 ln(2) \\ p(6) = ln(6) $$ Writing $$ p(x) = a_1 \frac{(x-2)(x-4)(x-6)}{(x-1)(x-2)(x-4)(x-6)}+ a_2 \frac{(x-1)(x-4)(x-6)}{(x-1)(x-2)(x-4)(x-6)}+ a_3 \frac{(x-1)(x-2)(x-6)}{(x-1)(x-2)(x-4)(x-6)}+ a_4 \frac{(x-1)(x-2)(x-4)}{(x-1)(x-2)(x-4)(x-6)}, $$ you can see, by plugging in $x = 1, 2, 4,$ and $6$ that $a_1 = 0; a_2 = ln(2); a_3 = ln(4)$, and $a_4 = ln(6)$. So your polynomial is $$ p(x) = ln(2) \frac{(x-1)(x-4)(x-6)}{(x-1)(x-2)(x-4)(x-6)}+ ln(4) \frac{(x-1)(x-2)(x-6)}{(x-1)(x-2)(x-4)(x-6)}+ ln(6) \frac{(x-1)(x-2)(x-4)}{(x-1)(x-2)(x-4)(x-6)}. $$ Plug in $x = 3$, and take the difference from $ln(3)$ and you've got your answer.