# 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?

• Well, $\sin(k)/k$ converges to $0$ at the same rate that $1/k$ converges to $0$, in that $\sin(k)$ can be arbitrarily close to $1$ so it can't be "faster" than that. – Thomas Andrews Jun 10 '14 at 17:47
• Please excuse my stupidity! ... Question now updated. – martin Jun 10 '14 at 17:55
• Fourier series. – Pedro Tamaroff Jun 10 '14 at 18:06
• Wow - thanks for all of the answers (I will look carefully before upvoting!) - Quickest responses to any question I have asked so far! :) – martin Jun 10 '14 at 18:11

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

• It is worth remarking that $1 + x + x^2 + \cdots$ diverges because $|e^i| = 1$. – glebovg Jun 28 '14 at 4:52
• @glebovg Then how can you still write the sum as 1/(1-x) if the series diverges? – Vasting May 15 '16 at 18:47
• @Vasting: You can't, but it's not actually necessary for the proof. The series $z + \frac{1}{2} z^2 + \frac{1}{3} z^3 + \dots$ is the series for $-\ln(1 - z)$, and it converges everywhere on the unit circle except at $z = 1$. So it's not necessary to differentiate and then integrate as this answer does. – Michael Seifert Jan 26 '18 at 20:24

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

It follows from the formula $-log(1-z)=\sum_{j=1}^\infty \frac{z^j}{j}$ for $|z|\leq 1$ and $z\neq 1$. Then letting $z_0=e^{i}=\cos 1 + i\sin 1$. Then the sum you want is the imaginary part of $-\log(1-z_0)$.

Since the imaginary part of $\log$ is the angle, then your sum is $$\arctan\left(\frac{\sin 1}{1-\cos 1}\right)=\arctan\left(\cot\frac12\right) =\frac{\pi}{2}-\frac{1}{2}$$

• Thanks for the $\arg$ explanation - it all follows quite nicely now :) – martin Jun 10 '14 at 18:34

Using the power series $$-\log(1-z)=\sum_{k=1}^\infty\frac{z^k}{k}$$ we get \begin{align} \sum_{k=1}^\infty\frac{\sin(k)}{k} &=\frac1{2i}\sum_{k=1}^\infty\frac{e^{ik}-e^{-ik}}{k}\\ &=\frac1{2i}\left[-\log(1-e^i)+\log(1-e^{-i})\right]\\ &=\frac1{2i}\log(-e^{-i})\\ &=\frac{\pi-1}{2} \end{align} That is, since $1-e^{-i}$ is in the first quadrant and $1-e^i$ is in the fourth, the imaginary part of $-\log(1-e^i)+\log(1-e^{-i})$ is between $0$ and $\pi$.

You have a function $f:[0,2\pi]\to\Bbb R$ given by $x\mapsto \dfrac{\pi-x}2$ which you can extend periodically to get an odd function $f:\Bbb R\to\Bbb R$. Since $f$ is odd, the even Fourier coefficients vanish, and the odd coefficients of $f$ are given by $$\frac{1}{\pi}\int_0^{2\pi}\sin kx\frac{ \pi-x}2dx=-\frac 1 {2\pi}\int_0^{2\pi}x \sin kxdx$$

Integrating by parts gives $$\int_0^{2\pi}x \sin kxdx=-\frac{2\pi}{k}$$ so that the coefficients are $\dfrac 1 k$, i.e. we have the Fourier expansion $$\sum_{k=1}^{\infty}\frac{\sin kx}k$$

Since $f$ is differentiable at $x=1$ we can plug in $x=1$ to get $$\frac{\pi-1}2=\sum_{k=1}^{\infty }\frac{\sin k}k$$