# Calculate $\int_{\pi\over 2}^{{\pi\over2}+i} \cos2 z dz$

Calculate $$\int_{\pi\over 2}^{{\pi\over2}+i} \cos 2z dz$$.

Because $$\cos 2z$$ is analytic everywhere, we just need to calculate the integral:
$$\int_{\pi\over 2}^{{\pi\over2}+i} \cos 2z dz \\ =[u=2z,{1\over 2}du=dz] \\={1\over2}\int_\pi^{\pi+2i}\cos udu={1\over 2}\sin u|_\pi^{\pi+2i} \\ ={1\over 2}(\sin (\pi+2i)-\sin\pi)$$
Your answer can be simplified. What is $$\sin \pi$$? What happens if you expand $$\sin(\pi+2i)$$ using the addition formulae? Note that $$\sin(2i)$$ may be evaluated by recalling the exponential definition of sine $$\sin(z)=\frac1{2i}(e^{iz}-e^{-iz})$$Having said that, I am not sure your answer is exactly correct. If you are asked to compute this contour integral, you need a factor of $$i$$ somewhere for the fact that your contour is vertical. The best way to do this is to remove any complex dependence from your limits. In this example, this is done with the substitution $$z=\frac\pi2+iu$$.