Sorry for my English if there is any mistake. The exercice for which I need help is the following:
Compute using complex methods: $I=\int_1 ^\infty \frac{\mathrm{d}x}{x^2+1}$
i) Choose the complex function to integrate.
I guess it is $f(z)=1/(z^2+1)$
ii) Choose the contour.
I don't know what to do here. In my notes there are only examples when the integral is from $-\infty$ to $\infty$, so it takes a circumference of radius $r$ and lets it tend to $\infty$.
iii) Compute the integrals along circumferences.
iv) Compute the branch cut.
I don't know why is this question here, because the function is not multivalued.
v) Compute the integral.
vi) Compute the integral using elemental methods.
$I=\int_1 ^\infty \frac{\mathrm{d}x}{x^2+1}=\lim _{a\rightarrow \infty} \int _1 ^a \frac{\mathrm{d}x}{x^2+1}= \lim _{a\rightarrow \infty} \left[ \arctan x \right]_1 ^a =\frac{\pi}{2}-\frac{\pi}{4}=\frac{\pi}{4}$
Edit: The answer might follow the steps given. My teacher did an exercice that way, but I don't know why he uses such method (the example is in a comment within the answers).
Well, I finally did it that way. Compute using complex methods: $$I=\int _1 ^\infty \frac{\mathrm{d}x}{x^2+1}$$
i) Choose the complex function to integrate. $$f(z)=\log (z-1) \frac{1}{z^2+1}$$ Singularities: $z_0 =1$ (branch point), $z_1 =\mathrm{i}$ and $z_2=-\mathrm{i}$ (simple poles).
ii) Choose the contour.
$\Gamma$ enclosed between two circumferences centred in $z=1$, $\delta(\varepsilon)$ and $\delta(R)$ with a branch cut between $0^+$ and $2\pi^-$. It contains the two poles.
iii) Compute the integrals along circumferences. $$\oint _{\delta(R)}f(z)\mathrm{d}z=\int _0 ^{2\pi} \log(1+R\mathrm{e}^{\mathrm{i}\theta}-1)\frac{\mathrm{i}R\mathrm{e}^{\mathrm{i}\theta}\mathrm{d}\theta}{(1+R\mathrm{e}^{\mathrm{i}\theta})^2+1}\xrightarrow [R\to\infty]{} 0$$
$$\oint _{\delta(\varepsilon)}f(z)\mathrm{d}z=\int _0 ^{2\pi} \log(1+\varepsilon\mathrm{e}^{\mathrm{i}\theta}-1)\frac{\mathrm{i}\varepsilon\mathrm{e}^{\mathrm{i}\theta}\mathrm{d}\theta}{(1+\varepsilon\mathrm{e}^{\mathrm{i}\theta})^2+1}\xrightarrow [\varepsilon\to 0]{} \varepsilon \log \varepsilon \rightarrow 0$$
iv) Compute the branch cut. $$\Delta=f\left( (x-1) \mathrm{e}^{\mathrm{i}0}\right) - \log\left( (x-1)\mathrm{e}^{\mathrm{i}2\pi}\right) = \frac{f\left( (x-1) \mathrm{e}^{\mathrm{i}0}\right) - \log\left( (x-1)\mathrm{e}^{\mathrm{i}2\pi}\right)}{x^2+1}=\frac{-2\pi\mathrm{i}}{x^2+1}$$
v) Compute the integral. $$I=\frac{2\pi\mathrm{i}}{\Delta}\sum\mathrm{Res}[f(z);\mathrm{i},-\mathrm{i}]=-\sum\mathrm{Res}[f(z);\mathrm{i},-\mathrm{i}]=-\left( \frac{\pi}{4} \right) = \frac{\pi}{4}$$
The residues at the poles are: $$\lim_{z\rightarrow\mathrm{i}}(z-\mathrm{i})\frac{\log(z-1)}{z^2+1}=\lim_{z\rightarrow\mathrm{i}}\frac{\log(z-1)}{z+\mathrm{i}}=\frac{\log(\mathrm{i}-1)}{2\mathrm{i}}$$ $$\lim_{z\rightarrow-\mathrm{i}}(z+\mathrm{i})\frac{\log(z-1)}{z^2+1}=\lim_{z\rightarrow-\mathrm{i}}\frac{\log(z-1)}{z-\mathrm{i}}=\frac{\log(-\mathrm{i}-1)}{-2\mathrm{i}}$$ $$\sum\mathrm{Res}[f(z);\mathrm{i},-\mathrm{i}]=\frac{\log(\mathrm{i}-1)-\log(-\mathrm{i}-1)}{2\mathrm{i}}=\frac{\log\frac{\mathrm{i}-1}{-\mathrm{i}-1}}{2\mathrm{i}}=\frac{-\mathrm{i}\frac{\pi}{2}}{2\mathrm{i}}=-\frac{\pi}{4}$$
vi) Compute the integral using elemental methods. $$I=\int_1 ^\infty \frac{\mathrm{d}x}{x^2+1}=\lim _{a\rightarrow \infty} \int _1 ^a \frac{\mathrm{d}x}{x^2+1}= \lim _{a\rightarrow \infty} \left[ \arctan x \right]_1 ^a =\frac{\pi}{2}-\frac{\pi}{4}=\frac{\pi}{4}$$