# Given the approximation $\cos(x)\approx 1$, how small must $x$ be to have $\frac{1}{2}\cdot 10^{-8}$ accuracy?

I have recently begun studying Numerical Analysis and have been given the following problem:

For small values of $x$, how good is the approximation $\cos(x)\approx 1$? How small must $x$ be to have $\frac{1}{2}\cdot 10^{-8}$ accuracy?

I am unsure what kind of answer is expected for the first question. For the second question I assume that I have to use the Taylor series for $\cos(x)$. Beyond that, I really don't have a clue. Can anybody guide me through it?

• Since $\cos(x)=1-\frac{x^2}{2}+O\left(x^4\right)$, then $\frac{x^2}{2} ???$ then $x ???$ – Claude Leibovici Sep 15 '17 at 10:23
• I'm not familiar with the O-notation. I googled it but am not sure how to use it here. Can you explain it? – user405381 Sep 15 '17 at 11:10

By taylor's theorem, it holds that $\cos(x) = 1 + R_1(x)$. In the Lagrange's form of the remainder, there exists $c$ such that $R_1(x) = \frac {(-\cos(c))} {2!} \cdot x^2$.
$|R_1(x)| = |\frac {(-\cos(c))} {2!} \cdot x^2| = \frac {|\cos(c)|} 2 x^2 \leq \frac 1 2 x^2$
so $|R_1(x)| \leq \frac 1 210^{-8} \iff \frac 1 2 x^2 \leq \frac 1 2 10^{-8} \iff x^2 \leq 10^{-8} \iff -10^{-4} \leq x \leq 10^{-4}$
• Thank you so much! However, shouldn't it be $$R_1(x)=\frac{f^{(0+1)}(c)}{(0+1)!}(x-0)^{0+1}=\frac{-\sin(c)}{1}x$$? – user405381 Sep 16 '17 at 11:11
• It could be if we used taylor's theorem for n=0. But I used here taylor's theorem for n=1 (with the taylor's polynomial $1+0x$ which gives wider range in which the approximation is valid – AsafHaas Sep 16 '17 at 17:20
• In that case shouldn't it be $\frac{f^{(n+1)}(c)}{(n+1)!}(x-0)^{n+1}=\frac{-\cos(c)}{2}x^2$? – user405381 Sep 16 '17 at 17:53