# How small must $x$ be for the error of $\cos(x) \approx 1$ to be below a certain threshold

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?

• Because the "tail" of the series (all terms after the first two) will not sum to more that the acceptable error. – 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.
• @martycohen: Yes, but in the case of $\cos x$, they're ultimately decreasing, and I suppose $|x|<1$ in practise. – Bernard Sep 17 at 19:52
• 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. – Ian Sep 21 at 15:55