proving or refuting the convergence of a digital sequence Let the following digital sequence; $\Sigma_{n=2}^\infty \dfrac{sin(nx)}{log(n)}$
Dirichlet's criteria says that if $b_n$ decreases and $lim$  $b_n =0$ and if  the partial sums of a sequence $a_n \in \mathbb{R}$ then $\Sigma_{n=1}^\infty a_n b_n$ converges.


*

*It's obvious that $b_n$ in this case is $1/log(n)$ and it does indeed decrease and converges in $0$.

*Now what I have trouble on is showing that all the partial sums of $a_n$ (in this case $sin(nx)$) converge. I know that showing that all the partial sums of a sequence converge is equivalent to showing that $\exists M>0, \forall n \vert{S_n}\vert \leq M$  With $S_n := \Sigma_{n=1}^\infty a_n$
I found a proof (that all the partial sums of $a_n$ converge) but I can't seem to understand the first step. It goes like this:
$\vert \vert \Sigma_{k=1}^\infty  sin(kx) \vert \vert$ = $\vert \vert \dfrac{sin(\dfrac{1}{2} nx) sin ((n+1)\dfrac{x}{2})}{sin\dfrac{x}{2}} \vert \vert$
I really don't know where that result come from
 A: In order to apply the Dirichlet's Test you still have show that the sequence $\{a_n\}_{n\geq 2}$ is bounded. 
Now by the addition formula $\cos(x+y)=\cos x \cos y -\sin x \sin y$, for $x\not=2 m\pi$ with $m\in\mathbb{Z}$ (otherwise $a_n=0$), it is easy to obtain
$$\sin(kx)=\frac{\cos\bigl((k-\frac{1}{2})x\bigr)-\cos\bigl((k+\frac{1}{2})x\bigr)}{2\sin\frac{x}{2}}.$$
Hence
$$\sum_{k=1}^{n}  \sin(kx)=\frac{1}{2\sin\frac{x}{2}}\sum_{k=1}^n \left[\cos\bigl((k-\frac{1}{2})x\bigr)-\cos\bigl((k+\frac{1}{2})x\bigr)\right]=\frac{\cos\bigl((1-\frac{1}{2})x\bigr)-\cos\bigl((n+\frac{1}{2})x\bigr)}{2\sin\frac{x}{2}}$$
and
$$|a_n|=\left |\sum_{k=1}^{n}  \sin(kx)=\right|\leq \frac{1}{\left|\sin\frac{x}{2}\right|}.$$
So the $\{a_n\}_{n\geq 2}$ is bounded and by the Dirichlet's Test, your series is convergent.
A: let the statement be true for $k=n-1$ we show it is also true for $k=n$
$\Sigma_{k=1}^n  \sin(kx) \sin\frac{x}{2}$ 
=$\Sigma_{k=1}^{n-1} \sin(kx) \sin\frac{x}{2}+ \sin(nx) \sin\frac{x}{2}$
= $\sin(\frac{1}{2} nx)\{ \sin ((n-1)\frac{x}{2})+2 \cos\frac{nx}{2} \sin\frac{x}{2}\}$
=$\sin(\frac{1}{2} nx)\{ \sin ((n-1)\frac{x}{2})+\sin ((n+1)\frac{x}{2})-\sin ((n-1)\frac{x}{2})\}$
=$\sin(\frac{1}{2} nx) \sin ((n+1)\frac{x}{2})$
A: Another way is to observe that $$\sum_{k=1}^{n}\sin\left(kx\right)=\textrm{Im}\left(\sum_{k=1}^{n}e^{ikx}\right)
 $$ and the last sum is easy to evaluate $$\sum_{k=1}^{n}e^{ikx}=\frac{e^{ix}\left(1-e^{inx}\right)}{1-e^{ix}}=\frac{\left(\cos\left(x\right)+i\sin\left(x\right)\right)\left(1-\cos\left(nx\right)-i\sin\left(nx\right)\right)}{1-\cos\left(x\right)-i\sin\left(x\right)}
 $$ and now if we multiply the numerator and the denominator by $1-\cos\left(x\right)+i\sin\left(x\right)
 $ and we do the multiplications we can find the imaginary part.
