Why does $\sum_{k=1}^{\infty}\frac{{\sin(k)}}{k}={\frac{\pi-1}{2}}$?

Inspired by this question (and far more straightforward, I am guessing), Mathematica tells us that $$\sum_{k=1}^{\infty}\dfrac{{\sin(k)}}{k}$$ converges to $\dfrac{\pi-1}{2}$.

Presumably, this can be derived from the similarity of the Leibniz expansion of $\pi$ $$4\sum_{k=1}^{\infty}\dfrac{(-1)^{k+1}}{2k-1}$$to the expansion of $\sin(x)$ as $$\sum_{k=0}^{\infty}\dfrac{(-1)^k}{(2k+1)!}x^{2k+1},$$ but I can't see how...

Could someone please explain how $\dfrac{\pi-1}{2}$ is arrived at?


Here is one way, but it does not use the series you mention so much. I hope that's OK.

The series is:

$$\sin(1)+\frac{\sin(2)}{2}+\frac{\sin(3)}{3}+\cdot\cdot\cdot $$

$$\Im\left[e^{i}+\frac{e^{2i}}{2}+\frac{e^{3i}}{3}+\cdot\cdot\cdot \right]$$

Let $\displaystyle x=e^{i}$.

$$\Im\left[x+\frac{x^2}{2}+\frac{x^3}{3}+\cdot\cdot\cdot \right]$$

differentiate:

$$\Im \left[1+x+x^{2}+x^{3}+\cdot\cdot\cdot \right]$$

This is a geometric series, $\displaystyle \frac{1}{1-x}$

$$\Im [\frac{1}{1-x}]$$

Integrate:

$$-\Im[\ln(x-1)]=-\Im [\ln(e^{i}-1)]$$

Now, suppose $$\ln(e^{i}-1)=a+bi$$,

$$e^{i}-1=e^{a}e^{bi}$$

$$\cos(1)-1+i\sin(1)=e^{a}\left[\cos(b)+i\sin(b)\right]$$

Equate real and imaginary parts:

$$\cos(1)-1=e^{a}\cos(b)\\ \sin(1)=e^{a}\sin(b)$$

divide both:

$$\frac{\cos(1)-1}{\sin(1)}=\frac{e^{a}\sin(b)}{e^{a}\cos(b)}$$

$$-\cot(1/2)=\tan(b)$$

$$b=\tan^{-1}(\cot(1/2))=\frac{1}{2}-\frac{\pi}{2}$$

But we need the negative of this, so finally:

$$\frac{\pi}{2}-\frac{1}{2}$$


As a generalization, if $a$ is not an integer,

$$ \sum_{k=-\infty}^{\infty} \frac{\sin k}{k+a} = \pi \Big(\cos (a) -\sin (a) \cot (\pi a) \Big).$$

This result can be derived using contour integration.

Using the kernel function $\pi \cot(\pi z)$ won't work in the sense that $$\int_{|z|=N+\frac{1}{2}} \frac{\pi \cot(\pi z) e^{iz}}{z+a} \, dz$$ won't vanish as $N \to \infty$ through the positive integers.

So instead we will use the kernel $\pi e^{-i \pi z} \csc(\pi z)$, which also has simple poles at the integers with residue $1$.

To see that the integral vanishes, notice that as $\text{Im}(z) \to + \infty$, $\left|e^{-i \pi z} \csc(\pi z) e^{iz} \right|$ decays like $2 e^{-\text{Im}(z)}$. And as $\text{Im}(z) \to - \infty$, $\left|e^{-i \pi z} \csc(\pi z) e^{iz} \right|$ decays like $2 e^{(2 \pi -1) \, \text{Im}(z)}$.

So summing the residues, we get

$$2 \pi i \sum_{k=-\infty}^{\infty} \text{Res} \left[\frac{\pi e^{- i \pi z} \csc(\pi z)e^{iz}}{z+a}, k \right] + 2 \pi i \ \text{Res} \left[\frac{\pi e^{-i \pi z} \csc(\pi z)e^{iz}}{z+a},-a \right] = 0,$$

which implies

$$ \begin{align} \sum_{k=-\infty}^{\infty}\frac{e^{ik}}{k+a} &= - \text{Res} \left[\frac{\pi e^{-i \pi z}\csc(\pi z) e^{iz}}{z+a},-a \right] \\ &= - \lim_{z \to -a} \pi e^{-i \pi z} \csc (\pi z) e^{iz} \\ &= \pi e^{i \pi a} \csc(\pi a)e^{-ia} \\ &= \pi \Big(\cos (\pi a) + i \sin (\pi a) \Big) \csc (\pi a)\Big( \cos (a) - i \sin (a)\Big) \\ &= \pi \ \frac{\cos ( a) \cos (\pi a) + \sin (a) \sin (\pi a)}{\sin (\pi a)} + i \pi \ \frac{\cos(a) \sin (\pi a) - \sin(a) \cos (\pi a)}{\sin (\pi a)}. \end{align} $$

Then equating the imaginary parts on both sides of the equation, we get

$$ \sum_{k=-\infty}^{\infty} \frac{\sin k}{k+a} = \pi \Big(\cos (a) - \sin (a) \cot (\pi a) \Big).$$

Notice that nothing changes if we remove $k=0$ from the summation.

So if we let $a \to 0$ on both sides of the equation, we get

$$2 \sum_{k=1}^{\infty} \frac{\sin k}{k} = \pi - 1.$$


$$\sum_{n=1}^{+\infty}\frac{\sin n}{n}=\Im\sum_{n=1}^{+\infty}\frac{e^{in}}{n}=\Im\left(-\log(1-e^i)\right)=\pi-\arg(e^i-1)=\frac{\pi-1}{2}.$$


$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\widetilde{#1}}$ \begin{align} \sum_{k = 1}^{\infty}{\sin\pars{k} \over k}&= -1 + \sum_{k = 0}^{\infty}{\sin\pars{k} \over k} \end{align}

With Abel-Plana Formula: \begin{align} \sum_{k = 1}^{\infty}{\sin\pars{k} \over k}&= \color{#c00000}{\Large -1} +\ \overbrace{\int_{0}^{\infty}{\sin\pars{x} \over x}\,\dd x} ^{\ds{=\ \color{#c00000}{\Large{\pi \over 2}}}}\ +\ \color{#c00000}{\Large\half}\ \overbrace{\lim_{x \to 0}{\sin\pars{x} \over x}}^{\ds{=\ 1}} \\[3mm]&\phantom{=}+ \ic\ \underbrace{\int_{0}^{\infty}\bracks{% {\sin\pars{\ic x} \over \ic x} - {\sin\pars{-\ic x} \over -\ic x}} {\dd x \over \expo{2\pi x} - 1}}_{\ds{=\ 0}} \end{align}

$$\color{#66f}{\large% \sum_{k = 1}^{\infty}{\sin\pars{k} \over k} = {\pi - 1 \over 2}} $$