Interval Length Needed For Interpolation

42 Views Asked by At

Let $f(x)=\sqrt{x}$ defined on $[1,2]$, What is the length needed between the sampling points such that the approximation error by interpolation polynomial of order $2$ will not exceed $5*10^{-8}$

We know that $|f(x)-P_n(x)|=|\frac{f^{(n+1)}(c)}{(n+1)!}(x-x_0)...(x-x_n)|$

So to bound $f^{(n+1)}(c)$ we take the $3$rd derivative of $x^{\frac{1}{2}}$ which is $$\frac{3}{8x^{\frac{5}{2}}}$$ so the Max is obtained at $x=1$

So we are looking for:

$$|\frac{\frac{3}{8}}{(3)!}(x-x_0)(x-x_1)(x-x_2)|\leq 5*10^{-8}\iff |\frac{3}{48}(x-x_0)(x-x_1)(x-x_2)|\leq 5*10^{-8}$$

Which is:

$$|(x-x_0)(x-x_1)(x-x_2)|\leq 8*10^{-7}$$

Assuming each $\Delta x_i=h$ we have:

$$h^3\leq 8*10^{-7}\iff h\leq 9.28*10^{-3}$$

So we need to take $$\Delta x_i = 9*10^{-3} $$

Is it correct?

1

There are 1 best solutions below

6
On BEST ANSWER

If the quadratic interpolation is used for $|x-x_i|\le\frac12h$, then the maximum of $|(x-x_{i-1})(x-x_i)(x-x_{i-1})|$ is at $x=x_i\pm \frac12h$, so that the maximum of the error bound is in fact $\frac{3/8}{3!}⋅\frac38⋅h^3=3⋅2^{-7}⋅h^3$, and to get this smaller than the prescribed error $5\cdot10^{-8}$ gives $$ h^3\le \frac{2^6}3⋅10^{-7}\iff h\le 0.04\sqrt[3]{0.1/3}=0.01287.. $$

Even taking the full interval $|x-x_i|\le h$, the maximum of the product is at $x=x_i\pm\frac1{\sqrt3}h$, so that the bound is $\frac{3/8}{3!}\frac{2}{3^{1.5}}⋅h^3=\frac1{8⋅3^{1.5}}$, which compared to the tolerance gives $$ h^3\le 4⋅3^{1.5}⋅10^{-7}\iff h\le 0.01\sqrt{3}\sqrt[3]{0.4}=0.0127618.. $$ which allows to chose $h=0.01$.