Calculating $\sum\limits_{n=1}^{\infty}\frac{(-1)^n \sin(n)}{n}$

Running with my initial comment, it turns out there is a way to make this strategy work.

Consider the function $s(x) = x/\pi$ when $x \in (- \pi, \pi)$, and extend this function to be periodic of period $2 \pi$ on the whole real line. This function is piecewise smooth, and so has a Fourier series, which is calculated in this wikipedia link. The resulting series is $$s(x) = \frac{2}{\pi}\sum_{n=1}^\infty \frac{(-1)^{n+1}\sin(nx)}{n} = -\frac{2}{\pi}\sum_{n=1}^\infty \frac{(-1)^n\sin(nx)}{n}$$

Which is a number times your sum. Denoting this sum as $S(x)$, and evaluating $s(x)$ at $1$, we get $\frac{1}{\pi}$, so $$s(1) = -\frac{2}{\pi}S(1) = \frac{1}{\pi}$$

This implies the answer Wolfram Alpha gave!


Using

$$\sin(x) = \Im( \exp(i x))\tag{1}$$

and for $|z|\le 1, z\ne 1$

$$\sum_{n=1}^{\infty}(-1)^n z^n/n=-\log(1+z)\tag{2}$$

we can write

$$ \begin{align} &s = \sum_{n=1}^{\infty} (-1)^n \sin(n) / n \\ &= \Im\sum_{n=1}^{\infty} (-1)^n \exp(i\; n) / n \\ &= - \Im \log (1+\exp(i))\\ & = - \frac{1} {2i}\left( \log (1+\exp(i))- \log (1+\exp(-i))\right)\\ &= - \frac{1} {2i} \log \left(\frac{ 1+\exp(i)}{1+\exp(-i)}\right)\\ &= - \frac{1} {2i} \log \left(\exp(i)\frac{ 1+\exp(i)}{\exp(i)+1}\right)\\ &= - \frac{1} {2i} \log \left(\exp(i)\right)\\ &= - \frac{1} {2i} i = -\frac{1}{2} \end{align} $$

Additional question:

Calculate the explicit expresion for the sum with $\sin$ replaced by $\cos$


I thought it might be instructive to present an approach that relies on straightforward, first year calculus methodologies. To that end we now proceed.


Note that we can write

$$\begin{align} \sum_{n=1}^N \frac{(-1)^n\sin(n)}{n}&=\int_0^1 \sum_{n=1}^N (-1)^n\cos(nx)\,dx\\\\ &=\int_0^1 \frac12 \left((-1)^N\cos((N+1)x)+(-1)^N\tan(x/2) \sin((N+1)x)-1\right) \,dx\tag1\\\\ &=-\frac12 +\frac12(-1)^N\,\frac{\sin(N+1)}{N+1}+\frac12(-1)^N\int_0^1 \tan(x/2)\sin((N+1)x)\,dx\tag2\\\\ &=-\frac12 +\frac12(-1)^N\,\frac{\sin(N+1)}{N+1}\\\\&+\frac12(-1)^N\left(-\frac{\tan(1/2)\cos((N+1))}{N+1}+\frac{1}{2(N+1)}\int_0^1 \sec^2(x/2)\cos((N+1)x)\,dx\right)\tag3 \end{align}$$


In arriving at $(1)$ we used the fact that $\cos(nx)=\text{Re}(e^{inx})$, then summed the geometric series $\sum_{n=1}^N (-e^{ix})^n$ and took the real part.

In going from $(2)$ to $(3)$ we integrated by parts with $u=\tan(x/2)$ and $v=-\frac{\cos((N+1)x)}{N+1}$.


Taking the limit as $N\to \infty$ in $(3)$ reveals

$$\begin{align} \sum_{n=1}^\infty \frac{(-1)^n\sin(n)}{n}&=\lim_{N\to \infty}\sum_{n=1}^N \frac{(-1)^n\sin(n)}{n}\\\\ &=-\frac12 \end{align}$$

And we are done!

Tools Used: Euler's formula, summing a geometric series, and integration by parts.