Approximation of $\sin(\pi)$ by $f(x)=\sin(3x)$

124 Views Asked by At

I have to get an approximation of $\sin(\pi)$ from a series representing $f(x)=\sin(3x)$.

So, I found its Taylor series at $x=\pi/3$

$$\displaystyle\sum_{k=0}^{\infty}\dfrac{(-1)^{k+1}3^{2k+1}}{(2k+1)!}(x-\pi/3)^{2k+1}.$$

It has a ratio of convergence $R=\infty$, so it converges on all the real numbers. But what about the approximation of $\sin(\pi)$?

2

There are 2 best solutions below

0
On

Evaluate your Taylor polynomials at $x=\pi$: \begin{align} T_n(\pi) &= \sum_{k=0}^n \frac{(-1)^{k+1}3^{2k+1}}{(2k+1)!} \biggl( \pi - \frac{\pi}{3} \biggr)^{2k+1} \\ &= \sum_{k=0}^n \frac{(-1)^{k+1}2^{2k+1}\pi^{2k+1}}{(2k+1)!} \\ \end{align} Of course, you know that $\sin \pi = 0$, so these partial sums converge to $0$, but it's interesting to see how they converge.

0
On

Since it is an alternating series, to see how many terms have to be added in order to have $$\frac{(2 \pi )^{2 n+1}}{(2 n+1)!} \leq 10^{-k}$$ that is to say $$(2n+1)! \geq (2 \pi )^{2 n+1}\,10^k$$ you will find a very nice approximation proposed by @robjohn here. Applied to this case, the approximation will be $$n=\left\lceil \pi e^{1+W(t)}-\frac{3}{4}\right\rceil \qquad \text{where}\qquad t=\frac{k \log (10)-\log (2 \pi )}{2 e \pi }$$ $W(t)$ being Lambert function.

Varying $k$ from $0$ to $25$, the corresponding $n$ form the sequence $$ \{7,9,10,11,11,12,13,14,15,15,16,17,17,18,19,19,20,21,21,22,22,23,24,24,25,25\}$$