Sum of infinite series $\cos \theta - \frac{\cos 5\theta}{5} + \frac{\cos 7\theta}{7} - \frac{\cos 11\theta}{11} ..., \theta \in (-\pi/3, \pi/3)$ I'm stumped at the following exercise on series summation:
$$\cos \theta - \frac{\cos 5\theta}{5} + \frac{\cos 7\theta}{7} - \frac{\cos 11\theta}{11} ..., \theta \in (-\pi/3, \pi/3)$$
The range gave me a hint that I should (probably?) split this into two summations:
$$\cos\theta+\frac{\cos7\theta}{7}+\frac{\cos13\theta}{13}+...$$
and
$$\frac{\cos5\theta}{5}+\frac{\cos11\theta}{11}+\frac{\cos17\theta}{17}...$$
However I'm stumped at this point. The only hint I was given was that
$$r\cos\theta-r^2\frac{\cos2\theta}{2}+r^3\frac{\cos3\theta}{3}-+...=\frac{1}{2}ln(1+2r\cos\theta+r^2)$$
and that
$$r\sin\theta-r^2\frac{\sin2\theta}{2}+r^3\frac{\sin3\theta}{3}-+...=\arctan\frac{r\sin\theta}{1+r\cos\theta}$$
(This can be obtained by the Taylor expansion of $\ln(1-z)$ and setting $z=re^{i\theta}$, then solving for the real and imaginary parts separately.)
Can anyone give me a hint here please? Thanks!
 A: For any $x$ such that $|x|<1$ we have
$$ S(x)=\sum_{n\geq 0}\left(\frac{x^{6n+1}}{6n+1}-\frac{x^{6n+5}}{6n+5}\right) = \int_{0}^{x}\sum_{n\geq 0}\left(t^{6n}-t^{6n+4}\right)\,dx = \int_{0}^{x}\frac{1-t^4}{1-t^6}\,dt $$
hence
$$\begin{eqnarray*} S(x) = \int_{0}^{x}\frac{1+t^2}{1+t^2+t^4}\,dt &=& \frac{1}{\sqrt{3}}\left(\arctan\frac{2x-1}{\sqrt{3}}+\arctan\frac{2x+1}{\sqrt{3}}\right)\\&=&\frac{1}{\sqrt{3}}\,\arctan\left(\frac{x\sqrt{3}}{1-x^2}\right)\end{eqnarray*}$$
and $\lim_{x\to 1^-}S(x)=\frac{\pi}{2\sqrt{3}}$. If $|\theta|<\frac{\pi}{3}$, the function $f(t)=\frac{1+t^2}{1+t^2+t^4}$ is holomorphic in a neighbourhood of the circle sector delimited by the angles $0$ and $\theta$ in the unit disk, hence
$$ S(e^{i\theta}) = \frac{\pi}{2\sqrt{3}}+\int_{0}^{\theta}\frac{1-e^{4it}}{1-e^{6it}} ie^{it}\,dt = \frac{\pi}{2\sqrt{3}}+2i\int_{0}^{\theta}\frac{\cos t}{1+2\cos(2t)}\,dt$$
where the last integral is a purely imaginary number. It follows that by considering the real parts of both sides of the last identity,
$$ \forall\theta\in\left(-\frac{\pi}{3},\frac{\pi}{3}\right),\qquad \sum_{n\geq 0}\left(\frac{\cos((6n+1)\theta)}{6n+1}-\frac{\cos((6n+5)\theta)}{6n+5}\right)=\color{red}{\frac{\pi}{2\sqrt{3}}}$$
holds.
