Approximating cos(43) with error less than $8/60000$ I have this problem I know I need to approximate the value with taylor polynomial and its error formula is
$$|R_n(x)|\leq \frac{1}{(n+1)!}|x-a|^{n+1}$$
but i couldnt figured it out i should calculate up to which degree. Should I use radians? Can anyone help me about that
 A: Too complex for sure but interesting problem.
Making the problem more general, since by Taylor we have
$$\cos \left(\frac{\pi }{4}-x\right)=\sum_{n=0}^p (-1)^n \frac{\cos \left(n\frac{\pi  }{2}+\frac{\pi }{4}\right)}{n!} x^n+\sum_{n=p+1}^\infty (-1)^n \frac{\cos \left(n\frac{\pi  }{2}+\frac{\pi }{4}\right)}{n!} x^n$$
$$|R_p|=\frac 1 {\sqrt 2} \frac{x^{p+1}}{(p+1)!}$$ and you want to know $p$ such that $|R_p|\leq \epsilon$.
This write
$$(p+1) ! > \frac {x^{p+1}} {\epsilon\sqrt 2}$$ If you look at this question of mine, you will see a magnificent approximation provided by @robjohn. Adapted to your problem, this will give
$$p=e x \exp\Big[W\left(-\frac{\log \left(4 \pi  x \epsilon ^2\right)}{2 e x}\right) \Big] -\frac 32$$ where appears Lambert function. For sure, you will need to take $\lceil p\rceil$.
Appled to your case, this would give $p=1.267$ then $p=2$. Checking for $x=\frac \pi {90}$
$$|R_2|=\frac{\pi ^3}{64 \sqrt{2}}\approx \frac{\pi ^3}{4374000 \sqrt{2}}\approx 5.0 \times 10^{-6} < \frac 8 {60000}$$ while
$$|R_1|=\frac{\pi ^2}{16200 \sqrt{2}}\approx  4.3 \times 10^{-4} > \frac 8 {60000}$$
Just to show the quality of the approximation, the exact solution for your numbers would be $p=1.271$.
Doing the same for a value of $\epsilon$ $1000$ times smaller, would give $p=2.282$ then $p=3$.
