0

We want to construct a table of equispaced values to $f(x)=sin(x)cos(x)$. Determine the spacing $h$ of the x-coordinates so that the error of linear interpolation for this data is $10^{-3}$.

I know the formula for the error of linear approximation is $E(x)$$\leq$$(1/8)(x_1-x_0)^2$ $max[x_0,x_1]$ $f''(\alpha)$. I can substitute in $10^{-3}$ for $E(x)$ and $h $ for $x_1-x_0$, but I am not sure what to do with the $f''(\alpha)$ term.

1 Answers1

2

Since you did not provide values for $x$, I will make those up, but make sure to use whichever ones you have.

We have:

  • $0 \le x \le 2 \pi$ (that is, $x_0 = 0, x_1 = 2 \pi$, but recall to put in your own values)
  • $f(x)=\sin x ~\cos x$
  • $f''(x) = -4 \cos x~ \sin x$
  • $\displaystyle M = \max_{x_0 \le x \le x_1} |f''(\alpha)| = \max_{0 \le x \le 2 \pi} |f''(\alpha)|= 2$ (this is just saying to find the maximum absolute value of this function over the range at some point $\alpha$)
  • Determine the spacing $h$ of the x-coordinates so that the error of linear interpolation for this data is $10^{-3}$.

So, we have the maximum absolute error is given by:

$$E(x) \le \dfrac{M h^2}{8} = \dfrac{2 h^2}{8} = \dfrac{h^2}{4}$$

To compute $h$, we have:

$$\dfrac{h^2}{4} \le 10^{-3} \rightarrow h \le \dfrac{1}{5\sqrt{10}} \approx 0.0632456$$

Amzoti
  • 56,093