$\displaystyle \int^\pi_0 (x\sin x)^2 dx$.
I can easily use integration by parts to solve this integral; however, it is quite messy and I'm just wondering if there exists another alternative method that is more elementary and elegant.
I have tried the substitutions $u = \pi -x$ and $u = \pi / 2 -x$ but they do not seem to help very much.
$$I=-\left.\frac{\partial^2}{\partial a^2}\left(\int_0^{\pi}\sin x\sin a x\,dx\right)\right|_{a=1}.$$