How to integrate $\int_1^{\infty}\frac{\sqrt{x-1}}{(1+x)^2}dx$ using contour integration? How to integrate  using contour integration?
$$\int_1^{\infty}\frac{\sqrt{x-1}}{(1+x)^2}dx$$
I was putting $y = x-1$ then $\frac{dy}{dx}$= $1-0$, ${dy}={dx} $   then i get $$\int_1^{\infty}\frac{\sqrt{y}}{(2+y)^2}dy$$
I don't know how to take it from here. I would appreciate if someone could help me and give me some hints or the solution. Thanks.
 A: I won't prefer a contour here, making the substitution $y=x-1$ we have,
$$ \displaystyle \int_1^\infty \dfrac{\sqrt{x-1}}{(1+x)^2}\; dx = \int_0^\infty \dfrac{\sqrt{y}}{(2+y)^2}\; dy$$
Next substitute $y=u^2$ , 
$$\displaystyle I = 2\int_0^\infty \dfrac{u^2}{(u^2+2)^2}\; du $$
Using partial fractions this will be equal to,
$$ \displaystyle \begin{align} I &= 2\int_0^\infty \dfrac{du}{u^2+2}-\int_0^\infty \dfrac{4\; du}{(u^2+2)^2} \\ &= \dfrac{\pi}{\sqrt{2}} - \dfrac{1}{\sqrt{2}}\int_0^{\pi/2}  (1+\cos 2\theta)\; d\theta \\ &=\dfrac{\pi}{\sqrt{2}}-\dfrac{\pi}{2\sqrt{2}} \\ &= \dfrac{\pi}{2\sqrt{2}} \end{align}$$
Footnotes :
1) $\displaystyle \int \dfrac{dx}{x^2+a^2} = \dfrac{1}{a} \tan^{-1}\dfrac{x}{a}$
If you integrate it then,
$\displaystyle \int_0^{+\infty} \dfrac{dx}{x^2+a^2} = \dfrac{1}{a}\times \dfrac{\pi}{2}$
2) $\displaystyle \int_0^{+\infty} \dfrac{4\; du}{(u^2+2)^2}$
We make the substitution $u=\sqrt{2}\tan \theta$ , this means $du=\sqrt{2}\sec^2 \theta d\theta$ .The new limits for $\theta$ would be according to 
$ \displaystyle \theta = \tan^{-1}\dfrac{u}{\sqrt{2}}$ .The new limits are thus from $0\to\dfrac{\pi}{2}$ since $\tan^{-1}\dfrac{+\infty}{\sqrt{2}}=\dfrac{\pi}{2}$ & $\tan^{-1}\dfrac{0}{\sqrt{2}}=0$ . The integral now reads :
$$\displaystyle \begin{align}\int_0^{+\infty} \dfrac{4\; du}{(u^2+2)^2} &= 4\int_0^{\pi/2} \dfrac{\sqrt{2}\sec^2 \theta}{(2(\tan^2 \theta+1))^2} \; d\theta \\ &= 4\sqrt{2}\int_0^{\pi/2} \dfrac{\sec^2 \theta}{4(\sec^2 \theta)^2}\; d\theta \\ &= \sqrt{2} \int_0^{\pi/2} \dfrac{\sec^2 \theta}{\sec^4 \theta} \; d\theta \\ &= \sqrt{2} \int_0^{\pi/2} \cos^2 \theta \; d\theta \\ &= \dfrac{\sqrt{2}}{2}\int_0^{\pi/2} 2\cos^2 \theta \; d\theta \\ &= \dfrac{1}{\sqrt{2}}\int_0^{\pi/2} (1+\cos 2\theta)\; d\theta \\ &= \dfrac{1}{\sqrt{2}} \int_0^{\pi/2} d\theta + \dfrac{1}{\sqrt{2}}\int_0^{\pi/2} \cos 2\theta \; d\theta \\ &= \dfrac{\pi}{2\sqrt{2}} - \dfrac{1}{2\sqrt{2}}\left[\sin 2\theta\right]_0^{\pi/2} \\ &= \dfrac{\pi}{2\sqrt{2}} - \dfrac{1}{2\sqrt{2}}(\sin \pi - \sin 0) \\ &= \dfrac{\pi}{2\sqrt{2}} \end{align} $$
A: Ok, you want to do complex? Let's do complex.
The complex function
$$ f(z) = \frac{z^{1/2}}{(2+z)^2} $$
Has a pole of order $2$ at $z = -2$ and a branch point at $z=0$. Let's pick a branch cut on the positive real line so it doesn't interfere with the pole.
We pick a keyhole-shaped contour (example here), consisting of two circles ${C_r}: |z| = r$ clockwise, ${C_R}: |z| = R$ counter-clockwise, and two lines above and below the branch cut $L^+, L^-: \operatorname{Re} (z) \in [r, R]$
Our contour integral looks something like this
$$ \int_C f(z) \ dz = \int_{-C_r} f(z) \ dz + \int_{r+i\epsilon}^{R+i\epsilon} f(z) \ dz + \int_{C_R} f(z) \ dz + \int_{R-i\epsilon}^{r-i\epsilon} f(z) \ dz $$
First, let's simplify the integral on the two lines. Observe that $z \to |z|e^{0i}$ above the branch cut and $z \to |z| e^{i2\pi}$ below the branch cut, therefore
$$ \lim_{\epsilon\to 0}f(x+i\epsilon) = \frac{|z|^{1/2}}{(2+z)^2} = \frac{\sqrt{x}}{(2+x)^2} = f(x) $$
$$ \lim_{\epsilon\to 0}f(x-i\epsilon) = \frac{|z|^{1/2}e^{i\pi}}{(2+z)^2} = \frac{-\sqrt{x}}{(2+x)^2} = -f(x) $$
Thus
$$ \int_{L^+} f(z) \ dz + \int_{L^-} f(z) \ dx = \int_r^R f(x) \ dx - \int_R^r f(x) \ dx = 2 \int_r^R f(x) \ dx $$
Notice that if we take the limits $r \to 0$ and $R\to \infty$, this becomes the integral we want to compute.

Now, we need to show that the integrals over both circles go to $0$.
For $C_R$ we can use the ML inequality
$$ \left|\int_{C_R}\! f(z) \ dz \ \right| \le \big|f(z)\big| |C_R| \le \frac{|z|^{1/2}}{|2+z|^2} 2\pi R \le \frac{2\pi R\sqrt{R}}{(R-2)^2} \to 0 $$
The last inequality follows from the triangle inequality
$$ \left|z - (-2)\right| \ge \big||z| - |-2|\big| = |R - 2| $$
For $C_r$, we can make the same arguments, noting that for small $|z|$
$$ \big|f(z)\big||C_r| \sim \frac{2\pi r\sqrt{r}}{2^2} \to 0 $$ 

Almost done. We've showed that
$$ \lim_\limits{r\to 0, \ R \to\infty}\int_C f(z) \ dz = 2\int_0^{\infty} f(x) \ dx $$
Just need to compute the LHS and we're home free. For this, just compute the residue
$$ \operatorname*{Res}_{z=-2} f(z) = \lim_{z\to -2} \frac{d}{dz} \left((z+2)^2f(z) \right) = \lim_{z\to -2} \frac{1}{2z^{1/2}} = \frac{1}{2\sqrt{2} i} $$
Now you've got all the pieces. The final answer is
$$ \int_0^{\infty} f(x) \ dx = \frac{1}{2}\int_C f(z) \ dz = \pi i \cdot \frac{1}{2\sqrt{2} i} = \color{blue}{\frac{\pi}{2\sqrt{2}}} $$
A: $$\begin{eqnarray*}\int_{1}^{+\infty}\frac{\sqrt{x-1}}{(x+1)^2}\,dx &\stackrel{x\mapsto z+1}{=}& \int_{0}^{+\infty}\frac{\sqrt{z}}{(2+z)^2}\,dz\stackrel{z\mapsto 2u}{=}\frac{1}{\sqrt{2}}\int_{0}^{+\infty}\frac{\sqrt{u}}{(1+u)^2}\,du\\&\stackrel{u\mapsto v^2}{=}&\frac{1}{\sqrt{2}}\int_{0}^{+\infty}\frac{2v}{(1+v^2)^2}\cdot v\,dv\\&\stackrel{\text{IBP}}{=}&\frac{1}{\sqrt{2}}\int_{0}^{+\infty}\frac{dv}{1+v^2}=\frac{1}{2\sqrt{2}}\int_{\mathbb{R}}\frac{dv}{1+v^2}\\&=&\frac{\pi i}{\sqrt{2}}\cdot \operatorname*{Res}_{v=i}\left(\frac{1}{v^2+1}\right)=\frac{\pi i}{\sqrt{2}}\cdot\frac{1}{2i}=\color{blue}{\frac{\pi}{2\sqrt{2}}}. \end{eqnarray*}$$
