I might be missing some background knowledge on this subject, but nevertheless I am interested. In some cases like this, the answers talk about finding the taylor series for $\cos(x)$ and then substituting the first two terms of the series in instead of $\cos(x)$ i.e in the link they solve for $x$ in

$$\frac{x^2}{2} \leq \frac{1}{2}\cdot 10^{-8}$$

Rather than $$1-\cos(x) \leq \frac{1}{2}\cdot 10^{-8}$$

So my question is - why is this allowed? And why not include the 3rd term from the Taylor series as well?

  • 1
    $\begingroup$ Because the "tail" of the series (all terms after the first two) will not sum to more that the acceptable error. $\endgroup$ – user247327 Sep 17 at 16:34

This is allowed because the Taylor series for $\cos x$ is an alternating series, and they use Leibniz' theorem for alternating series: the error is bounded by the first missing term (in absolute value) and has the same sign.

  • 1
    $\begingroup$ As long as the terms are decreasing in absolute value. $\endgroup$ – marty cohen Sep 17 at 18:01
  • $\begingroup$ @martycohen: Yes, but in the case of $\cos x$, they're ultimately decreasing, and I suppose $|x|<1$ in practise. $\endgroup$ – Bernard Sep 17 at 19:52
  • $\begingroup$ The Lagrange remainder gives a cleaner argument in this particular case: $|\cos(x)-1|=|\cos(x)-1-0x|=\cos(\xi) \frac{x^2}{2}$ for some $\xi$ between $0$ and $x$. In particular, the $|x|<1$ assumption is not technically necessary to get $|\cos(x)-1| \leq x^2/2$, though of course without this assumption the bound gets rather bad. $\endgroup$ – Ian Sep 21 at 15:55

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.