TITLE: Calculus Generalisation
QUESTION [9 upvotes]: $$
\mbox{How should I integrate}\quad
\int_{0}^{\pi/2}
\cos^{2011}\left(\,x\,\right)\sin\left(\,2013x\,\right)\,\mathrm{d}x\ ?.
$$
I am stuck with the reduction formula which is coming out to be $\left(\,2n + 2\,\right)I_{n} = 1 + nI_{n-1}$. Also can this be generalised for
$$
\int_{0}^{\pi/2}\cos^{n}\left(\,x\,\right)
\sin\left(\,\left(\,n + 2\,\right)x\,\right)\,\mathrm{d}x
$$

REPLY [9 votes]: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\int_{0}^{\pi/2}\cos^{2011}\pars{x}\sin\pars{2013x}\,\dd x =
\Im\int_{0}^{\pi/2}\cos^{2011}\pars{x}\expo{2013x\ic}\,\dd x
\\[5mm] = &\
\left.\Im\int_{x = 0}^{x = \pi/2}\pars{z + 1/z \over 2}^{2011}z^{2013}
\,{\dd z \over \ic z}\,\right\vert_{\ z\ =\ \exp\pars{\ic x}}
\\[5mm] = &\
\left.-\,{1 \over 2^{2011}}\,\Re\int_{x = 0}^{x = \pi/2}\pars{1 + z^{2}}^{2011}
\,z\,\dd z\,\right\vert_{\ z\ =\ \exp\pars{\ic x}}
\\[5mm] = &\
{1 \over 2^{2011}}\,\Re\int_{1}^{0}\pars{1 - y^{2}}^{2011}
\pars{\ic y}\ic\,\dd y +
\,{1 \over 2^{2011}}\,\Re\int_{0}^{1}\pars{1 + x^{2}}^{2011}\ x\,\dd x
\\[5mm] = &\
{1 \over 2^{2012}}\int_{0}^{1}\pars{1 - y}^{2011}\,\dd y +
\,{1 \over 2^{2012}}\int_{0}^{1}\pars{1 + x}^{2011}\,\dd x
\\[5mm] = &\
{1 \over 2^{2012}}\,{1 \over 2012} +
{1 \over 2^{2012}}\,{2^{2012} - 1 \over 2012} =
\bbx{1 \over 2012}
\end{align}