Calculate an integral with $\sin$? How can I calculate the following integral?
$$
\int \left[ \sin((x+x_0)T)\times\sin((x-x_0)T) \right]^{2n} \, \mathrm{d}x
$$
where $x_0$ and $T$ are constants.
Please help, thank you for your help in advance.
 A: By the Briggs' formulas,
$$\sin((x+x_0)T)\cdot\sin((x-x_0)T) = \frac{1}{2}\left(\cos(2x_0T)-\cos(2xT)\right),\tag{1}$$
hence, by the binomial theorem:
$$\begin{eqnarray*}\int\left[\sin((x+x_0)T)\cdot\sin((x-x_0)T)\right]^{2n}dx\\ = \frac{1}{4^n}\sum_{j=0}^{2n}\binom{2n}{j}(-1)^j\cos^{2n-j}(2x_0 T)\int \cos^j(2Tx)\,dx\end{eqnarray*}\tag{2}$$
In order to compute the innermost integral, we can use the binomial theorem again:
$$\cos^j(2Tx) = \frac{1}{2^j}\left(e^{2Tix}+e^{-2Tix}\right)^j,$$
$$\begin{eqnarray*}\cos^j(2Tx) &=& \frac{1}{2^j}\sum_{k=0}^j\binom{j}{k} e^{2T(j-2k)ix}\\&=&\frac{2}{2^j}\sum_{k<j/2}\binom{j}{k}\cos(2T(j-2k)x)+\left\{\begin{array}{rc}0&\text{if j is odd}\\\frac{1}{2^j}\binom{j}{j/2}&\text{if j is even}\end{array}\right.\end{eqnarray*}\tag{3}$$
so, integrating:
$$\int\cos^j(2Tx)\,dx\\=\frac{2}{2^j}\sum_{k<j/2}\binom{j}{k}\frac{\sin(2T(j-2k)x)}{2T(j-2k)}+\left\{\begin{array}{rc}0&\text{if j is odd}\\\frac{1}{2^j}\binom{j}{j/2}x&\text{if j is even.}\end{array}\right.\tag{4}$$
As the last step, plug $(4)$ into $(2)$.
A: You can convert the sinusoidal function to exponential function. Then it is much easier to do the indefinite integral.
