Conditions for Applying Residual Theorem I'm trying to prove that for $\int _{-\infty} ^\infty \frac{1}{1 + z^2} dz $  the residual theorem is applicable. 
In order to do this I have to show that for upper arc path $C_R$ the integral $\int _{C_R}  \frac{1}{1 + z^2} dz \to 0$ for $ R \to \infty$.
If we parametrize $z= R e^{i\phi}$ I found following estimation:
$$\int _{C_R}  \frac{1}{1 + z^2} dz = \int _0 ^{\pi}  \frac{iRe^{i\phi}}{R^2e^{2i\phi}} d\phi = \frac{i}{R}\int _0 ^{\pi}  \frac{1}{e^{i\phi}} d\phi \to 0$$
for $ R \to \infty$.
But the step $\int _{C_R}  \frac{1}{1 + z^2} dz = \int _0 ^{\pi}  \frac{iRe^{i\phi}}{R^2e^{2i\phi}} d\phi $ isn't clear to me. Can anybody explain it?
 A: There is an error there somewhere. By definition of line integral, given $\gamma\colon[a,b]\longrightarrow\mathbb C$,$$\int_\gamma f(z)\,\mathrm dz=\int_a^bf\bigl(\gamma(t)\bigr)\gamma'(t)\,\mathrm dt.$$So, in fact, in your specific case:$$\int_{C_R}\frac{\mathrm dz}{1+z^2}=\int_0^\pi\frac{\gamma'(\theta)}{1+\gamma^2(\theta)^2}\,\mathrm d\theta=\int_0^\pi\frac{iRe^{i\theta}}{1+R^2e^{2i\theta}}\,\mathrm d\theta.$$
A: Substituting $z = Re^{i\phi}, dz = iRe^{i\phi}$ into $\int_c \frac {1}{1+z^2}\ dz$ gives $\int_0^\pi \frac {1}{1+(Re^{i\phi})^2} (iRe^{i\phi}\ d\phi) = \int_0^\pi \frac {iRe^{i\phi}}{1+R^2e^{2i\phi}}\ d\phi$
As R gets to be very large the $+1$ in the denominator becomes a triviality.
While $\lim_\limits {R\to \infty}\int_0^\pi \frac {iRe^{i\phi}}{1+R^2e^{2i\phi}}\ d\phi = \int_0^\pi\lim_\limits {R\to \infty} \frac {iRe^{i\phi}}{1+R^2e^{2i\phi}}\ d\phi$ would be more rigorous,
$\frac {iRe^{i\phi}}{1+R^2e^{2i\phi}} \approx \frac {iRe^{i\phi}}{R^2e^{2i\phi}}$ is sufficient.
A: Let $z=Re^{i\theta}$ which describes a circle of radius $R$ and we limit $\theta$ so it tends from zero to $\pi$. Therefore, the derivative with respect to $\theta$ gives $dz=Rie^{i\theta}\, d\theta$.$$\int\limits_{\Gamma_{R}}dz\,\frac 1{1+z^2}=\int\limits_0^{\pi}d\theta\,\frac {Rie^{i\theta}}{1+R^2e^{2i\theta}}\xrightarrow{\phantom{RR}}0$$

Another way is to use the estimation lemma or the ML inequality theorem.$$\left|\,\int\limits_{\Gamma_{R}}dz\, f(z)\,\right|\leq ML$$Where $M$ is an upper bound of $f(z)$ and $L$ is the length of the contour we're integrating about. Note that the contour can be either open or closed and our function has to be piecewise continuous.
The semi-circle contour can be described as $|z|=R$, defined in the upper-half of the complex plane. The length of the arc is simply$$L=r\theta=\pi R$$While $M$ can be found using the triangle inequality. Squaring the magnitude of $z$ gives$$|z|^2=|z^2|=|z^2+1-1|\leq |z^2+1|+1$$Taking the reciprocal of both sides after subtracting one gives$$\left|\,\frac 1{z^2+1}\,\right|\leq\frac 1{R^2-1}$$Hence$$\left|\,\int\limits_{\Gamma_{R}}dz\, f(z)\,\right|\leq\frac {\pi R}{R^2-1}\xrightarrow{\phantom{RR}}0$$
