The question is to determine the approximate value of cos(1.2) with a relative approximate error of less than 0.1%. In the first part of the problem, we are asked to find the Taylor Series representation of cos (3x), and that is easily $$\sum_{n=0}^{\infty }\frac{(-1)^{n}(3x)^{2n}}{(3n)!}$$

Now, I wish to determine how many times I will iterate this summation, so I used the Lagrange Error Bound.
$$0\leq cos(x)-\sum_{n=0}^{\infty }\frac{(-1)^{n}(x)^{2n}}{(2n)!}\leq\sum_{n=0}^{\infty }\frac{(-1)^{N+1}(x)^{2N+1}}{(2N+1)!}$$

And so, I found the following: $$\frac{(-1)^{N+1}(x)^{2N+1}}{(2N+1)!}< \frac{1}{1000}$$ $$N\geq 3$$

When I tried to compute for the relative error, the one that worked is when N is equal to 4 since the summation is equal to -0.73572. Where did I go wrong?


1 Answer 1


Since the series expansion for $\cos(x)$ is an alternating series, the error term can be upper bounded in absolute value by the first neglected term (and has the same sign as this neglected term). So in your case after taking the first $n$ terms the bound is $\frac{x^{2n}}{(2n)!}$. Here plug in $x = 1.2 $ and solve the inequality. Start from $n = 1$ and see if the inequality is satisfied. You will find that taking $3$ terms isn't enough, for the bound is slightly above $0.1\%$ (as well as for the actual value of the sum). Taking $n=4$ will secure at least $3$ decimals places which is what you require.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .