Complex Integration and trigonometric functions 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
 A: $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.
A: Thank you guys just figured it out
From
$\int_{C} f(z)dz = \int_a^b f(z(t))z'(t)dt$
But
$z(t) = p + t(q - p)$ for $t \in [0,1]$
In our case
$p = -i\Pi$ and $q = i\Pi$
Then
$z(t) = -i\Pi + t(i\Pi + i\Pi)$
$z(t) = i\Pi (2t - 1)$
and
$z'(t) = 2i\Pi$
Also
$f(z(t)) = cos(i\Pi (2t - 1))$
Therefore
$\int_{-i\Pi}^{i\Pi} coszdz = \int_0^1 cos(i\Pi(2t - 1)) 2i\Pi dt$
$= 2i\Pi \int_0^1 cos(i\Pi(2t - 1)) dt$
Let $w = i\Pi(2t - 1)$
then
$dt = \frac{dw}{2i\Pi}$
$= \int_0^1 coswdw$
$= sinw$ from 0 to 1
$= sin(i\Pi(2t - 1))$ from 0 to 1
$= sin(i\Pi) - sin(-i\Pi)$
Therefore
$\int_{-i\Pi}^{i\Pi} coszdz = 2sin(i\Pi)$
