When I put in

into Wolfram I get something very different from what you got, Tonio.

I really don't care since I don't know what algorithms/programs is Wolfram implementing. The interesting question is what do __you__ get when **you** do by parts (twice, as said) that integral?!

Note also that you can multiply by two the integral and integrate from zero to pi (why??)

Tonio
I looked at the link, Mr. Fantastic, but the part which gives the value of the sum just sort of states the result and I don't get the argument.

And I appreciate the many responses, but a lot of them use techniques that seem just too advanced, or they expand a Fourier series and even if I can blindly crunch the numbers I still have no idea why I should have thought of that particular series and so I feel as though I still don't understand what's going on.