# Improper integral using residues

1. Mar 27, 2010

### cscott

1. The problem statement, all variables and given/known data

integral of sech(x) from -Inf to Inf using residues.

2. Relevant equations

Calculate using: (2 Pi I) * Res[sech(x), "poles in upper half plane"]

3. The attempt at a solution

I used sech(x) = 2/[exp(x)+exp(-x)] to find a simple pole at z = (I Pi)/2 with a residue of -I. Then,

Result = (2 Pi I)(-I) = 2 Pi

As far as I know the answer should be Pi so I'm off by a factor of two. I can't find the mistake in finding the residue. Can anyone verify that the residue should be -I/2?

Let f(z)=g(z)/h(z), then residue of a simple pole z0 is g(z0)/h'(z0), no? (Assuming g(z0) != 0, h(z0)=0)

Thanks.

2. Mar 27, 2010

### Dick

I can tell you what's wrong. i*pi/2 isn't the only pole in the upper half plane. i*3*pi/2, i*5*pi/2 ... are also poles. There's an infinite number. You need to make a more clever choice of contour.

Last edited: Mar 27, 2010
3. Mar 27, 2010

### cscott

Ah you are right :( I approached this too quickly.

My hint from the prof is 'convert the integrand to a rational function by changing variables'

Either way I'm not sure exactly how to proceed now.

4. Mar 27, 2010

### Dick

Well, your professor gave you one suggestion, and I gave you another. I think they both will work. Pick one and try it. Here's a hint for my route. How are sech(x) and sech(x+i*pi) related?

5. Mar 28, 2010

### cscott

So if I take a rectangle with height $\pi$ I'd enclose one pole at $i\pi/2$. Something tells me the two side integrals should go to zero as rectangle width->inf and I'll get a multiple of my integral on the upper part.

So in this case $sech(z) = -sech(z + i\pi)$ and because of the opposite integration directions I'll get double my desired integral, which is why I have $2\pi$ in my OP instead of $pi$?

Last edited: Mar 28, 2010
6. Mar 28, 2010

### Dick

That's basically it. You mean a rectangle with height pi, right?

7. Mar 28, 2010

### cscott

Yes, I meant Pi, sorry.

Thanks for your help.