Let $A$ and $B$ be Real parameters such that $A>0$ and $B>0$. How do I use the Residue Theorem to compute the following improper integral
$$\int^{+\infty}_{-\infty}\frac{\mathrm{d}x}{Ax\left(1-\frac{x}{B}\right)}\: ?$$
Is there another way to compute this integral without considering the Residue theorem?
PS: I've tried to solve it, and I find a null Principal value. However, I'm not quite sure if this is whether correct. In anycase, below one may see what I have found.
Let $C$ be a contour made up of two parts $C_{1}$ aline segment and $C_{2}$, a semicircular arch. Hence, we may rewrite the above integral as follows:
$\lim_{R\rightarrow \infty}\displaystyle\int_{C}\frac{\mathrm{d}z}{Az\left(1-\frac{z}{B}\right)}=\lim_{R\rightarrow \infty}\left(\int^{R}_{-R}\frac{dx}{Ax\left(1-\frac{x}{B}\right)}+\int_{C_{2}}\frac{dx}{Ax\left(1-\frac{x}{B}\right)}\right)$
or P.V.$\displaystyle\int^{+\infty}_{-\infty}\frac{\mathrm{d}x}{Ax\left(1-\frac{x}{B}\right)}+\lim_{R\rightarrow \infty}\int_{C_{2}}\frac{\mathrm{d}x}{Ax\left(1-\frac{x}{B}\right)}$.
To compute the left-hand side of the previous equation, one needs to determine $ \displaystyle\oint_{C}\frac{\mathrm{d}z}{Az\left(1-\frac{z}{B}\right)}$.
From the above, we see that there are two poles: one at $z=0$, and the second at $z=B$.
Therefore, from the Residue Theorem, we then have
$2\pi i Res\left(\displaystyle\frac{1}{Az\left(1-\frac{z}{B}\right)}, 0\right)= \frac{1}{A}$, and
$2\pi i Res\left(\displaystyle\frac{1}{Az\left(1-\frac{z}{B}\right)}, B\right)= -\frac{1}{A}$,
which yields us to null Principal value.
Therefore, are the above correct?
How do I to evalute the right-hand side integral $\displaystyle\lim_{R\rightarrow \infty}\int_{C_{2}}\frac{\mathrm{d}x}{Ax\left(1-\frac{x}{B}\right)}$?
Too long for a comment
The integral $I=\int_{-\infty}^{\infty}\frac{dx}{x(a-x)}=\frac{1}{a}\int_{-\infty}^{\infty}\Bigl(\frac{1}{x}+\frac{1}{a-x})dx$ taken in the infinite limits $(-\infty;\infty)$ is equal to zero.
To evaluate the integral in the P.V. sense you have to split integration into four parts (introducing big constant $M\to\infty$ and small $\epsilon\to0$: $$I= \frac{1}{a}\biggl(\int_{-M}^{-\epsilon}\frac{dx}{x}+\int_{\epsilon}^{M}\frac{dx}{x}+\int^{a-\epsilon}_{-M}\frac{dx}{(a-x)}+\int^{M}_{a+\epsilon}\frac{dx}{(a-x)}\biggr)$$ $$=\frac{1}{a}\biggl(\log{\frac{-\epsilon}{-M}}+\log{\frac{M}{\epsilon}}-\log{\frac{\epsilon}{a+M}}-\log{\frac{a-M}{-\epsilon}}\biggr)=-\frac{1}{a}\log\frac{M+a}{M-a}$$ and then lead $\epsilon\to0$ and $M\to\infty$
You get $I\to-\log1=0$
If you want to use integration in the complex plane, you can close the contour adding a big half-cirlce, for example, in the upper half-plane (integration counter-clockwise), and also two small half-circles around $x=0$ and $x=a$ (integration in clockwise direction). There are no residuals inside the closed contour, and integral along big circle $\to0$ as $R\to\infty$, so the integral is equal to these integrals along small half-circles. But it is easy to show that they are equal to $\frac{-\pi i}{a}$ and $\frac{\pi i}{a}$ correspondingly, so their sum is equal to $0$.