0
$\begingroup$

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?

$\endgroup$
3
  • $\begingroup$ Look up remainder of alternating series on google $\endgroup$ Apr 9 '17 at 21:25
  • $\begingroup$ @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? $\endgroup$
    – JQQ
    Apr 9 '17 at 21:33
  • 2
    $\begingroup$ @JQQ It's Taylor power-series expansion is an alternating series. (Of course only on the even indices. On the odd it is 0) $\endgroup$
    – AsafHaas
    Apr 9 '17 at 21:35
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.