# Solving an integral by calculating residues

• August 3rd 2010, 11:16 AM
arbolis
Solving an integral by calculating residues
The integral is $I=\int _0 ^{+\infty} \frac{dx}{x^2+b^2}$ with $b>0$.
Attempt: Let $f(z)=\frac{1}{z^2+b^2}$. The poles of $f$ are at $z_1=ib$ and $z_2=-ib$.
As a contour, I'm tempted to choose a circle with radius R and let it tend to infinity so that the enclosed region is the whole complex plane (there's only 2 residues so it shouldn't be that hard).
$I=\lim _{R \to \infty} \int _0 ^R \frac{dz}{z^2+b^2} = \lim _{R \to \infty} \int _ 0 ^R \frac{dz}{(z-ib)(z+ib)}=2 \pi i \sum _{m=1}^2 Res (f,z_m)$.
My problem is that $Res (f,ib)= \lim _{z \to ib} \frac{z}{z^2+b^2}=\frac{-i}{2b}$. Similarly, $Res (f,-ib)=\frac{i}{2b}$ and therefore the integral is worth 0, which is untrue. Where did I go wrong?
• August 3rd 2010, 11:21 AM
Ackbeet
You can't choose that contour, because the path of the integral you're interested in doesn't show up in the contour you've chosen. You're going to need another semicircle, I think. This will only enclose one of the poles, and hence the residues won't cancel out (since you'd only be computing one of them). Does that make sense?
• August 3rd 2010, 11:27 AM
arbolis
You're right. I think I'm understanding the idea little by little.
The thing is, if I can choose any closed contour enclosing both poles, the integral would be worth 0.
So if I choose $\lim _{R \to \infty} \oint _{|z|=R} \frac{dz}{z^2+b^2}$, would it be worth 0? What does it tell us about the value of the real integral?
• August 3rd 2010, 11:28 AM
chiph588@
Choose the semicircle with radius $R$ and base on the real axis as your contour.

Let $\displaystyle{I=[-R,R]}$ and $\displaystyle{C}$ be the half circle.

$\displaystyle{\left|\int_C \frac{1}{z^2+b^2}dz\right|\leq\pi\cdot\frac{1}{R^2-b^2}\to0}$ as $\displaystyle{R\to\infty}$ (note we assume $\displaystyle{R>b}$).

Thus $\displaystyle{\int_{-\infty}^\infty \frac{1}{z^2+b^2}dz = \lim_{R\to\infty}\int_I \frac{1}{z^2+b^2}dz = 2\pi i\text{Res}_{z=ib}\left(\frac{1}{z^2+b^2}\right) = 2\pi i\cdot\left(-\frac{i}{2b}\right) = \frac{\pi}{b}}$.

Therefore $\displaystyle{\int_0^\infty \frac{1}{x^2+b^2}dx = \frac{\pi}{2b}}$.
• August 3rd 2010, 11:33 AM
Ackbeet
That limit would, I fear, tell you nothing about the value of the integral in which you're interested, for the reasons I've mentioned above. Try the contour I mentioned above.
• August 3rd 2010, 11:42 AM
arbolis
Quote:

Originally Posted by chiph588@
Choose the semicircle with radius $R$ and base on the real axis as your contour.

Let $\displaystyle{I=[-R,R]}$ and $\displaystyle{C}$ be the semicircle.

I've no problem with that, although I don't know why choosing a full circle is a bad idea.
Quote:

$\displaystyle{\left|\int_C \frac{1}{z^2+b^2}dz\right|\leq\pi\cdot\frac{1}{R^2 }\to0}$ as $\displaystyle{R\to\infty}$ (note we assume $\displaystyle{R>b}$).
The purpose of this is not clear to me.

Quote:

Thus $\displaystyle{\int_{-\infty}^\infty \frac{1}{z^2+b^2}dz = \lim_{R\to\infty}\int_I \frac{1}{z^2+b^2}dz = 2\pi i\text{Res}_{z=ib}\left(\frac{1}{z^2+b^2}\right) = 2\pi i\cdot\left(-\frac{i}{2b}\right) = \frac{\pi}{b}}$.

Therefore $\displaystyle{\int_0^\infty \frac{1}{x^2+b^2}dx = \frac{\pi}{2b}}$.

So if I were to choose a full circle, since it encloses the whole real axis, in fact I'd calculate $\int _{-\infty}^{+\infty} \frac{dz}{x^2+b^2}$?
And I don't understand then why if I choose a semi circle I get the correct result, namely $\frac{\pi}{2b}$ while if I choose any contour enclosing both poles I'd get 0 instead.
• August 3rd 2010, 11:46 AM
arbolis
Quote:

Originally Posted by Ackbeet
That limit would, I fear, tell you nothing about the value of the integral in which you're interested, for the reasons I've mentioned above. Try the contour I mentioned above.

Oh... do you mean that the path of the contour has to pass by the real axis? I didn't know that. I thought that as long as the real axis is enclosed into the contour then there's no problem but it seems I'm wrong. Good to know!
Also what happens if there's a pole on the real axis and that the limits of the integral they ask for are $-\infty$ and $+\infty$?
• August 3rd 2010, 11:47 AM
chiph588@
Quote:

Originally Posted by arbolis
So if I were to choose a full circle, since it encloses the whole real axis, in fact I'd calculate $\int _{-\infty}^{+\infty} \frac{dz}{x^2+b^2}$?
And I don't understand then why if I choose a semi circle I get the correct result, namely $\frac{\pi}{2b}$ while if I choose any contour enclosing both poles I'd get 0 instead.

If you chose the whole circle, you would never get the interval you're after in your integral. The reason for choosing the semicircle is so the interval $\displaystyle{(-\infty,\infty)}$ will be there once $\displaystyle{R\to\infty}$.
• August 3rd 2010, 11:48 AM
chiph588@
Quote:

Originally Posted by arbolis
Oh... do you mean that the path of the contour has to pass by the real axis? I didn't know that. I thought that as long as the real axis is enclosed into the contour then there's no problem but it seems I'm wrong. Good to know!
Also what happens if there's a pole on the real axis and that the limits of the integral they ask for are $-\infty$ and $+\infty$?

If there's a pole on the real axis, you must have a small semicircle go around it. Then let the radius of said semicircle go to zero at the end.
• August 3rd 2010, 11:48 AM
Ackbeet
The path that you're interested in, in this case from 0 to infinity along the positive real axis, has to be part of the contour you choose. You must traverse that exact path, or whatever integral you do calculate will have nothing whatever to do with your original integral.

If you have a pole on the real axis, you have to "skirt" it. You'll go to within epsilon of the pole, do a semi-circle around the pole, and then continue on. You can't have an actual pole in your contour.
• August 3rd 2010, 01:16 PM
arbolis
Thanks guys, it's somehow clearer for me now. I'll practice some more (my final exam is on Thursday).
Another question: in post #4, why did you bound the absolute value of the integral? Hmm did you actually show that the line integral with contour C is worth 0 so that it remains only the diameter of the semi circle as contour? So that you've spit the contour into 2: the semi circle+diameter?
• August 3rd 2010, 01:21 PM
chiph588@
Quote:

Originally Posted by arbolis
Thanks guys, it's somehow clearer for me now. I'll practice some more (my final exam is on Thursday).
Another question: in post #4, why did you bound the absolute value of the integral? Hmm did you actually show that the line integral with contour C is worth 0 so that it remains only the diameter of the semi circle as contour? So that you've spit the contour into 2: the semi circle+diameter?

So we know that the integral over the closed contour is $\displaystyle{\frac{\pi}{b}}$. Showing that the integral over the semicircle $\displaystyle{C}$ tends $\displaystyle{0}$ gives us

$\displaystyle{\frac{\pi}{b} = \lim_{R\to\infty}\int_C f(z)dz+\lim_{R\to\infty}\int_I f(z)dz = 0+\int_{-\infty}^\infty f(z)dz}$.