Prove $\csc(x)=\sum_{k=-\infty}^{\infty}\frac{(-1)^k}{x+k\pi}$

Prove $$\csc(x)=\sum_{k=-\infty}^{\infty}\frac{(-1)^k}{x+k\pi}$$

Hardy uses this fact without proof in a monograph on different ways to evaluate $\int_0^{\infty}\frac{\sin(x)}{x} dx$.


Solution 1:

We can use also this well known summation formula (a consequence of the residue theorem): $$\sum_{k\in\mathbb{Z}}\left(-1\right)^{k}f\left(k\right)=-\sum\left\{ \textrm{residues of }\pi\csc\left(\pi z\right)f\left(z\right)\textrm{ at }f\left(z\right)\textrm{'s poles}\right\} $$ so if we take $f\left(z\right)=\frac{1}{x+z\pi} $ we get $$\sum_{k\in\mathbb{Z}}\frac{\left(-1\right)^{k}}{x+k\pi}=-\underset{z=-x/\pi}{\textrm{Res}}\left(\frac{\pi\csc\left(\pi z\right)}{x+z\pi}\right)=\csc\left(x\right)$$ as wanted.

Solution 2:

Presumably the principal value of the two-sided infinite sum is what was intended in the question.

We'll solve this just using Euler's product formula for the sine function:

\begin{align} \sin x=x\prod_{n=1}^\infty \left(1-\frac{x^2}{n^2 \pi^2}\right). \end{align}

Compute the logarithmic derivative:

\begin{align} \cot x &= \frac1{x}+\sum_{n=1}^\infty \frac{-2x/n^2\pi^2}{1-\frac{x^2}{n^2 \pi^2}} \\&=\frac1{x}+\sum_{n=1}^\infty \frac{2x}{x^2-n^2\pi^2} \\&=\frac1{x}+\sum_{n=1}^\infty\big(\frac{1}{x+n\pi}+\frac{1}{x-n\pi}\big), \end{align}

so

$$ \cot x-\frac1{x}=\sum_{n=1}^\infty\big(\frac{1}{x+n\pi}+\frac{1}{x-n\pi}\big).$$

It follows that

\begin{align} \cot\big(\frac{x}{2}\big)-\frac2{x}&=\sum_{n=1}^\infty\big(\frac{1}{x/2+n\pi}+\frac{1}{x/2-n\pi}\big) \\&=2\sum_{n=1}^\infty\big(\frac{1}{x+2n\pi}+\frac{1}{x-2n\pi}\big) \\&=2\sum_{\substack{n\ge 1\\n\text{ even}}}\big(\frac{1}{x+n\pi}+\frac{1}{x-n\pi}\big). \end{align}

Subtracting now, we obtain

\begin{align} \cot\big(\frac{x}{2}\big)-\cot(x)-\frac1{x}&=2\cdot\!\!\!\sum_{\substack{n\ge 1\\n\text{ even}}}\big(\frac{1}{x+n\pi}+\frac{1}{x-n\pi}\big)-\sum_{n=1}^\infty\big(\frac{1}{x+n\pi}+\frac{1}{x-n\pi}\big) \\&=\sum_{\substack{n\ge 1\\n\text{ even}}}\big(\frac{1}{x+n\pi}+\frac{1}{x-n\pi}\big)-\sum_{\substack{n\ge 1\\n\text{ odd}}}\big(\frac{1}{x+n\pi}+\frac{1}{x-n\pi}\big) \\&=\sum_{n=1}^\infty (-1)^n \big(\frac{1}{x+n\pi}+\frac{1}{x-n\pi}\big). \end{align}

But

\begin{align} \cot\big(\frac{x}{2}\big)-\cot(x)&=\frac{\cos(x/2)}{\sin(x/2)}-\frac{\cos x}{\sin x} \\&=\frac{\cos(x/2)}{\sin(x/2)}\cdot\frac{2\sin(x/2)\cos(x/2)}{\sin x}-\frac{\cos x}{\sin x} \\&=\frac{2\cos^2(x/2)-\cos x}{\sin x} \\&=\frac1{\sin x} \\&= \csc x. \end{align}

So we've shown that

\begin{align} \csc x &= \frac1{x}+\sum_{n=1}^\infty (-1)^n \big(\frac{1}{x+n\pi}+\frac{1}{x-n\pi}\big), \end{align}

which is the principal value of $$\sum_{n=-\infty}^\infty (-1)^n \frac{1}{x+n\pi},$$

as desired.