# Complex Integral Trigonometric Substitution

1. Oct 6, 2014

### KleZMeR

I'm solving two different definite integrals of functions

$\frac{sin(z)}{z}$ and $\frac{cos(z)}{e^z+e^{-z}}$

with complex analysis and the residue theorem, and in the solutions they replace both

$sin(z)$ and $cos(z)$ with $e^{iz}$

why is this possible?

2. Oct 6, 2014

### mathman

sin(z) = (e^{iz}-e^{-iz})/2i, cos(z) = (e^{iz}+e^{-iz})/2

3. Oct 6, 2014

### KleZMeR

Thanks Mathman, but I know of these identities. I was not asking about replacing trig with polar form. Because of the nature of the Residue Theorem and the geometry of the problem, for some reason I think they have decomposed the regions because of the singularity at z=0, and as a result the integral changes to a single term as stated above.

4. Oct 6, 2014

### FactChecker

Take a close look at the paths of the integrals. On the real line, eir = cos(r) + i*sin(r). So if you know the total integral along the closed path and the values of the integrals off of the real line, you can determine the integral on the integral path part on the real line. Then you can pull off the real and imaginary parts to get the integrals of the cos and sin, respectively.