How to calculate the degree of Lagrange polynomial to satisfy a given error? I need help. I have $f(x)=sin(x)$. If I want to use Lagrange polynomial to make an approximation of $f(x)$, what should be the degree of that polynomial if I work in the interval $[0,\pi]$, and the error, $|sin(x)-L_n(x)|$ must be lesser or equal than 0.001 ?
In other words:$$|sin(x)-L_n(x)|={sin^{(n+1)}(c)\over(n+1)!}(x-x_o)...(x-x_n)\le0.001\    with \ 0\le  c \le \pi $$ 
How to calculate $n$.

Computation of the mininum $n$ seems difficult, especially because you give no information about the $x_i.$
If they are pair-wise different, you are on the safe side if you assume 
$$\left| \sin(x)-L_n(x)\right| \le\left| \frac{\sin^{(n+1)}(c)}{(n+1)!}(x-x_o)...(x-x_n)\right| \le \frac{\pi^{n+1}}{(n+1)!} =: E_n$$
and then compute the $E_n, n=1,2,\dots$ until $E_n< 0.01\;$ (or is it $0.001?$)
In any case $n=12\;$ should work, because $E_{10}\approx 0.00737,\;$ $E_{11}\approx 0.00192957,\;$ and $E_{12}\approx 0.0004663.$
