I am trying to find

$$\int_{0}^{\infty} {\frac{\ln(x)}{(x+1)^3}}dx$$

Using the residue formula.

I am mainly having a hard time finding a contour that works, since we must include the pole of order three at $x=-1$.

I have tried a partial, indented circle that goes from $\theta = 0$ to $4\pi/3$ and a $3/4$ circle as well, but in both cases, if $\gamma_3(t) = te^{i\theta}, t \in (R,0)$ for a fixed $\theta$ in the third quadrant, we are left with the real part of the integral, as well as a complex integral that is just as difficult to solve.

The residue I calculated is:

$$res_{-1}f(z) = \lim_{z \rightarrow -1}\frac{1}{3!} \frac{d^2}{dz^2} (z+1)^3 \frac{\ln{z}}{(1+z)^3}$$ $$=\frac{1}{2}* \frac{-1}{-1^2} = \frac{-1}{2}$$

So that means the entire complex integral should be $2\pi i* \frac{-1}{2} = -\pi i$...

I had another idea for a contour that catches the pole: we have

$$\gamma_1(t) = t, t \in (\epsilon, R)$$ $$\gamma_2(t) = Re^{it}, t\in (0, \pi/2)$$ $$\gamma_3(t) = e^{it} -1, t \in (\pi, 2\pi - \epsilon)$$ $$\gamma_4(t) = $$ the little tiny circle to complete the contour.

But this one, for $\gamma_3$ gives us a weird integral:

$$\int_{\pi}^{2\pi - \epsilon}\frac{\ln{e^{it} - 1}}{(e^{it} - 1 +1)^3}(ie^{it})$$

Which looks a little better, but I'm not sure how to hande the log function in this case, and it doesn't look promising. Any help would be appreciated.


The contour we need to use for this question is a basic keyhole contour


First, parametrize about the contour in four different areas. Let the smaller circle have a radius of $\epsilon$ and the larger circle have a radius of $R$. Furthermore, denote the arcs of the larger circle and smaller circle as $\Gamma_R$ and $\gamma_{\epsilon}$ respectively. Considering the function

$$f(z)=\frac {1}{(z+1)^3}$$

We have

$$\begin{multline}\oint\limits_{\mathrm C}dz\, f(z)\log^2z=\int\limits_{\epsilon}^{R}dx\, f(x)\log^2x+\int\limits_{\Gamma_{R}}dz\, f(z)\log^2z\\-\int\limits_{\epsilon}^{R}dx\, f(x)(\log|x|+2\pi i)^2+\int\limits_{\gamma_{\epsilon}}dz\, f(z)\log^2z\end{multline}$$

As $R\to\infty$ and $\epsilon\to0$, the integrals around the arc vanish leaving us with

$$\oint\limits_{\mathrm C}dz\, f(z)\log^2z=-4\pi i\int\limits_0^{\infty}dx\, f(x)\log x+4\pi^2\int\limits_0^{\infty}dx\, f(x)$$

All you have to do left is calculate the residue, multiply that by $2\pi i$, and divide the imaginary part by $-4\pi$ to get the answer to your integral.

I'll leave the rest of the work up to you.

  • $\begingroup$ Wait, won't the two sides of the "tube" part always cancel out? Also, is this contour valid for the log function? I thought the log can't be defined on a full circle?? $\endgroup$ – pictorexcrucia May 6 '18 at 17:45
  • $\begingroup$ @pictorexcrucia Yes, both sides of the "tube" part will cancel out. So a nice tip to know when dealing with logs is that if your function $f(z)$ has a natural log, it's always nice to consider the function $g(z)=f(z)\log z$. $\endgroup$ – Frank W. May 6 '18 at 17:48
  • 1
    $\begingroup$ @pictorexcrucia Yes, this contour is valid for a logarithmic function. And no, this contour is not a full circle. It has that distinct cut along the real axis which is why we call it a keyhole contour. $\endgroup$ – Frank W. May 6 '18 at 17:50
  • 2
    $\begingroup$ Actually, the integrals along opposite sides of the branch cut do NOT cancel. We have $\log^2(x)-(\log(x)+2\pi i)^2=-4\pi i \log(x)+4\pi^2\ne 0$. And inside and on the contour, $\log(z)$ is analytic. So, the contour, equipped with the branch cut, is not a closed circle. $\endgroup$ – Mark Viola May 6 '18 at 17:51
  • $\begingroup$ @MarkViola Sorry, but I was assuming he meant the extra power of the log which is $\log^2x$ in this case. Perhaps I shouldn't have said that they "cancel out" $\endgroup$ – Frank W. May 6 '18 at 17:53


Analyze the contour integral $\oint_C \frac{\log^2(z)}{(z+1)^3}\,dz$ where $C$ is the classical keyhole contour with a branch cut along the non-negative real axis.

Use the residue theorem to evaluate this closed-contour integral (there is a third order pole at $z=-1$).

Finally, note that $\log^2(z)=\log^2(x)$ on that part of the branch cut in Quadrant I and $\log^2(z)=(\log(x)+2\pi i)^2$ on that part of the branch cut in Quadrant IV.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.