[Math] Finding the minimum order of the Taylor polynomial

calculustaylor expansion

The question was to find the minimum order of the Taylor polynomial centered at $0$ for $\cos x$ required to approximate $ \cos(-0.25)$ with an absolute error no greater than $10^{-3} $​?

The answer that I provided was:
$n$th derivative of $\cos x$ is $$ f^{(n+1)}=\cos\left(x+\frac{1}{2}(n+1)\pi\right)$$ Since $\cos(x)<1$ for whatever value of $x$ then:
$$ \vert {f^{(n+1)}}\vert<M$$ then $ M=1$
$$ R_n(x)<M\frac{x^{n+1}}{{(n+1)!}}$$ $$ R_n(x)=\frac{(-0.25)^{n+1}}{{(n+1)!}}<10^{-3}$$ then $n=3$. I found the value of $n$ by using the calculator. But I don't know how I would find it differently using the graph, for example or by solving the inequality.

Best Answer

Consider the usual Taylor expansion of the cosine close to the origin, $$ \cos(x) = 1 -\frac{x^2}{2!} +\frac{x^4}{4!} - \frac{x^6}{6!} +... $$ Now, $\cos(-0.25) = \cos(0.25) \approx 0.9689 $. Inserting $0.25$ into the series, truncated at $O(x^3)$ gives $ 1 -\frac{0.25^2}{2!} = 0.96875$. Since $|\cos(0.25) - 0.96875| <10^{-3} $ the answer is that an expansion to the second order is enough.

Alternatively, you have to find the smallest $k = 0, 2, 4, 6...$ such that $$ \frac{(0.25)^{k}}{k!} =\frac{1}{4^k k!} = \frac{1}{2^{2k} k!} < 10^{-3} = \frac{1}{2^3 5^3} $$ This is equivalent to $$ 2^{2k-3} k! > 5^3 $$ This is obviously satisfied for $k\geq 6$, so you just have to check $k=2$ (the inequality is not satisfied) and $k=4$ (the inequality is satisfied). However, this does not tell you that stopping at $k=2$ is sufficient (like the direct check), but only that stopping at $k=4$ is sufficient (but not necessary, since it is an alternating series).

Related Question