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?

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

  • $\begingroup$ 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$$? $\endgroup$ – user405381 Sep 16 '17 at 11:11
  • $\begingroup$ 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 $\endgroup$ – AsafHaas Sep 16 '17 at 17:20
  • $\begingroup$ In that case shouldn't it be $\frac{f^{(n+1)}(c)}{(n+1)!}(x-0)^{n+1}=\frac{-\cos(c)}{2}x^2$? $\endgroup$ – user405381 Sep 16 '17 at 17:53
  • $\begingroup$ Oh I guess you're right. I didn't pay much attention to it cause I knew it will be a trig function and bounded by 1, and managed to be miskaten :) $\endgroup$ – AsafHaas Sep 16 '17 at 17:57

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.