I am just begining with complex integration. Please help with this. Evaluate $\int_{-i\pi}^{i\pi}\cos z dz$ where $z$ is a complex number.
This is my effort, I know that $\int_{C}{f(z)dz} = \int_a^b f(z(t))z'(t)dt$ where C:[a,b] is a complex curve and $a \leq t \leq b$
Step one would be to determine z(t) from the path of integration and this is the toughest part for me.
Once I have obtaine z(t) I hope the rest would be easy
$f(z) = \cos(z)$ is the derivative of $F(z) = \sin(z)$. Therefore, for any path $C$ joining $a=-i\pi$ and $b= i\pi$ is $$ \int_{C}{f(z)dz} = \int_a^b f(z(t))z'(t)dt = \int_a^b \frac{d}{dt}(F(z(t)) \, dt = F(b) - F(a) \\ = \sin(i\pi) - \sin(-i \pi) = 2 \sin(i\pi)\, . $$
Generally, $\int_{C}{f(z)dz}$ depends only on the endpoints of $C$ if $C$ is a path in a simply-connected domain $D$ where $f$ is holomorphic, that is the contents of Cauchy's integral theorem.