# Taylor series for $f(x) = cos (x)$

For the function $f(x) = cos(x)$ I want a taylor series approximation accurate to within 0.1 of the actual function on an interval $-5\le x \le 5$. How would I determine the number of terms necessary to do this?

• Look up remainder of alternating series on google Apr 9 '17 at 21:25
• @qbert I was under the impression that cos (x) was not an alternating series, despite having positive and negative values, because it does not alternate between them?
– JQQ
Apr 9 '17 at 21:33
• @JQQ It's Taylor power-series expansion is an alternating series. (Of course only on the even indices. On the odd it is 0) Apr 9 '17 at 21:35

The Lauren remainder in Lagrange form is $$R_n(x) = \frac {f^{(n+1)}(c)} {(n+1)!}x^{n+1}$$ for some point $c$. So seeking for an $n$ for which $|R_n(x)| \lt 0.1$ means:
$|\frac {{cos}^{(n+1)}(c)} {(n+1)!} x^{n+1}| \le | \frac {x^{n+1}} {(n+1)!}| \lt \frac {5^{n+1}} {(n+1)!} \lt 0.1$ first for $n=13$ (check that), so $n=13$ is guaranteed to work.