Doubt over evaluation of integral of the form $\int_{-\infty}^{\infty}f(x) dx$ by using Cauchy residue theorem To evaluate an integral of the form $\int_{-\infty}^{\infty}f(x) dx$, where the rational function $f(x) =p(x)/q(x)$ is continuous on $(−∞, ∞)$, by residue theory we replace $x$ by the complex variable $z$ and integrate the complex function $f$ over a closed contour $C$ that consists of the interval $[−R, R]$ on the real axis and a semicircle $C_R$ of radius large enough to enclose all the poles of $ f(z) = p(z)/q(z)$ in the upper half-plane $Im(z) > 0$.
Doubt: I am confused why we consider semicircle $C_R$ in the upper half-plane $Im(z) > 0$ only. What would happen if instead of taking semicircle $C_R$ in the upper half plane we take in lower half plane $Im(z) < 0$? Similarly, why we can't consider full circle instead of considering semicircles. 

I would be really grateful to you for your help. 
 A: The real line from $[-R,R]$ plus the semicircle $|z| = R$ creates a closed contour.
The evaluation of the integral over the closed contour can be evaluated at the enclosed poles.
As R gets to be big enough, every pole on the plane above the real line is enclosed inside the contour.  
You hope (and must demonstrate) that as $R$ gets to be big enough the path integral over the semi-circle goes to $0.$
That would then mean that the integral along the real line equals the integral of the closed contour equals the evaluation of the residues.
If you wanted to, could you enclose the poles below the real line?  Yes, you could.  However, you are now traversing the contour in a clockwise direction.  And that is going to flip the sign of the result.
Doing the full circle... in the example given, how does that create a closed contour with the real line?
You will get there.  When you integrate from $0$ to $\infty$, but I don't want to spoil the surprise.  (or explain in detail how to define the contours.)
