Possibility to simplify $\sum\limits_{k = - \infty }^\infty {\frac{{{{\left( { - 1} \right)}^k}}}{{a + k}} = \frac{\pi }{{\sin \pi a}}} $

EDIT: The classical demonstration of this is obtained by expanding in Fourier series the function $\cos(zx)$ with $x\in(-\pi,\pi)$.

Let's detail Smirnov's proof (in "Course of Higher Mathematics 2 VI.1 Fourier series") :

$\cos(zx)$ is an even function of $x$ so that the $\sin(kx)$ terms disappear and the Fourier expansion is given by : $$\cos(zx)=\frac{a_0}2+\sum_{k=1}^{\infty} a_k\cdot \cos(kx),\ \text{with}\ \ a_k=\frac2{\pi} \int_0^{\pi} \cos(zx)\cos(kx) dx$$

Integration is easy and $a_0=\frac2{\pi}\int_0^{\pi} \cos(zx) dx= \frac{2\sin(\pi z)}{\pi z}$ while
$a_k= \frac2{\pi}\int_0^{\pi} \cos(zx) \cos(kx) dx=\frac1{\pi}\left[\frac{\sin((z+k)x)}{z+k}+\frac{\sin((z-k)x)}{z-k}\right]_0^{\pi}=(-1)^k\frac{2z\sin(\pi z)}{\pi(z^2-k^2)}$
so that for $-\pi \le x \le \pi$ :

$$ \cos(zx)=\frac{2z\sin(\pi z)}{\pi}\left[\frac1{2z^2}+\frac{\cos(1x)}{1^2-z^2}-\frac{\cos(2x)}{2^2-z^2}+\frac{\cos(3x)}{3^2-z^2}-\cdots\right] $$

Setting $x=0$ returns your equality : $$ \frac1{\sin(\pi z)}=\frac{2z}{\pi}\left[\frac1{2z^2}-\sum_{k=1}^{\infty}\frac{(-1)^k}{k^2-z^2}\right] $$

while $x=\pi$ returns the $\mathrm{cotg}$ formula :

$$ \cot(\pi z)=\frac1{\pi}\left[\frac1{z}-\sum_{k=1}^{\infty}\frac{2z}{k^2-z^2}\right] $$ (Euler used this one to find closed forms of $\zeta(2n)$)

The $\cot\ $ formula is linked to $\Psi$ via the Reflection formula : $$\Psi(1-x)-\Psi(x)=\pi\cot(\pi x)$$

The $\sin$ formula is linked to $\Gamma$ via Euler's reflection formula : $$\Gamma(1-x)\cdot\Gamma(x)=\frac{\pi}{\sin(\pi x)}$$


This is a very elegant and quick way to evaluate this sum with complex analysis. Consider

$$g(z) = \pi \csc (\pi z)f(z)$$

$\csc$ has poles at $2 \pi n$ and $2 \pi n + \pi$ for $n \in \mathbb Z$. Assuming $f(z)$ has no poles at any integer, the residue of $g(z)$ at $2\pi n$ is

$$\operatorname*{Res}_{z = 2 n} g(z) = \lim_{z\to 2 n}(z-2 n)\pi \csc (\pi z)f(z) = \lim_{z\to 2 n}\pi \left(\frac{z-2 n}{\sin (\pi z)}\right)f(z) = f(n)$$

and at $2 \pi n + \pi$:

$$\operatorname*{Res}_{z = 2 n + 1} g(z) = \lim_{z\to 2 n + 1}(z-(2 n + 1))\pi \csc (\pi z)f(z) = \lim_{z\to 2 n + 1}\pi \left(\frac{z-2 n - 1}{\sin (\pi z)}\right)f(z) = -f(n)$$

Let $C_N$ be the square contour with the verticies $\left(N+\frac{1}{2}\right)(1+i)$, $\left(N+\frac{1}{2}\right)(-1+i)$, $\left(N+\frac{1}{2}\right)(-1-i)$ and $\left(N+\frac{1}{2}\right)(1-i)$.

By residue theorem, we have

$$\int_{C_N}g(z)\,dz = \sum_{n=-N}^N (-1)^n f(n) + S$$

where $S$ is the sum of the residues of the poles of $f$. Now, seeing that the left side vanishes as $N \to \infty$ (see here), we have


$$\sum_{k=-\infty}^\infty (-1)^k f(k)=-\sum \text{Residues of }\pi \csc (\pi z)f(z)$$

Clearly the only singularity of $f(z)=\frac{1}{a+z}$ is at $z_0=-a$. Thus

$$\operatorname*{Res}_{z=z_0} \,(\pi \csc (\pi z)f(z))=\lim_{z \to z_0} (z-z_0)\pi \csc (\pi z)f(z)=\lim_{z \to -a} \pi \csc (\pi z)\frac{z+a}{z+a}=-\pi \csc (\pi a)$$

Thus

$$\sum_{k=-\infty}^\infty (-1)^k f(k)=-\operatorname*{Res}_{z=z_0}\,(\pi \csc (\pi z)f(z))=-(-\pi \csc (\pi a))=\frac{\pi}{\sin (\pi a)}$$

QED


A related identity is proven in this answer using residue theory. Here is a real approach to that identity.


Convergence of the Principal Value

We will look at the principal value $$ \begin{align} f(x) &=\lim_{n\to\infty}\sum_{k=-n}^n\frac1{k+x}\tag1\\ &=\frac1x-\sum_{k=1}^\infty\frac{2x}{k^2-x^2}\tag2 \end{align} $$ $(2)$ converges for all non-integer $x$.


Properties of $\boldsymbol{f(x)}$

$\bullet$ $f(x)$ has period $1$: $$ \begin{align} f(x)-f(x+1) &=\lim_{n\to\infty}\left(\sum_{k=-n}^n\frac1{k+x}-\sum_{k=-n}^n\frac1{k+1+x}\right)\tag3\\ &=\lim_{n\to\infty}\left(\sum_{k=-n}^n\frac1{k+x}-\sum_{k=-n+1}^{n+1}\frac1{k+x}\right)\tag4\\ &=\lim_{n\to\infty}\left(\frac1{-n+x}-\frac1{n+1+x}\right)\tag5\\[9pt] &=0\tag6 \end{align} $$ Explanation:
$(3)$: definition
$(4)$: substitute $k\mapsto k-1$ in the right sum
$(5)$: the sums telescope
$(6)$: evaluate the limit

$\bullet$ $f(1/2)=0$: $$ \begin{align} f(1/2) &=\lim_{n\to\infty}\sum_{k=-n}^n\frac1{k+1/2}\tag7\\ &=\lim_{n\to\infty}\frac1{n+1/2}\tag8\\[9pt] &=0\tag9 \end{align} $$ Explanation:
$(7)$: definition
$(8)$: for $1\le j\le n$, the term with $k=j-1$ cancels the term with $k=-j$
$\phantom{\text{(8):}}$ which leaves the term with $k=n$
$(9)$: evaluate the limit

$\bullet$ $f(x)^2+\pi^2=-f'(x)$: $$ \begin{align} f(x)^2 &=\lim_{n\to\infty}\sum_{k=-n}^n\frac1{k+x}\sum_{j=-n}^n\frac1{j+x}\tag{10}\\[3pt] &=\sum_{k=-\infty}^\infty\frac1{(k+x)^2}+\lim_{n\to\infty}\sum_{\substack{|j|,|k|\le n\\j\ne k}}\left(\frac1{k+x}-\frac1{j+x}\right)\frac1{j-k}\tag{11}\\ &=\sum_{k=-\infty}^\infty\frac1{(k+x)^2}+\lim_{n\to\infty}\sum_{\substack{|j|,|k|\le n\\j\ne k}}\frac2{k+x}\frac1{j-k}\tag{12}\\ &=\sum_{k=-\infty}^\infty\frac1{(k+x)^2}+\lim_{n\to\infty}\sum_{k=1}^n\sum_{\substack{|j|\le n\\j\ne k}}\left(\frac2{k+x}+\frac2{k-x}\right)\frac1{j-k}\tag{13}\\ &=\sum_{k=-\infty}^\infty\frac1{(k+x)^2}-\lim_{n\to\infty}\sum_{k=1}^n\left(\frac2{k+x}+\frac2{k-x}\right)(H_{n+k}-H_{n-k})\tag{14}\\ &=-f'(x)-4\int_0^1\frac{\log\left(\frac{1+x}{1-x}\right)}{x}\,\mathrm{d}x\tag{15}\\[12pt] &=-f'(x)-\pi^2\tag{16} \end{align} $$ Explanation:
$(10)$: product of limits equals the limit of the products
$(11)$: the left sum contains the terms with $j=k$
$\phantom{\text{(11):}}$ apply partial fractions to the right sum
$(12)$: take advantage of the symmetry in $j$ and $k$
$(13)$: for $k=0$, the sum in $j$ is $0$
$\phantom{\text{(14):}}$ for $k\lt0$, if we substitute $(j,k)\mapsto(-j,-k)$,
$\phantom{\text{(14):}}$ we get the sum with $k\gt0$ and $k+x\mapsto k-x$
$(14)$: the sum in $j$ telescopes to $H_{n-k}-H_{n+k}$
$(15)$: the left sum is $f'(x)$
$\phantom{\text{(15):}}$ the right sum is a Riemann Sum
$(16)$: $4\int_0^1\sum\limits_{k=0}^\infty\frac{2\,x^{2k}}{2k+1}\,\mathrm{d}x=4\sum\limits_{k=0}^\infty\frac2{(2k+1)^2}=\pi^2$


Conclude that $\boldsymbol{f(x)=\pi\cot(\pi x)}$

We can separate $(16)$ and integrate: $$ \begin{align} \int\frac{\pi\,\mathrm{d}f}{f^2+\pi^2}&=-\int\pi\,\mathrm{d}x\tag{17}\\ \tan^{-1}(f/\pi)&=C-\pi x\tag{18}\\[9pt] f&=\pi\tan(C-\pi x)\tag{19} \end{align} $$ $(9)$ allows us to compute $C=\pi/2$, giving $$ f(x)=\pi\cot(\pi x)\tag{20} $$ for $x\in(0,1)$. $(6)$ removes this restriction on $x$, validating $(20)$ for all non-integer $x$. That is, $$ \sum_{k=-\infty}^\infty\frac1{k+x}=\pi\cot(\pi x)\tag{21} $$ when taken in the principal value sense.


Answer to the Question $$ \begin{align} \sum_{k=-\infty}^\infty\frac{(-1)^k}{k+x} &=\sum_{k=-\infty}^\infty\frac2{2k+x}-\sum_{k=-\infty}^\infty\frac1{k+x}\tag{22}\\ &=\sum_{k=-\infty}^\infty\frac1{k+x/2}-\sum_{k=-\infty}^\infty\frac1{k+x}\tag{23}\\[6pt] &=\pi\cot(\pi x/2)-\pi\cot(\pi x)\tag{24}\\[15pt] &=\pi\csc(\pi x)\tag{25} \end{align} $$ Explanation:
$(22)$: the alternating sum is twice the sum of the even terms
$\phantom{\text{(22):}}$ minus the sum of all the terms
$(23)$: adjust the terms of the left sum to apply $(21)$
$(24)$: apply $(21)$
$(25)$: $\frac{1+\cos(\pi x)}{\sin(\pi x)}-\frac{\cos(\pi x)}{\sin(\pi x)}=\frac1{\sin(\pi x)}$