# Contour Integral problem

1. Jun 11, 2007

### ijustlost

I'm trying to find

$$\int_{-\infty}^{\infty} \frac{exp(ax)}{cosh(x)} dx$$

where 0<a<1 and x is taken to be real. I'm doing this by contour integration using a contour with corners +- R, +- R + i(pi), and I'm getting an imaginary answer which is

$$\frac{2i\pi}{sin (a \pi)}$$.

I'm thinking this is a problem because my original integral was completely real. Can I just take the real part of my answer, and say the integral = 0 ? That doesn't seem to make any sense, I've drawn a graph of the function and it doesn't look like it's integral should be zero! I'm fairly sure my answer to the contour integral is correct!

Last edited: Jun 11, 2007
2. Jun 11, 2007

### ijustlost

P.s - is there a guide to using tex on physics forums somewhere? Then I could format the above properly!

3. Jun 11, 2007

### malawi_glenn

Math & Science Tutorials --> Introducing LaTeX Math Typesetting

4. Jun 11, 2007

### ijustlost

Ah thanks, I knew there was one somewhere!

5. Jun 11, 2007

### ijustlost

Oops, stupid me! The answer is

$$\frac{\pi}{cos(\frac{a\pi}{2})}$$

I didn't work out the phase shift the function takes on along the top line of the path properly!