# Improper integral using residues

## Homework Statement

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

## Homework Equations

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

## 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.

Related Calculus and Beyond Homework Help News on Phys.org
Dick
Homework Helper
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:
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.
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.

Dick
Homework Helper
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.
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?

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:
Dick
Homework Helper
So if I take a rectangle with height 1 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$?
That's basically it. You mean a rectangle with height pi, right?

Yes, I meant Pi, sorry.