I was doing problems on complex integration and got stuck at one question. The question is
$$ \int_{\gamma}{{\rm e}^{{\rm i}\pi z}\left(z + i\right)^{2}\cos\left(nz\right) \over z^{2} - 1}\,{\rm d}z $$
where $\gamma= \left\{z: \left\vert\,z\,\right\vert=2\cos\left(\theta\right)\,, -\pi/2 \leq \theta \leq \pi/2\right\}$.
I am not getting any thought in which way to consider $\gamma$ in this question. Any hint will be sufficient for me. thanks a lot for help.
Hint: Notice that $$ 2\cos(\theta)(\cos(\theta),\sin(\theta))=(\cos(2\theta)+1,\sin(2\theta)) $$ is a circle of radius $1$ around $(1,0)$.