Determine $n$ so that the difference between the $n$-th Taylor-polynomial of $\sin(x)$ with $x_0=0$ and $\sin(x)$ on $[-3,3]$ is at most $10^{-6}$?

63 Views Asked by At

$\sin(x)$ can be expressed as a power series: $$\sin(x)=\sum_{n=0}^\infty (-1)^n\frac{x^{2n+1}}{(2n+1)!}$$

How can I determine how large $n$ has to be, so that the difference between the $n$-th Taylor-polynomial of $\sin(x)$ with $x_0=0$ and $\sin(x)$ on $[-3,3]$ is at most $10^{-6}$?

I should use the Lagrange-remainder to answer this question: $$R_n(x,x_0)=\frac{f^{n+1}(\xi)}{(n+1)!}(x-x_0)^{n+1}$$

1

There are 1 best solutions below

2
On BEST ANSWER

The series would diverge at the egde of the interval $[-3,3]$, so the remainder at the endpoints should be less than $10^{-6}$. $|f^{(n+1)}(\xi)|$ < 1, hence we have $$|R_n| \le \frac{(x-x_0)^{n+1}}{(n+1)!}$$ Next since we have two unknowns we need to do trial and error.

| n |  upper bound |
| 1 |      4.5     |
| 2 |      4.5     |
| 3 |      3.8     |
| 7 |       .43    | 
|10 |       .016   |
|15 |      1.1e-5  |
|16 |      2.0e-6  | 
|17 |      3.3e-7  |

So 17 I guess. Following are the values I computed using a python program.

0  ==>  2.85887999194
1  ==>  1.64112000806
2  ==>  0.38387999194
3  ==>  0.0500485794884
4  ==>  0.00419249194013
5  ==>  0.000245413904023
6  ==>  1.06191254474e-05
7  ==>  3.53718672796e-07
8  ==>  9.35337529651e-09

We get error less than $1e-6$ after the 7th term in the series. Which means we need to take terms till $x^{15}$.