2

Let $f(x) = \cos(2x)$ and let $T_n$ be the $n$-th Taylor polynomial of $f$ centered at $1$. Find an $n$ such that $$ |\cos(2.5) - T_n(1.25)| \leq 10^{-3}.$$


My attempt,

By the Taylor polynomial error bound theorem $$ |\cos(2(1.25)) - T_n(1.25)| \leq \frac{K|1.25 - 1|^{n+1}}{(n+1)!} = \frac{K}{4^{n+1}(n+1)!} $$ where $K$ is a number satisfying $|f^{(n+1)}(x)| \leq K$ on the interval $[1, 1.25]$.

Note that \begin{align*} f(x) &= \cos(2x) \\ f'(x) &= -2\sin(2x) \\ f''(x) &= -2^2 \cos(2x) \\ f^{(3)}(x) &= 2^3 \sin(2x) \end{align*}

and so $|f^{(n+1)}(x)| = 2^{n+1}|\sin(2x)|$ or $|f^{(n+1)}(x)| = 2^{n+1}|\cos(2x)|$ depending on the parity of $n$. Since sine and cosine are uniformly bounded in absolute value by 1, $|f^{(n+1)}(x)| \leq 2^{n+1}$ and so we can take $K = 2^{n+1}$. And we get $$ |\cos(2(1.25)) - T_n(1.25)| \leq \frac{2^{n+1}}{4^{n+1}(n+1)!} = \frac{1}{2^{n+1}(n+1)!}. $$

I need help to finish the question.

Dang Dang
  • 320
  • 2
    Continuing from your last line, it suffices to find an $n$ such that $$\frac{1}{2^{n + 1} (n + 1)!} \leq \frac{1}{10^3}$$ – Bumblebee Jun 22 '25 at 15:27
  • @Bumblebee Yes - I know. That is the part that I am stuck on. –  Jun 22 '25 at 15:30
  • 5
    If you have no better idea, just plug $n = 1,2,\dotsc$ into $2^{n+1}(n+1)!$ and see when it becomes larger than $1000$. You won't need to check many cases. But since you're not required to find the smallest $n$, how about just picking $n = 1000$? ;) – Dermot Craddock Jun 22 '25 at 15:35

2 Answers2

0

An extremely obvious case would be $n=1000$. But as per @DermotCraddock's comment, simply plug in the first few values. Note that $$2^5 \cdot 5! = 32 \times 120 \geq 30 * 100 = 3000 \geq 1000$$ So $$\frac{1}{2^5 \cdot 5!} \leq \frac{1}{1000}$$ and so $n=4$ also works.

0

Making the problem more general, you are looking for $n$ such that $$\frac{1}{2^{n + 1} (n + 1)!} \leq {10^{-k}}$$ that is to say $$(n+1)! > \left(\frac{1}{2}\right)^{n+1} \,10^k$$

Have a look at this old question of mine and admire @robjohn approximation.

Let firt $m=n+1$ and apply the formula; it gives,as a real $$n \sim \frac e 2 \,\exp\Bigg( W\left(\frac 1e\log \left(\frac{10^{2 k}}{\pi }\right)\right) \Bigg)-\frac 32$$ where $W(.)$ is the prinipal branch of Lambert function.

For $k=3$, it gives $n=3.42264$ while, as a real, the "exact" solution solution is $3.42633$. So, for your problem $n=4$

Be more requiring and let $k=30$; this will give $n=22.3957$ while the exact solution is $22.3961$