0

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)$?

Framate
  • 935
  • $\sin\pi=0$. Also if you plug in $x=\pi/3$ in your Taylor series, you get $\sin 3\pi/3=\sin\pi=0$. I guess $0$ is well approximated by $0$. – markvs Dec 03 '21 at 06:34
  • 2
    Well, $\sin(\pi)=0$. – Gary Dec 03 '21 at 06:34
  • Approximation of $0$ indeed – Prometheus Dec 03 '21 at 06:36
  • 1
    I think it would be more interesting to approximate $\sin\pi/2=1$. Then you should plug in $\pi/6$ in your series, and you get a series of powers of $\pi$, powers of 3 and 2 and factorials representing $1.$ – markvs Dec 03 '21 at 06:40

2 Answers2

1

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.

Sammy Black
  • 28,409
0

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\}$$