# Infinite sum question with even numbers and sine?

How do I calculate:

$$\large{S=\displaystyle \sum_{n=1}^{+\infty}\frac1n \sin\Big(\frac{n\pi}{2}\Big)}$$

For $n=1,3,5,7,...$

As such it comes to:

$$S=1-\frac13+\frac15-\frac17+...$$

But I've no idea how to calculate it. I think it converges but don't know how to prove that either.

Is it possible to express this for all positive integers (and not just the odd ones)?

• That, my dear, is the Leibniz/Gregory series and works out to $\frac\pi4$. – Parcly Taxel Oct 16 '16 at 7:53

For $|x|\leq 1$ and $M\in \mathbb N$ we have $$\tan^{-1}x=\int_0^x (1+t^2)^{-1}\;dt=A_M+B_M$$ $$\text {where } A_M=\int_0^x \sum_{n=0}^M(-t^2)^n\;dt, \text { and } B_M=\int_0^x(-t^2)^{(M+1)}/(1+t^2)\;dt.$$ As $M\to \infty$ we have $$B_M\to 0, \text { and } A_M\to \sum_{n=0}^{\infty}(-1)^nx^{2n+1}/(2n+1).$$ So $\tan^{-1}x=\sum_{n=0}^{\infty}(-1)^nx^{2n+1}/(2n+1)$ for $|x|\leq 1.$
For $x=1$ this gives $\pi /4=1-1/3+1/5-1/7+...$
BTW since $\tan^{-1}(1/2)+\tan^{-1}(1/3)=\tan^{-1}1=\pi /4 ,$ we have $$\pi=4\sum_{n=0}^{\infty}(-1)^n2^{-1-2n}/(2n+1)+4\sum_{n=0}^{\infty}(-1)^n3^{-1-2n}/(2n+1).$$
$$\tan^{-1}1=1-\frac{1}{3}+\frac{1}{5}...=\frac{\pi}{4}$$