How did they simplify this sum? Im having trouble seeing how this simplification is justified:
$$\frac{2}{\pi}\sum_{k=-\infty}^\infty \frac{e^{i(2k+1)x}}{(2k+1)^{2}} =\frac{4}{\pi}\sum_{k=0}^\infty \frac{\cos(2k+1)x}{(2k+1)^{2}} $$
There are no steps on how they simplified, could anyone help me with it?
 A: Note that we can write
$$\frac{2}{\pi}\sum_{k=-\infty}^\infty \frac{e^{i(2k+1)x}}{(2k+1)^{2}} =\frac{2}{\pi}\sum_{k=-\infty}^\infty \frac{\cos(2k+1)x}{(2k+1)^{2}}+i\frac{2}{\pi}\sum_{k=-\infty}^\infty \frac{\sin(2k+1)x}{(2k+1)^{2}} \tag1$$

Next, we split the series for the cosine into series over negative and non-negative values of the index to find 
$$\begin{align}
\sum_{k=-\infty}^\infty \frac{\cos(2k+1)x}{(2k+1)^{2}}&=\sum_{k=-\infty}^{-1} \frac{\cos(2k+1)x}{(2k+1)^{2}}+\sum_{k=0}^\infty \frac{\cos(2k+1)x}{(2k+1)^{2}}\\\\
&=\sum_{k=1}^\infty \frac{\cos(2k-1)x}{(2k-1)^2}+\sum_{k=0}^\infty \frac{\cos(2k+1)x}{(2k+1)^{2}}\\\\
&=\sum_{k=0}^\infty \frac{\cos(2k+1)x}{(2k+1)^{2}}+\sum_{k=0}^\infty \frac{\cos(2k+1)x}{(2k+1)^{2}}\\\\
&=2\sum_{k=0}^\infty \frac{\cos(2k+1)x}{(2k+1)^{2}}\tag 2
\end{align}$$

Similarly, we split the series for the sine into series over negative and non-negative values of the index to find 
$$\begin{align}
\sum_{k=-\infty}^\infty \frac{\sin(2k+1)x}{(2k+1)^{2}}&=\sum_{k=-\infty}^{-1} \frac{\sin(2k+1)x}{(2k+1)^{2}}+\sum_{k=0}^\infty \frac{\sin(2k+1)x}{(2k+1)^{2}}\\\\
&=-\sum_{k=1}^\infty \frac{\sin(2k-1)x}{(2k-1)^2}+\sum_{k=0}^\infty \frac{\sin(2k+1)x}{(2k+1)^{2}}\\\\
&=-\sum_{k=0}^\infty \frac{\sin(2k+1)x}{(2k+1)^{2}}+\sum_{k=0}^\infty \frac{\sin(2k+1)x}{(2k+1)^{2}}\\\\
&=0\tag 3
\end{align}$$

Putting together $(1)-(3)$ yields the coveted result.
A: We have that
$$e^{i(2k+1)x}=\cos((2k+1)x)+i\sin((2k+1)x)$$
We then note that the $\sin$ function is odd, i.e. $\sin(-x)=-\sin(x)$, and that the $\cos$ function is even, i.e $\cos(-x)=\cos(x)$. Since $k$ runs from $-\infty$ to $+\infty$, the $\sin$ terms all just cancel out while the $\cos$ terms add up (note that after the equality sign we have $\frac{4}{\pi}$ instead of $\frac{2}{\pi}$, but the sum now only runs from $0$ to $+\infty$)
A: I would make it shorter:
\begin{align}
\frac{2}{\pi}\sum_{k\,=-\infty}^\infty\!\frac{\mathrm e^{i(2k+1)x}}{(2k+1)^{2}}& =\frac{2}{\pi}\Biggl(\sum_{k \,=-1}^{-\infty}\!\frac{\mathrm e^{i(2k+1)x}}{(2k+1)^{2}}+ \sum_{k\,=\,0}^\infty \frac{\mathrm e^{i(2k+1)x}}{(2k+1)^{2}}\!\Biggr)\\&=\frac{2}{\pi}\Biggl(\sum_{l \,=\,0}^{\infty}\!\frac{\mathrm e^{i(-2l-1)x}}{(2l+1)^{2}}+ \sum_{k\,=\,0\,}^\infty \frac{\mathrm e^{i(2k+1)x}}{(2k+1)^{2}}\!\Biggr)&&(\text{setting }\;k=-l-1)
\\&= \frac{2}{\pi}\sum_{k\,=\,0}^\infty \frac{\mathrm e^{-i(2k+1)x}+\mathrm e^{i(2k+1)x}}{(2k+1)^{2}}.
\end{align}
Now it is well-known that $z+\bar z=2\operatorname{Re}(z)$, and in particular
$$\mathrm e^{-i(2k+1)x}+\mathrm e^{i(2k+1)x}=2\cos\,(2k+1)x.$$
