<s>[INST] Compute $\sum_{n=1}^{\infty}\left(\frac{\sin(n)}{n}\right)^2$ How would you evaluate
$$\sum_{n=1}^{\infty}\left(\frac{\sin(n)}{n}\right)^2$$
Wolfram|Alpha says it equals $\;\pi/2-1/2.\;$ If the solution is complicated, ... I can handle complicated.
 [/INST] $\displaystyle\sum_{n=1}^∞ \dfrac{\sin(nx)}{n} =\frac{1}{2i} \sum_{n=1}^∞ \dfrac{(e^{ix})^n}{n}-\dfrac{(e^{-ix})^n}{n}=-\frac{1}{2i}({\log(1-e^{ix})-\log(1-e^{-ix})})$
$= \displaystyle \dfrac{1}{2i} \log\left(\frac{(1-e^{-ix})}{(1-e^{ix})}\right)= \dfrac{1}{2i} \log(-e^{-ix})= \dfrac{\log(e^{iπ})-\log(e^{ix})}{2i} =\dfrac{π-x}{2}. $
Now $\displaystyle\int_0^x \sum_{n=1}^∞\dfrac{ \sin(nx)}{n}dx = \int_0^x \dfrac{π-x}{2}dx $
$\implies \displaystyle -\sum_{n=1}^∞ \left(\dfrac{\cos(nx)}{n^2} -\dfrac{\cos(0)}{n^2}\right)= \dfrac{2πx-x^2}{4}$
$\implies \displaystyle\sum_{n=1}^∞ \dfrac{2\sin^2(\frac{nx}{2})}{n^2} = \dfrac{2πx-x^2}{4} .$
Put $x=2$ the answer will be $\displaystyle\sum_{n=1}^∞ \dfrac{\sin^2(n)}{n^2} =\dfrac{π-1}{2} $.
Edit
In this way we can also solve Basel problem.
$\displaystyle\sum_{n=1}^∞ \dfrac{\sin^2(\frac{nπ}{2})}{n^2} = \dfrac{\frac{π}{2}(π-\frac{π}{2})}{2} = \dfrac{π^2}{8} $
Which means $\displaystyle\dfrac{1}{1^2} +\dfrac{1}{3^2} +\dfrac{1}{5^2} +...= \dfrac{π^2}{8} \implies \dfrac{3\zeta(2)}{4} =\dfrac{π^2}{8} \implies \zeta(2)=\dfrac{π^2}{6}$
</s>