Prove that the functions $f_n(x) = \frac{(x-i)^n}{\sqrt{\pi}(x+i)^{n+1}}$ are orthonormal using the residue theorem Note: edited a mistake in parametrizing the integral!
Question: Let the complex valued function $f_n$, $n\in Z$, be defined on $R$ by: 
$$f_n(x) = \frac{(x-i)^n}{\sqrt{\pi}(x+i)^{n+1}}.$$ 
Prove that these functions are orthonormal; that is,
$$\int_{-\infty}^\infty f_m(x)\overline{f_n(x)}dx = \delta_{nm}.$$
My attempt: So, I think I have most of this problem, but I'm struggling to come up with a rigorous justification of one of the steps. Here is what I have so far:
The case where $n=m$ is straightforward: we then have
$$f_m(x)\overline{f_n(x)} = \frac{1}{\pi(x^2+1)},$$
and thus
$$\int_{-\infty}^\infty f_m(x)\overline{f_n(x)}dx = \frac{1}{\pi}\arctan(x)|_{-\infty}^\infty = 1.$$
Next, we assume that $m < n$. Then,
$$f_m(x)\overline{f_n(x)} = \frac{1}{x^2+1}\frac{(x+i)^{n-m}}{\pi(x-i)^{n-m}}.$$
Consider the contour $\gamma_R = C_R \cup [-R,R]$, where $C_R$ is the semi-circle of positive orientation in the upper half plane with radius $R$. Now, by the residue theorem (I'm being lazy and not writing out the steps, but I swear it works out!), for large enough $R$, since the function has a pole at $i$, we have:
$$\int_{\gamma_R}\frac{(z+i)^{(n-m)-1}}{\pi(z-i)^{(n-m)+1}}dz = 0,$$
so if we can show that 
$$\lim_{R\to\infty}\int_{C_R}\frac{(z+i)^{(n-m)-1}}{\pi(z-i)^{(n-m)+1}}dz = 0,$$
we will be done. So, this is the part that I always struggle with on these integrals. I parametrized the integral as:
$$\int_{0}^\pi\frac{(Re^{i\theta}+i)^{(n-m)-1}}{\pi(Re^{i\theta}-i)^{(n-m)+1}}iRe^{i\theta}d\theta,$$
and I've been trying to use the basic absolute value/length inequality to write:
$$\int_{0}^\pi\frac{(Re^{i\theta}+i)^{(n-m)-1}}{\pi(Re^{i\theta}-i)^{(n-m)+1}}iRe^{i\theta}d\theta\le R \cdot \sup_{z \in C_R} \left|\frac{1}{(Re^{i\theta}+1)^2} \right|\frac{|Re^{i\theta}+1|^{n-m}}{|Re^{i\theta}-1|^{n-m}}\cdot |Re^{i\theta}|$$
But I can't seem to get anywhere from here. 
Normally I ask for just hints, but because I am so very bad at this, I'm hoping that someone would be willing to walk through a super rigorous method for showing this in baby steps. I can kindof see generally why it would work, since the denominator has a lower degree than the numerator, but I would really like to understand a step-by-step version. Thanks!
 A: The inequality you wrote at the end, namely

$$\int_{0}^\pi\frac{(Re^{i\theta}+i)^{(n-m)-1}}{\pi(Re^{i\theta}-i)^{(n-m)+1}}iRe^{i\theta}d\theta\le R \cdot \sup_{z \in C_R} \left|\frac{1}{(Re^{i\theta}+1)^2} \right|\frac{|Re^{i\theta}+1|^{n-m}}{|Re^{i\theta}-1|^{n-m}}\cdot |Re^{i\theta}|$$

does not make sense because the left hand side is not a real number. 
Note that for all $z\in C_R$, $\lvert (z + i)/(z - i)\rvert \le (R + 1)/(R - 1)$. Indeed, the triangle inequality gives $\lvert z + i\rvert \le \lvert z\rvert + 1 = R + 1$ and $\lvert z - i\rvert \ge \lvert z\rvert - 1 = R - 1$, whence $\lvert(z + i)/(z - i)\rvert \le (R + 1)/(R - 1)$ on $C_R$. Futhermore, for $\lvert z\rvert = R$, $\lvert (z + i)^{-1}/(z - i)\rvert = 1/\lvert z^2 + 1\rvert \le 1/(R^2 - 1)$. Therefore, on $C_R$,
$$\left\lvert \frac{(z + i)^{n-m-1}}{(z - i)^{n-m+1}}\right\rvert = \left\lvert \frac{(z+i)^{-1}}{z + i}\right\rvert \left\lvert \frac{(z + i)^{n-m}}{(z - i)^{n-m}}\right\rvert \le \frac{1}{R^2 - 1}\left(\frac{R+1}{R-1}\right)^{n-m}$$
Since the arclength of $C_R$ is $\pi R$, by the ML-estimate the integral along $C_R$ is bounded by $$\frac{R}{R^2 - 1}\left(\frac{R+1}{R-1}\right)^{n-m}$$ which is negligible as $R\to \infty$.
