Examine the convergence of $\sum_{n=1}^{\infty} \frac{\cos {\frac{n \pi}3}}n$ Is that series convergent? How to prove is it or not? I got no idea how to check convergence of series with trygonometrical functions:
$$\sum_{n=1}^{\infty} \frac{\cos {\frac{n \pi}{3}}}{n}$$
 A: You may use the Dirichlet test:


*

*the sequence $\left\{ \dfrac{1}{n}\right\}_{n\geq1} $ is decreasing to $0$,

*we have $$\displaystyle \left|\sum_{n=0}^N\cos {\frac{n \pi}{3}}\right|=\left|\Re\sum_{n=0}^Ne^{\frac{in \pi}{3}}\right|=\left|\frac{1}{2}+\frac{1}{2} \cos\left(\frac{N \pi }{3}\right)+\frac{\sqrt{3}}{2}  \sin\left(\frac{N \pi }{3}\right)\right|\leq3$$ for all $N \geq1$.
A: It is actually possible to show that this sum converges to $0$. 
For convenience, let $a = \dfrac{\pi}{3}$. By using the identity $\cos\theta = \dfrac{e^{i\theta}+e^{-i\theta}}{2}$ along with the formula for the sum of a finite geometric series, we get:
$\displaystyle\sum_{n = 1}^{N}\dfrac{\cos an}{n}$ $= \displaystyle\sum_{n = 1}^{N}\dfrac{e^{ian}+e^{-ian}}{2}\int_{0}^{1}x^{n-1}\,dx$ $= \displaystyle\int_{0}^{1}\sum_{n = 1}^{N}\dfrac{e^{ian}+e^{-ian}}{2}x^{n-1}\,dx$ $= \displaystyle\int_{0}^{1}\dfrac{1}{2}\dfrac{e^{ia}-x^Ne^{ia(N+1)}}{1-xe^{ia}}+\dfrac{1}{2}\dfrac{e^{-ia}-x^Ne^{-ia(N+1)}}{1-xe^{-ia}}\,dx$ $= \displaystyle\int_{0}^{1}\dfrac{e^{ia}-x-x^Ne^{ia(N+1)}+x^{N+1}e^{iaN}+e^{-ia}-x-x^Ne^{-ia(N+1)}+x^{N+1}e^{-iaN}}{2(1-xe^{ia}-xe^{-ia}+x^2)}\,dx$ $= \displaystyle\int_{0}^{1}\dfrac{\cos a - x - x^N\cos(a(N+1))+x^{N+1}\cos(aN)}{1-2x\cos a + x^2}\,dx$ $= \displaystyle\int_{0}^{1}\dfrac{\cos a - x}{1-2x\cos a + x^2}\,dx + \int_{0}^{1}\dfrac{\cos(a(N+1))+x\cos(aN)}{(x-\cos a)^2+\sin^2 a}x^N\,dx$.
Note: Swapping the order of the summation and the integral is valid since the sum has a finite number of terms. 
We can evaluate the first integral: 
$\displaystyle\int_{0}^{1}\dfrac{\cos a - x}{1-2x\cos a + x^2}\,dx = \left[-\dfrac{1}{2}\ln(1-2x \cos a+x^2)\right]_{0}^{1} = -\dfrac{1}{2}\ln(2-2\cos a)$, 
and then bound the second integral: $\displaystyle\left|\int_{0}^{1}\dfrac{\cos(a(N+1))+x\cos(aN)}{(x-\cos a)^2+\sin^2 a}x^N\,dx\right| \le \int_{0}^{1}\left|\dfrac{\cos(a(N+1))+x\cos(aN)}{(x-\cos a)^2+\sin^2 a}\right|x^N\,dx$ $\le \displaystyle\int_{0}^{1}\dfrac{2}{\sin^2 a}x^N\,dx = \dfrac{2}{(N+1)\sin^2 a} \to 0$ as $N \to \infty$. 
Hence, the sum $\displaystyle\sum_{n = 1}^{\infty}\dfrac{\cos \tfrac{\pi n}{3}}{n}$ converges to $-\dfrac{1}{2}\ln\left(2-2\cos\dfrac{\pi}{3}\right) = 0$.
A: This is a slight twist on the nice solution presented by @JimmyK4542.  We use Euler's Formula to write
$$\sum_{n=1}^N\frac{\cos (an)}{n}=\text{Re}\left(\sum_{n=1}^N\frac{e^{ian}}{n}\right) \tag 1$$
Let $F_N(a)$ denote the sum on the right-hand side of $(1)$.  Then, the derivative $F'_N(a)$ is given by
$$\begin{align}
F'_N(a)&=i\sum_{n=1}^Ne^{ian}\\\\
&=i\frac{e^{ia}}{1-e^{ia}}-i\frac{e^{i(N+1)a}}{1-e^{ia}}\tag 2
\end{align}$$
Integrating both sides of $(2)$ from $\pi$ to $a$ yields
$$\begin{align}
F_N(a)-F_N(\pi)&=\log(1-e^{ia})-\log(2)+i\int_{a}^{\pi}\frac{e^{i(N+1)x}}{1-e^{ix}}\,dx\\\\
&=\log\left(2\sin\left(\frac a2\right)\right)+i\left(2\ell\pi+\frac{\pi-a}{2}\right)-\log(2)\\\\
&+i\int_a^\pi\frac{e^{i(N+1)x}-e^{iNx}}{4\sin^2\left(\frac x2\right)}\,dx \tag 3
\end{align}$$
where $\ell$ is any integer.
Next, we note that the  Riemann-Lebesgue Lemma guarantees that the integral on the right-hand side of $(3)$ tends to zero as $N\to \infty$.  
And finally, using the well-known value of the Alternating Harmonic Series $\sum_{n=1}^\infty \frac{(-1)^n}{n}=\log(2)$, we find that for $0<a<\pi$ 
$$\begin{align}
\lim_{N\to \infty}\text{Re}\left(F_N(a)-F_N(\pi)\right)&=\sum_{n=1}^\infty\frac{\cos (an)}{n}-\log(2)\\\\
&=\log\left(2\sin\left(\frac a2\right)\right)-\log(2)
\end{align}$$
Therefore, the series of interest simplifies to
$$\sum_{n=1}^\infty \frac{\cos (an)}{n}=\log\left(2\sin\left(\frac a2\right)\right)$$
For $a=\pi/3$, we have
$$\sum_{n=1}^\infty \frac{\cos (n\pi/3)}{n}=\log\left(2\sin\left(\frac{\pi}{6}\right)\right)=0$$
as expected!
