# Calculating $\int_0^{\pi/2} (x \sin(x))^n dx$

Define $$I_n = \int_0^{\pi/2} (x \sin(x))^n dx$$ for $n \ge 0$.

I calculate the value for $n = 0, 1$ and $2$. $$I_0 = \frac{\pi}{2}, I_1 = 1, I_2 = \frac{{\pi}^3 + 6 \pi}{48} .$$

In general, what's the value of $I_n$?

P.S.

By WolframAlpha(

), $$I_3 = \frac{7{\pi}^2}{12} - \frac{122}{27},$$ $$I_4 = \frac{6{\pi}^5 + 170 {\pi}^3 -975 \pi}{2560},$$ $$I_5 = \frac{149{\pi}^4}{720} - \frac{31841{\pi}^2}{3375} + \frac{56992552}{759375}.$$

• If you know any complex numbers, then you can realize that sin(x) is the imaginary part of $e^{ix}$. $xe^{ix}$ is easier to integrate. – Kaynex Mar 4 '16 at 17:31
• @Kaynex: however, $\sin(x)^n$ is not the imaginary part of $(e^{ix})^n$. – Jack D'Aurizio Mar 4 '16 at 17:47
• Derp, that's true. Slipped right past me. – Kaynex Mar 4 '16 at 17:55
• Try to find a recurrence relation, if at all possible. – Lucian Mar 5 '16 at 4:08

$$\int_0^{\pi/2} x^n\sin^n(x)\ \text{d}x = \int_0^{\pi/2} x^n\ \left(\frac{e^{ix} - e^{-ix}}{2i}\right)^n\ \text{d}x$$
But I warn you, it's not an easy road. You'll have to integrate by parts $n$ times. You'll end up almost surely with some hellish Hypergeometric Function.