# Thread: Polynomial Approximation accurate within 0.005

1. ## Polynomial Approximation accurate within 0.005

I'm supposed to find a polynomial approximation centered at 0 for f(x)=cos(x) accurate within 0.005 for -0.1<x<0.4. I know I need to figure out what n should be to get the max error of 0.005, but I'm not sure what I should make the bounds of the integral to find the error (from n to infinity?) and I'm also not sure where the 0.1 and 0.4 fit in. Thank you!

2. ## Re: Polynomial Approximation accurate within 0.005

Since x= 0 is between -0.1 and 0.4, you can use the MacLaurin series for cos(x). That is the infinite sum $\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!}x^{2n}$. The error by stopping with the nth term: $\frac{|f^{(n+1)}(0)|}{(n+1)!}|x|^{n+1}$. Since all derivatives are $\pm cos(x)$ and $\pm sin(x)$, you can take "1" as an upper bound on [tex]|f^{(n+1)}(0)|[tex]. And $|x^n}|$ is largest at x= 0.4.

3. ## Re: Polynomial Approximation accurate within 0.005

Since the MacLaurin series for cosine is an alternating series, the error in approximating the sum with "n" terms is never any more in size than the next ("n+1"th) term.