What contour to use for Cauchy residue theorem on integral of a rational function with multiple poles

complex-analysisintegration

What contour should I choose to apply Cauchy residue theorem to calculate the integral $$\int_0^\infty \frac{x^{k-1}}{(x+a)(x+b)^{k+1}}dx,$$ where $k$ is a positive integer and $a,b>0$? I tried changing the variable $x=t^2$ and got $$2\int_0^\infty \frac{t^{2k-1}}{(t^2+a)(t^2+b)^{k+1}}dt.$$ I moved the poles to the imaginary axis, but the integrand is an odd function. If I choose the semicircle, the integrals on the positive and negative axes are canceled.

Thank you!

Best Answer

We could try a keyhole contour. Denote

$$f(z) = \frac{\ln(z)}{(az+b)(z+c)} \quad a,b,c> 0$$

and let $\ln(z) = \ln|z| +i\Theta \, $ where $0< \Theta\leq 2\pi$

Let $\epsilon, R >0$ such that $\epsilon <|\frac{b}{a}|<R$ and $\epsilon <|c|<R$. If we choose the branch cut over the $x$-axis, $0\leq x<\infty$ we have the following keyhole contour:

\begin{align*} \gamma_{1}(t) =& t, \, t\in(\epsilon, R)\\ \gamma_{2}(\theta) = &Re^{-i\theta}, \, \theta \in (-2\pi,0)\\ \gamma_{3}(t) =& -t, \, t\in(-R,-\epsilon)\\ \gamma_{2}(\theta) = &\epsilon e^{i\theta}, \, \theta \in (0,2\pi)\\ \end{align*}

If $\gamma = \gamma_{1}+...\gamma_{4}$, by the residue theorem: \begin{align*} \oint_{\gamma}f(z) dz = &\left(\oint_{\gamma_{1}}+...+\oint_{\gamma_{4}} \right) = \int_{\epsilon}^{R} \frac{\ln(t)}{(at+b)(t+c)}dt + \int_{R}^{\epsilon} \frac{\ln(e^{2\pi i}t)}{(at+b)(t+c)}dt +\oint_{\gamma_{2}}+\oint_{\gamma_{4}}\\ =& -2\pi i \int_{R}^{\epsilon} \frac{1}{(at+b)(t+c)}dt +\oint_{\gamma_{2}}+\oint_{\gamma_{4}}\\ =& 2\pi i \left(\operatorname{Res}\left(f,-\frac{b}{a}\right) + \operatorname{Res}(f,-c)\right)\\ =& 2\pi i \frac{\ln(b)-\ln(a)-i\pi -\ln(c) +i \pi}{ac-b}\\ =& \frac{2\pi i \ln\left(\frac{b}{ac}\right)}{ac-b} \end{align*}

Also note that

$$\left|\oint_{\gamma_{2}} f(z) dz \right|= \left|\int_{0}^{2\pi} \frac{iRe^{i\theta}\ln(Re^{i\theta})}{(aRe^{i\theta}+b)(Re^{i\theta}+c)}\right|\leq \frac{2\pi R(\ln(R)+2\pi)}{a(R-\left|\frac{b}{a}\right|)(R-|c|)}$$

$$\left|\oint_{\gamma_{4}} f(z) dz \right|= \left|\int_{0}^{2\pi} \frac{i\epsilon e^{i\theta}\ln(\epsilon e^{i\theta})}{(a\epsilon e^{-i\theta}+b)(\epsilon e^{i\theta}+c)}\right|\leq \frac{2\pi \epsilon (\ln(\epsilon)+2\pi)}{a(\epsilon-\left|\frac{b}{a}\right|)(\epsilon-|c|)}$$

So, when $\epsilon \to 0+$ and $R \to \infty$

$$ \oint_{\gamma_{2}} f(z) dz + \oint_{\gamma_{4}}f(z) dz \to 0 $$

Then

$$ \int_{0}^{\infty} \frac{1}{(at+b)(t+c)}dt = \frac{ \ln\left(\frac{ac}{b}\right)}{ac-b}$$

Now differentiating both sides $k-1$ times with respect to $a$:

$$\int_{0}^{\infty} \frac{x^{k-1}(-1)^{k-1}(k-1)!}{(xa+b)^{k}(x+c)}dx = \frac{(-1)^{k-1}(k-1)!c^{k-1}\ln\left(\frac{ac}{b}\right)}{(ac-b)^{k}}- \frac{1}{(ac-b)^{k}} \sum_{j=1}^{k-1} \binom{k-1}{j} \frac{(k-1-j)!(ac-b)^{j}c^{k-1-j}(j-1)!}{a^j} $$

Hence

$$\int_{0}^{\infty} \frac{x^{k-1}}{(xa+b)^{k}(x+c)}dx = \frac{c^{k-1}\ln\left(\frac{ac}{b}\right)}{(ac-b)^{k}}- \frac{1}{(ac-b)^{k}} \sum_{j=1}^{k-1} \frac{(ac-b)^{j}c^{k-1-j}}{ja^j} $$

if we put $a=1$

$$\boxed{\int_{0}^{\infty} \frac{x^{k-1}}{(x+b)^{k}(x+c)}dx = \frac{c^{k-1}\ln\left(\frac{c}{b}\right)}{(c-b)^{k}}- \frac{1}{(c-b)^{k}} \sum_{j=1}^{k-1} \frac{(c-b)^{j}c^{k-1-j}}{j} \quad b,c>0, k\in \mathbb{N}} $$

You can continue increasing the powers in the denominator of the left hand side differentiating with respect to $b$ both sides of the equation.

For example, differentiating one more time both sides with respect to $b$

$$\boxed{\int_{0}^{\infty} \frac{x^{k-1}}{(x+b)^{k+1}(x+c)}dx = -\frac{c^{k-1}\ln\left(\frac{c}{b}\right)}{(c-b)^{k+1}}+\frac{c^{k-1}}{kb(c-b)^{k}}+ \frac{1}{k(c-b)^{k+1}} \sum_{j=1}^{k-1} \frac{(k-j)(c-b)^{j}c^{k-1-j}}{j} \quad b,c>0, k\in \mathbb{N}} $$

Related Question