15

I am trying to use residues to compute $$\int_0^\infty\frac{\log x}{(1+x)^3}\,\operatorname d\!x.$$My first attempt involved trying to take a circular contour with the branch cut being the positive real axis, but this ended up cancelling off the term I wanted. I wasn't sure if there was another contour I should use. I also had someone suggest using the substitution $x=e^z$, so the integral becomes $$\int_{-\infty}^\infty\frac{ze^z}{(1+e^z)^3}\,\operatorname d\!z$$so that the poles are the at the odd multiples of $i\pi$. I haven't actually worked this out, but it does not seem like the solution the author was looking for (this question comes from an old preliminary exam).

Any suggestions on how to integrate?

jimjim
  • 9,675
Clayton
  • 24,751
  • Does this help? – Git Gud Aug 02 '13 at 12:31
  • Integration by parts (one suffices). – Did Aug 02 '13 at 12:36
  • @Did: The question specifies to use residues :) – Clayton Aug 02 '13 at 12:37
  • @GitGud: Are you suggesting using a rectangle of finite height (the same kind of contour in the question you linked to)? It seems like it could work. I hadn't thought about using that kind of contour. – Clayton Aug 02 '13 at 12:38
  • @Clayton I'm not suggesting anything, to be honest. It's just that the integrals don't seem that different so I brought it to your attention. – Git Gud Aug 02 '13 at 12:39
  • The text does not say so (in fact the question can be read as the opposite). Never mind. – Did Aug 02 '13 at 12:39
  • @GitGud Nope. IPP then decomposition of fractions. – Did Aug 02 '13 at 12:40
  • @Did Yeah, I just read your comment and edited mine to remove that part. – Git Gud Aug 02 '13 at 12:41
  • @Did: I'm sorry, I didn't post the question itself, just the parts I had been struggling with. – Clayton Aug 02 '13 at 12:41
  • Now the text and the title specify "residues". – Did Aug 02 '13 at 12:41
  • @Did: just to address the issue of integration by parts + decomposition, you should note that it's not straightforward: you have to cancel logarithmic singularities at both $x=0$ and at infinity to properly evaluate. – Ron Gordon Aug 02 '13 at 13:43
  • @RonGordon Since a primitive is explicit with easy limits at $0$ and $+\infty$, I would not call this an issue (probably the only things to use are that $x\log x\to0$ when $x\to0$ and that $\log(1+u)\to0$ when $u\to0$). – Did Aug 02 '13 at 14:14
  • @Did: I see the primitive as $$-\frac{2 \log{x}}{(1+x)^2} + 2 \log{x} - 2 \log{(1+x)} + \frac{2}{1+x}$$ You can see that there are singularities that cancel at the integration limits. I agree, not a big deal, but a subtlety that many people need explaining. – Ron Gordon Aug 02 '13 at 14:22
  • Not that using residues for evaluating integrals is a trivial business, either. – Ron Gordon Aug 02 '13 at 14:28
  • @RonGordon Sure. I was alluding to the fact that, when one groups the two $\log(x)$ terms at $x\to0$, the (false) singularity disappears. Likewise with $\log(1+x)-\log(x)=\log(1+1/x)$ at $x\to\infty$. – Did Aug 02 '13 at 14:38
  • @RonGordon To finish with this, I feel pretty confident that in the present case the real-analysis approach is more natural (why the apparition of $(\log z)^2$ in the complex-analysis proof?). – Did Aug 02 '13 at 14:41
  • @Did: Maybe, although when I see logs and the positive real line, I do think residues, but I admit that I am weird that way. As far as the square of the log goes, that is a technique that exploits the multivaluedness of the log to extract the desired integral. One thing I do find annoying about the technique is that you end up evaluating other integrals about which you are likely not interested. That said, once you master the technique, evaluation of the integrals becomes very simple in most cases. – Ron Gordon Aug 02 '13 at 14:46
  • And thanks for indulging me. – Ron Gordon Aug 02 '13 at 14:46
  • @Arjang Why on earth would you edit a post that is more than a year old, just to change $dx$ to $\operatorname d!x$? That is just a matter of stylistic taste. – mrf Oct 23 '14 at 07:18
  • @mrf: I wholly agree. I wondered the same thing, but alas, I'll let the thread continue to lie in its current state. – Clayton Oct 23 '14 at 19:58

3 Answers3

19

Consider the integral

$$\oint_C dz \frac{\log^2{z}}{(1+z)^3}$$

where $C$ is a keyhole contour in the complex plane, about the positive real axis. This contour integral may be seen to vanish along the outer and inner circular contours about the origin, so the contour integral is simply equal to

$$\int_0^{\infty} dx \frac{\log^2{x}-(\log{x}+i 2 \pi)^2}{(1+x)^3} = -i 4 \pi \int_0^{\infty} dx \frac{\log{x}}{(1+x)^3}+4 \pi^2 \int_0^{\infty} dx \frac{1}{(1+x)^3}$$

By the residue theorem, the contour integral is also equal to $i 2 \pi$ times the residue at the pole $z=-1=e^{i \pi}$. In this case, with the triple pole, we have the residue being equal to

$$\frac12 \left [ \frac{d^2}{dz^2} \log^2{z}\right]_{z=e^{i \pi}} = 1-i \pi$$

Thus we have that

$$-i 4 \pi \int_0^{\infty} dx \frac{\log{x}}{(1+x)^3}+4 \pi^2 \frac12 = i 2 \pi + 2 \pi^2$$

which implies that

$$\int_0^{\infty} dx \frac{\log{x}}{(1+x)^3} = -\frac12$$

Ron Gordon
  • 138,521
  • Thanks! Is it a standard technique to increase the power of the logarithm when trying to solve such an integral? Or is it just one of many tricks from a bag that happens to work every now-and-then? – Clayton Aug 02 '13 at 12:45
  • @Clayton: yes. It's almost like the way we derive the derivative of a power, in that we lose the highest power of the log in evaluating the integral along both sides of the real axis. (Along the other side, you let $z=e^{i 2 \pi}$; this is crucial. – Ron Gordon Aug 02 '13 at 12:46
  • Hi @RonGordon, if the poles were at +/- i, would integrating along just the upper semi-circle be just fine too? And, how did you compute the triple pole? Did you expand in Laurent series? Thanks, – User001 Oct 30 '15 at 00:38
  • A solution that I am comparing my work with uses just a semi-circular contour, so it doesn't have the cancellation problem -- but I wonder whether the solution is incorrect, especially on its work along the negative real axis. Thanks @RonGordon – User001 Oct 30 '15 at 00:41
  • 1
    @LebronJames: I think you can do it that way if you are careful in defining the branch of the log. – Ron Gordon Oct 30 '15 at 00:49
  • Ok got it. I had a seemingly tricky imaginary integral from integrating along the negative real axis (using an upper semi-circular contour), but the solution simply sets it equal to zero. I am guessing this is just equating real and imaginary parts -- by the Residue theorem, the RHS of the equation gives a real number. Thanks so much, @RonGordon – User001 Oct 30 '15 at 01:06
6

\begin{align} &\bbox[10px,#ffd]{\int_{0}^{\infty}{\ln\left(x\right) \over \left(1 + x\right)^{3}}\,{\rm d}x} = \int_{0}^{\pi/2} {\ln\left(\tan^{2}\left(x\right)\right) \over \left\lbrack 1 + \tan^{2}\left(x\right)\right\rbrack^{3} } \,2\tan\left(x\right)\sec^{2}\left(x\right)\,{\rm d}x \\[5mm] = &\ 4\int_{0}^{\pi/2} \ln\left(\tan\left(x\right)\right) \tan\left(x\right)\cos^{4}\left(x\right)\,{\rm d}x = 4\int_{0}^{\pi/2} \ln\left(\tan\left(x\right)\right) \sin\left(x\right)\cos^{3}\left(x\right)\,{\rm d}x \\[5mm] &\ 4\int_{0}^{\pi/2} \ln\left(\sin\left(x\right)\right) \sin\left(x\right)\cos^{3}\left(x\right)\,{\rm d}x - 4\int_{0}^{\pi/2} \ln\left(\cos\left(x\right)\right) \sin\left(x\right)\cos^{3}\left(x\right)\,{\rm d}x \\[5mm] = &\ 4\int_{0}^{1} x\left(1 - x^{2}\right)\ln\left(x\right)\,{\rm d}x + 4\int_{1}^{0}x^{3}\ln\left(x\right)\,{\rm d}x = 4\int_{0}^{1} \left(x - 2x^{3}\right)\ln\left(x\right)\,{\rm d}x \\[5mm] = &\ 4\lim_{n \to 0}{{\rm d} \over {\rm d}n} \int_{0}^{1} \left(x^{n + 1} - 2x^{n + 3}\right)\,{\rm d}x = 4\lim_{n \to 0}{{\rm d} \over {\rm d}n} \left({1 \over n + 2} - {2 \over n + 4}\right) \\[5mm] = &\ 4\lim_{n \to 0} \left\lbrack -\,{1 \over \left(n + 2\right)^{2}} + {2 \over \left(n + 4\right)^{2}} \right\rbrack = 4 \left(-\,{1 \over 4} + {1 \over 8}\right) = -\,{1 \over 2} \end{align}

Felix Marin
  • 89,464
3

This approach is not using residues method but I'd like to post the general solution.


Let $$\mathcal{I}=\int_0^\infty\frac{x^{m-1}}{(1+x)^{m+n}}\ln x\ dx\tag1$$ Consider beta function $$ \text{B}(m,n)=\int_0^\infty\frac{x^{m-1}}{(1+x)^{m+n}}\ dx.\tag2 $$ Differentiating $(2)$ with respect to $m$ yields \begin{align} \frac{\partial}{\partial m}\text{B}(m,n)&=\int_0^\infty\frac{\partial}{\partial m}\left(\frac{x^{m-1}}{(1+x)^{m+n}}\right)\ dx\\ (\psi(m)-\psi(m+n))\text{B}(m,n)&=\int_0^\infty\frac{x^{m-1}}{(1+x)^{m+n}}\ln\left(\frac{x}{1+x}\right)\ dx\tag3\\ &=\mathcal{I}-\color{red}{\int_0^\infty\frac{x^{m-1}}{(1+x)^{m+n}}\ln (1+x)\ dx},\tag4 \end{align} where $\psi(\cdot)$ is the digamma function.

Setting $\color{red}{\displaystyle\ x=\frac1t\;\Rightarrow\;dx=-\frac{dt}{t^2}}$ to the second integral in $(4)$ yields $$ \int_0^\infty\frac{t^{n-1}}{(1+t)^{n+m}}\ln \left(\frac{1+t}{t}\right)\ dt=(\psi(m+n)-\psi(n))\text{B}(m,n).\tag5 $$ Plugging in $(5)$ to $(4)$ yields $$ \color{blue}{\int_0^\infty\frac{x^{m-1}}{(1+x)^{m+n}}\ln x\ dx=(\psi(m)-\psi(n))\text{B}(m,n)}.\tag6 $$


Thus, using $(6)$ and setting $m=1\; ;\; n=2$, we obtain $$ \large\int_0^\infty\frac{\ln x}{(1+x)^{3}}\ dx=(\psi(1)-\psi(2))\text{B}(1,2)=\color{blue}{-\frac12}, $$ where $\psi(1)= -\gamma$, $\ \psi(2)= 1-\gamma$, and $\displaystyle\ \text{B}(1,2)=\frac{\Gamma(1)\Gamma(2)}{\Gamma(3)}=\frac12$.

Tunk-Fey
  • 24,849