How to do this integral $\int_{-\pi}^{\pi} x^n \cos^m(x) dx$? is there a way to explicitely evaluate this integral for natural numbers $n,m$:
$$\int_{-\pi}^{\pi} x^n \cos^m(x) dx.$$ 
Apparently, if $n$ is odd, this integral is zero due to symmetry.
 A: Write
$$\cos^m(x) = \left(\frac{\mathrm{e}^{ix}+\mathrm{e}^{-ix}}{2}\right)^m = \frac{1}{2^m}\left[\sum_{j=0}^m \binom{m}{j} \mathrm{e}^{ijx}\mathrm{e}^{-i(m-j)x} \right] = \frac{1}{2^m} \sum_{j=0}^m \binom{m}{j} \mathrm{e}^{i(2j-m)x}$$
Then,
$$ \int_{-\pi}^\pi x^n \cos^m(x)\,dx = \frac{1}{2^m} \sum_{j=0}^m \binom{m}{j}\int_{-\pi}^\pi x^n \mathrm{e}^{i(2j-m)x}\,dx. $$
Can we evaluate the inner-integral?
$$ \mathrm{e}^{i(2j-m)x} = \cos\left([2j-m]x\right) + i\sin\left([2j-m]x\right). $$
Let us assume $n$ is even, since we know if $n$ is odd, the whole answer is 0 (by your symmetry observation). Since $\sin(x)$ is odd, the $\sin$ component will vanish. Thus just leaves
$$ \int_{-\pi}^\pi x^n \mathrm{e}^{i(2j-m)x}\,dx = \int_{-\pi}^\pi x^n \cos([2j-m]x)\,dx = 2\int_{0}^\pi x^n \cos([2j-m]x)\,dx. $$
Your strategy is to now integrate by parts (carefully), setting the $u$ component equal to $x^k$ in each step. You should see a pattern emerge.
A: $$
\int_{-\pi}^\pi x^{10}\cos^{10}(x)\;dx =
{\frac {49408448066608271851}{16986931200000000}}\,\pi -{\frac {
13747940134011979}{7077888000000}}\,{\pi }^{3}
+{\frac {
3845425458091}{9830400000}}\,{\pi }^{5}
-{\frac {157029277}{
4096000}}\,{\pi }^{7}
+{\frac {49133}{20480}}\,{\pi }
^{9}
+{\frac {63}{1408}}\,{\pi }^{11}
$$
Method: repeated integration by parts...
