I am trying to solve the integral $\int_0^\infty \frac{\sqrt{x}}{x^2+2x+1}dx$ using complex contour integration, but I am having trouble relating this integral with a complex function.
The issue I have is the fact that $\sqrt{z}$ requires a branch cut.
If you do $x=y^2$ and $\mathrm dx$ = $2y\,\mathrm dy$, then your integral becomes$$2\int_0^\infty\frac{y^2}{y^4+2y^2+1}\,\mathrm dy=\int_{-\infty}^\infty\frac{y^2}{y^4+2y^2+1}\,\mathrm dy.$$The only pole of $\frac{z^2}{z^4+2z^2+1}$ is a double pole, located at $i$. And$$\operatorname{res}_{z=i}\left(\frac{z^2}{z^4+2z^2+1}\right)=-\frac i4.$$Therefore$$\int_0^\infty\frac{\sqrt x}{x^2+2x+1}\,\mathrm dx=2\pi i\times\left(-\frac i4\right)=\frac\pi2.$$