An exercise in a textbook says to evaluate $\displaystyle \int_{\frac{-\pi}{2}}^{\frac{\pi}{2}} \cos (ax) \cos^{b} (x) \ d x \ (a > b > -1)$ by letting $\displaystyle f(z) = z^{a-1} (z+z^{-1})^{b}$ and integrating along a contour that consists of a straight line joining the points $i$ and $-i$ and the right half of the semi-ciricle $|z|=1$.
But it also says that the contour should be indented at the points $0, i$, and $-i$.
The indentations at $i$ and $-i$ suggest that there are two branch cuts along the imaginary axis. Could someone explain to me exactly what's going on?
EDIT:
$ \displaystyle \Big|\int_{C_{i}}f(z)\ dz\Big|\le\int_{0}^{-\frac{\pi}{2}}\Big|\big(i+re^{it}\big)^{a-1}\big(i+re^{it}+(i+re^{it})^{-1}\big)^{b}\ ire^{it}dt\Big| $
$ \displaystyle =\int_{0}^{-\frac{\pi}{2}}\Big|i+re^{it}\Big|^{a-1}\Big|i+re^{it}+(i+re^{it})^{-1}\Big|^{b}\ r\ dt $
$ \displaystyle =\int_{0}^{-\frac{\pi}{2}}\Big|i+re^{it}\Big|^{a-1}\Big|2re^{it}+O(r^{2})\Big|^{b}\ r\ dt $
$ \displaystyle \approx\int^{-\frac{\pi}{2}}_{0}2^{b}r^{b+1}\ dt $ for small $r$
$ \displaystyle = \pi \ 2^{b-1} r^{b+1}$ (I removed the negative sign)
Therefore $\displaystyle \lim_{r \to 0}\Big|\int_{C_{i}}f(z)\ dz\Big| \le 0$ (since $b > -1$) $ \displaystyle\implies \lim_{r \to 0} \int_{C_{i}} f(z)\ dz = 0$

