2

I need to find a value of $h$ such that if $\left | x \right |< h$ then $$\sin(x)=x-\frac{x^{3}}{3!}+\frac{x^{5}}{5!}+R$$ where $\left | R \right |< 10^{-4}$.

Attempt: I tried to start with $\left | \sin(x) \right |\leq 1$, then using triangle inequality to $\left | x-\frac{x^{3}}{3!}+\frac{x^{5}}{5!}+R \right |\leq 1$, but I'm not sure this is the correct way.

I would appreciate a hint or an answer. Thank you for your time.

user4167
  • 1,453

2 Answers2

5

As $$x-\frac{x^3}{3!} + \frac{x^5}{5!}$$ is the taylor polynom of order 5, we know that $$\sin(x)= x-\frac{x^3}{3!} + \frac{x^5}{5!} + R(x)$$ with $R(x)=-\frac{\sin(\xi)}{6!} x^6 $ for a $\xi \in (0,x)$ (as the sixth derivative of $\sin(x)$ is $-\sin(x)$. Now we use use that $|\sin(x)|<1$ $$|R(x)| \leq \frac{x^6}{6!}=\frac{x^6}{720}$$ Now just find a $x$ for which this is smaller than $10^{-4}$.

As Maesumi mentioned you could interpret it as taylor polynom of order $6$ which gives you in nearly the same way $$|R(x)|\leq \frac{|x^7|}{7!} = \frac{|x^7|}{5040}$$

Here I plotted $\frac{x^6}{540}$ in green and the other one in red, as long as you are below zero, $|R(x)|<10^{-4}$enter image description here

  • @euler you are welcome – Dominic Michaelis Mar 04 '13 at 00:05
  • @DominicMichaelis I was wondering if we lose or gain by going one level up. In this case we do go from $x<0.64$ to $x<.9$. But in general it is not clear to me. It seems to turn into a problem of its own right. What is bigger $(n!)^m$ or $(m!)^n$ ? – Maesumi Mar 04 '13 at 00:08
  • For analytic or holomorphic function it's always better to go higher (but for sure maybe one level make it worser, but you always know if you got enough levels higher you will get better some time), as you know that the taylor series converge towards the function, for non analytic function it should be much more complicated. – Dominic Michaelis Mar 04 '13 at 00:19
  • To correct/clarify myself, suppose all derivatives are bounded by 1, having $x^n/n!<\epsilon$ gives $x_n<(\epsilon n!)^{1/n}$. Question is if $m>n$ would $x_m>x_n$ the answer Yes is so long as $\epsilon <((m!^m)/(n!^n))^{1/{m-n}}$. And the right hand side is always larger than $1$,while $\epsilon$ is typically small. So assuming derivatives are comparable higher degree is better. It is just that derivatives of $\sin$ are hardly comparable near origin. – Maesumi Mar 04 '13 at 01:46
3

We will ultimately ask for a stronger condition than $|x|\le 1$. For $|x|\le 1$, our series is an alternating series. Thus the absolute value of the error when we truncate is less than the absolute value of the first neglected term. In this case, the first neglected term has absolute value $\dfrac{|x|^7}{7!}$. So choosing $h=(5040\times 10^{-4})^{1/7}$ will do.

Remark: In this case, the alternating series criterion gives no stronger a result than the Lagrange form of the remainder. But fairly often, it is difficult to estimate the appropriate derivatives, and the Lagrange form of the estimate produces estimates that are excessively pessimistic.

André Nicolas
  • 507,029