Sorry, I'm really confused on this one.... My math physics class is having us evaluate closed contours, where the contour is on the real line and at the infinities we turn towards the upper half of the space (i.e. for $z=a+ib$ we have $b>0$), anyway, the semicircle is essentially in the upper half of the plane. And we are trying to evaluate this integral... I don't really understand this concept (i'm a mathematician in a classroom of physicists, so I'm really frustrated as they seem to have no rigor)

Second issue, there seems to be contour integrals that are evaluated on poles and then the professor seems to "bypass singular points" and this is done by getting arbitrarily close to the pole and then integrating radially around it (but why integrate clockwise or counterclockwise around this point?).... why? It seems that the professor always chooses one direction arbitrarily and evaluates! I don't know what's going on, I've just read an entire book on complex analysis (M W Wong) and he never seems to cover this topic. Any general suggestions?

-
if you bypass a singularity it doesn't seem to be the same integral? – Squirtle Sep 7 '12 at 2:25
this is pretty open-ended – Jonathan Sep 7 '12 at 2:37
Are you sure? Any book on complex analysis certainly covers contour integrals.. – Euler....IS_ALIVE Sep 7 '12 at 2:50
Well, there're lots of complex analysis books. Go into your maths library and begin diving into the section of complex analysis searching for books with real integration with the help of complex integration. Some authors that is worth checking are Ahlfors, Ullrich, Freitag (I love this one!), Remmert, Silverman... – DonAntonio Sep 7 '12 at 2:54
Perhaps it would help if you provided a concrete example. From what you have given, it sounds as if there is some confusion about contour integration (either on the professor's part or yours). Both answerers are trying to help, but the question is a bit vague; it is hard to tell exactly what the professor is doing. I have never seen the book you mention, so I don't know how well it covers contour integration. – robjohn Sep 7 '12 at 9:26

It sounds as if the professor is talking about contour integration. If complex analysis is a prerequisite for this course, then that is most likely what it is.

An example of an integral with a real singularity and a removable singularity is the principal value integral $$\mathrm{PV}\int_{-\infty}^\infty\frac{e^{ix}}{x}\mathrm{d}x =\lim_{R\to\infty}\left(\int_{-R}^{-1/R}\frac{e^{ix}}{x}\mathrm{d}x+\int_{1/R}^{R}\frac{e^{ix}}{x}\mathrm{d}x\right)\tag{1}$$ Since $e^{ix}=\cos(x)+i\sin(x)$, $(1)$ covers a principal value integral with a real singularity and an integral with a removable singularity: $$\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)}{x}\mathrm{d}x\qquad\text{and}\qquad\int_{-\infty}^\infty\frac{\sin(x)}{x}\mathrm{d}x\tag{2}$$ The integral on the left hand side of $(1)$ can be handled with the following contour:

$\hspace{3.2cm}$

The integral in $(1)$ equals the integral of $\dfrac{e^{iz}}{z}$ over the two red pieces of the contour above as the large curve (radius $R$) gets larger and the small curve (radius $1/R$) gets smaller. To use contour integration, we close the contour with the two circular curves.

Since there is no singularity of inside the contour, the integral over the entire contour is $0$.

The integral over the large curve where $y<\sqrt{R}$ tends to $0$ since the absolute value of the integrand is $\le1/R$ over two pieces of the contour whose length is essentially $\sqrt{R}$. The integral over the large curve where $y\ge\sqrt{R}$ also tends to $0$ since the absolute value of the integral is less than $e^{-\sqrt{R}}/R$ over a contour whose length is less than $\pi R$. Thus, the integral over the large curve tends to $0$.

Near the origin, we have $$\frac{e^{iz}}{z}=\frac1z+i-\frac{z}{2}-i\frac{z^2}{6}+\dots\tag{3}$$ Aside from $\frac1z$, the series in $(3)$ is bounded and so its integral over the small curve tends to $0$ since the length of the curve is $\pi/R$. The integral of $\frac1z$ over a counter-clockwise circular arc centered at the origin is $i$ times the angle of the arc. Thus, the integral over the small curve is $-\pi i$ (clockwise circular arc with angle $\pi$).

Since the integral over the entire contour is $0$ and the integral over the two curves tends to a total of $-\pi i$, the integral over the two red pieces must tend to $\pi i$. Taking real and imaginary parts yields $$\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)}{x}\mathrm{d}x=0\qquad\text{and}\qquad\int_{-\infty}^\infty\frac{\sin(x)}{x}\mathrm{d}x=\pi\tag{4}$$ Alternatively, we can also use the following contour:

$\hspace{3.2cm}$

Everything is as above except that the contour contains the singularity at $0$ and the small circular curve is counter-clockwise.

The integral over the entire contour is $2\pi i$ since the residue of the singularity is $1$.

The integral over the large curve tends to $0$ as above.

The integral over the small curve is $\pi i$ (counter-clockwise circular arc with angle $\pi$).

Therefore, the integral over the two red pieces must again tend to $\pi i$.

Thus, the integral can be handled circling the singularity either way.

Perhaps something like this is what is going on in class.

-
I think you are being very rude to the people that are taking time to answer your question. If you are the mathematician that knows what you say you do then you should understand how to answer your own question. This is why people are responding by telling you what contour integration is. If you even read this particular answer properly you will see that he answers your question. He evaluates a countour integral very similar to the one you have but circles the singularity both ways and shows that it doesn't matter. – fretty Sep 7 '12 at 9:30
@fretty: to be fair, I added everything past the first paragraph after the comment. – robjohn Sep 7 '12 at 9:33
Ah right, I didn't know this. However this still does not excuse the ignorance and rudeness of the OP. – fretty Sep 7 '12 at 9:34
Why is this from afar very nice and detailed looking answer downvoted? Does it contain any mistakes or wrong things I dont see ...? – Dilaton Sep 7 '12 at 11:07
@Dilaton: it was downvoted when only the first paragraph had been written and accidentally posted before the rest. – robjohn Sep 7 '12 at 11:19

The method of integration like this is rigorous if you understand what's going on. For example, the infinite semicircle integration you're talking about comes from parametrizing the family of semicircles by radius, then take the limit as radius goes to infinity. Most of the time the integral on the semicircle part converges to zero as radius goes to infinity.

Avoiding singularities is valid because as long as you don't have a singularity inside your curve, you can deform the curve however you want and the integral will not change. Having a branch cut might be a bit more tricky as it requires you to think about continuity of your variable as you progress along the contour. Anyway, all concepts are well justified, rigorously. Wikipedia page on contour integration is actually pretty good.

P.S. I find it surprising that a complex analysis book does not cover this. According to Amazon, the table of contents of the said book looks like it covers contour integration, but I have no idea how much is covered. (The price is so high for a book with 160 pages!)

-
@dustanalysis Please, save useless words and write down an explicit example. We can't be in your head, and after reading your rude comments I would not like to be in your head at all :-) Calm down and write some mathematical example you do not understand. – Siminore Sep 7 '12 at 9:41