 Motalli21

2022-01-21

Prove
$\mathrm{csc}\left(x\right)=\sum _{k=-\mathrm{\infty }}^{\mathrm{\infty }}\frac{{\left(-1\right)}^{k}}{x+k\pi }$ Wilson Mitchell

We can use also this well known summation formula (a consequence of the residue theorem):

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 }=-Re{s}_{z=-\frac{x}{\pi }}\left(\frac{\pi \mathrm{csc}\left(\pi z\right)}{x+z\pi }\right)=\mathrm{csc}\left(x\right)$
as wanted. lorugb

In this answer (using complex methods) and in this answer (using real methods), it is shown in detail that
$\sum _{k=-\mathrm{\infty }}^{\mathrm{\infty }}\frac{1}{z+k}=\pi \mathrm{cot}\left(\pi z\right)$ (1)
(1) is the sum for even and odd k. The sum for even k would be
$\sum _{k=-\mathrm{\infty }}^{\mathrm{\infty }}\frac{1}{z+2k}=\frac{\pi }{2}\mathrm{cot}\left(\frac{\pi z}{2}\right)$ (2)
The sum for even minus the sum for odd would be twice (2) minus (1)
$\sum _{k=-\mathrm{\infty }}^{\mathrm{\infty }}\frac{{\left(-1\right)}^{k}}{z+k}=\pi \mathrm{cot}\left(\frac{\pi z}{2}\right)-\pi \mathrm{cot}\left(\pi z\right)$
$=\pi \frac{1+\mathrm{cos}\left(\pi z\right)}{\mathrm{sin}\left(\pi z\right)}-\pi \frac{\mathrm{cos}\left(\pi z\right)}{\mathrm{sin}\left(\pi z\right)}$
$=\pi \mathrm{csc}\left(\pi z\right)$
Therefore,
$\sum _{k=-\mathrm{\infty }}^{\mathrm{\infty }}\frac{{\left(-1\right)}^{k}}{z+k\pi }=\mathrm{csc}\left(z\right)$ RizerMix

We begin by expanding the function $\mathrm{cos}\left(xy\right)$ in a Fourier series, $\mathrm{cos}\left(xy\right)={a}_{0}/2+\sum _{k=1}^{\mathrm{\infty }}{a}_{k}\mathrm{cos}\left(ky\right)$ (1) for $x\in \left[-\pi /\pi \right]$. The Fourier coefficients (1) are given by ${a}_{k}=\frac{2}{\pi }{\int }_{0}^{\pi }\mathrm{cos}\left(xy\right)\mathrm{cos}\left(ky\right)dy$ $=\frac{1}{\pi }\left(-1{\right)}^{k}\mathrm{sin}\left(\pi x\right)\left(\frac{1}{x+k}+\frac{1}{x-k}\right)$ (2) Substituting (2) into (1), setting $y=0$, and dividing by $\mathrm{sin}\left(\pi x\right)$ reveals $\pi \mathrm{csc}\left(\pi x\right)=\frac{1}{y}+\sum _{n=1}^{\mathrm{\infty }}\left(-1{\right)}^{k}\left(\frac{1}{x-k}+\frac{1}{x+k}\right)$ $=\sum _{k=-\mathrm{\infty }}^{\mathrm{\infty }}\frac{\left(-1{\right)}^{k}}{x-k}$ $=\sum _{k=-\mathrm{\infty }}^{\mathrm{\infty }}\frac{\left(-1{\right)}^{k}}{x+k}$ (3) Finally, enforcing the substitution $x\to x/\pi$ and dividing by $\pi$ in (3) yields the coveted result $\mathrm{csc}\left(x\right)=\sum _{k=-\mathrm{\infty }}^{\mathrm{\infty }}\frac{\left(-1{\right)}^{k}}{x+k\pi }$