Integrating $\cos^{v-1}x\cos ax$ 
Question: Integrate$$I=\int\limits_{0}^{\pi/2}dx\,\cos^{v-1}x\cos ax$$

I'm having a bit of trouble understanding the solution to the question. Here's what I've gotten so far$$\begin{align*}I & =\frac 12\int\limits_{-\pi/2}^{\pi/2}dx\,\cos^{v-1}x\cos ax\\ & =\frac 1{2^v}\int\limits_{-\pi/2}^{\pi/2}dx\,\left(1+e^{2xi}\right)^{v-1}e^{-i(v-1)x}\cos ax\\ & =\frac 1{2^v}\sum\limits_{n=0}^{v-1}\binom {v-1}n\int\limits_{-\pi/2}^{\pi/2}dx\, e^{xi(2n-v+1)}\cos ax\end{align*}$$Now consider the function$$f(x)=\left\{\begin{array}{}e^{i\omega x}\qquad\text{for }-\tfrac {\pi}2<x<\tfrac {\pi}2\\\\0\qquad\quad\text{otherwise}\end{array}\right.$$The Fourier transform of $f(x)$ is$$\mathscr{F}(f(x))=\int\limits_{-\infty}^{\infty}dx\, f(x)e^{-i\alpha x}$$Therefore$$\begin{align*}\Re\left(\mathscr{F}(f(x))\right) & =\frac {2\sin(\omega-\alpha)\tfrac {\pi}2}{\omega-\alpha}\,\Biggr\rvert_{-\pi/2}^{\pi/2}\end{align*}$$I'm having trouble seeing how the real part of the fourier transform is equal to the right-hand expression. When I evaluate it, I don't seem to get the right answer. Can somebody help clear this out for me?
 A: Starting with the function
$$f(x)=\left\{\begin{array}{}e^{i\omega x}\qquad\text{for }-\tfrac {\pi}2<x<\tfrac {\pi}2\\\\0\qquad\quad\text{otherwise}\end{array}\right.$$
Its Fourier Transform is 
$$\begin{align*}
F(\alpha) = \mathscr{F}(f(x)) & =\int\limits_{-\infty}^{\infty}f(x)e^{-i\alpha x}dx \\
& =\int\limits_{-\pi/2}^{\pi/2}e^{i\omega x}e^{-i\alpha x}dx\\
& =\int\limits_{-\pi/2}^{\pi/2}e^{-i(\alpha - \omega)x}dx\\
& =\int\limits_{-\pi/2}^{\pi/2}\cos\left[(\alpha - \omega)x\right]dx - \int\limits_{-\pi/2}^{\pi/2}i\sin\left[(\alpha - \omega)x\right]dx\\
& =\int\limits_{-\pi/2}^{\pi/2}\cos\left[(\alpha - \omega)x\right]dx - 0\\
& =\frac {\sin\left[(\alpha-\omega)x\right]}{\alpha-\omega}\,\Biggr\rvert_{-\pi/2}^{\pi/2}\\
F(\alpha) &=\frac {2\sin\left[(\alpha-\omega)\dfrac{\pi}{2}\right]}{\alpha-\omega}\
\end{align*}$$
Notice, that since $i\sin\left[(\alpha-\omega)x\right]$ is an odd function, its integral, with bounds symmetric about $0$, is $0$.
So now taking your integral $I$ and working with it a bit:
$$\begin{align*}I & =\frac 1{2^v}\sum\limits_{n=0}^{v-1}\binom {v-1}n\int\limits_{-\pi/2}^{\pi/2} e^{xi(2n-v+1)}\cos ax\,dx\\
& =\frac 1{2^v}\sum\limits_{n=0}^{v-1}\binom {v-1}n\,\dfrac{1}{2}\int\limits_{-\pi/2}^{\pi/2} e^{xi(2n-v+1)}\left(e^{iax}+e^{-iax}\right)\,dx\\
& =\frac 1{2^v}\sum\limits_{n=0}^{v-1}\binom {v-1}n\,\dfrac{1}{2}\left[\int\limits_{-\pi/2}^{\pi/2} e^{xi(2n-v+1)}e^{-i(-a)x}\,dx + \int\limits_{-\pi/2}^{\pi/2} e^{xi(2n-v+1)}e^{-iax}\,dx\right]\\
& =\frac 1{2^v}\sum\limits_{n=0}^{v-1}\binom {v-1}n\,\dfrac{1}{2}\left[\int\limits_{-\pi/2}^{\pi/2} e^{-i(-a-2n+v-1)x}\,dx + \int\limits_{-\pi/2}^{\pi/2} e^{-i(a-2n+v-1)x}\,dx\right]\\
& =\frac 1{2^v}\sum\limits_{n=0}^{v-1}\binom {v-1}n \left(\frac {\sin\left[(-a-2n+v-1)\dfrac{\pi}{2}\right]}{-a-2n+v-1}+\frac {\sin\left[(a-2n+v-1)\dfrac{\pi}{2}\right]}{a-2n+v-1}\right)\\
\end{align*}$$
In the above, I used the result from the Fourier Transform derivation to skip to the end result.
