here, i know that
$$ 0=\frac{1}{2}+ \sum_{n=1}^{\infty}cos(nx) $$
so by simple integration term by term on the series
$$ \frac{A-x}{2}= \sum_{n=1}^{\infty}\frac{sin(nx)}{n} $$
so if i put x=0 the sum of sines is 0 and i get A=0
and so if i integrate another time i get
$$ \frac{x^2}{2}-\frac{Ax}{2}+B =\sum_{n=1}^{\infty}\frac{cos(nx)}{n^2}$$
then which are A and B ??