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

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}.$$