6

So I tried it by making a keyhole contour but I did not know what to do about the singularities at -1 and -i.

Also, can we make a keyhole contour above the real axis? How will it look like then and is it well defined?

For now my contour looks like this enter image description here

I want to understand if it is possible to make a half semicircular contour for this.

Also I divided the integral into 4 parts and started solving but I got stuck and was wondering if we should use the singularities at $z=-1$ and $z=-i$

Any clarification or solution would be helpful.

Thanks

Nucleo
  • 660
  • 2
    What is your problem with the singularities at $-1$ and $-i$? – Dermot Craddock Jun 11 '25 at 15:04
  • 3
    If you're open to sticking with the given keyhole contour, it's standard practice to consider the same integral but with $(\log z)^{\color{red}2}$ instead of $\log z$. See this answer for an example. – user170231 Jun 11 '25 at 15:39
  • You can't make it a keyhole, because $\ln x$ doesn't have an analytic continuous extension o round the circle. – Thomas Andrews Jun 11 '25 at 15:56
  • 1
    @ThomasAndrews, user170231 gives a link to standard way of dealing with $\log(x)$ with square of logarithm – Srini Jun 11 '25 at 16:36
  • @DermotCraddock My only problem was that is it correct to use those points. For this contour I think yes but I wanted to do something with a semi-circular contour – Nucleo Jun 11 '25 at 16:37
  • @user170231 If not this then should I use a semicircular contour with a small bump around 0?? – Nucleo Jun 11 '25 at 16:43
  • IDK that that path would be useful here. You also need to avoid the pole at $z=-1$, but even if you can work around it, you're left with the integrals over $(-\infty,-1)$ and $(-1,0)$ which may not be reconcilable with the one you want over $(0,\infty)$. A semicircle may work if you can figure out a transformation of the integral onto the entire real line, but whether that's possible, again IDK off the top of my head. – user170231 Jun 11 '25 at 16:55
  • @ThomasAndrews Are you not familiar with integration on the classical keyhole contour? It is absolutely applicable here. Cut the plane along the positive real axis and choose any contour that excludes the branch cut. Certainly, the keyhole contour excludes the branch cut and associated branch point. – Mark Viola Jun 12 '25 at 21:22

1 Answers1

4

Note that $1-x^4=(1-x)(1+x+x^2+x^3)$. Thus, we have

$$\begin{align} \int_0^\infty \log(x) \frac{1-x}{1-x^4}\,dx&=\int_0^\infty \frac{\log(x)}{(1+x)(1+x^2)}\,dx\\\\ \end{align}$$



RESIDUES:

Now, let's evaluate the integral of $\frac{\log^2(z)}{(1+z)(1+z^2)}$ around the classical keyhole contour (shown in the diagram of the posted question). Proceeding, the residue theorem guarantees that

$$\oint_{C_{kh}}\frac{\log^2(z)}{(1+z)(1+z^2)}\,dz=2\pi i \sum_{i=1}^3 \text{Res}\left(\frac{\log^2(z)}{(1+z)(1+z^2)},z=z_i\right)$$

where $z_1=-1$, $z_2=i$, and $z_3=-i$. Evaluating the residues, reveals

$$\begin{align}\text{Res}\left(\frac{\log^2(z)}{(1+z)(1+z^2)},z=-1\right)&=\frac{-\pi^2}{2}\tag{1a}\\\\ \text{Res}\left(\frac{\log^2(z)}{(1+z)(1+z^2)},z=i\right)&=\frac{-\pi^2/4}{(1+i)2i}\tag{1b}\\\\ \text{Res}\left(\frac{\log^2(z)}{(1+z)(1+z^2)},z=-i\right)&=\frac{-9\pi^2/4}{(1-i)(-2i)}\tag{1c} \end{align}$$



CONTOUR INTEGRAL:

In addition, we see that

$$\begin{align} \oint_{C_{kh}}\frac{\log^2(z)}{(1+z)(1+z^2)}\,dz&=\int_0^\infty \left(\frac{\log^2(x)}{(1+x)(1+x^2)}-\frac{(\log(x)+i2\pi)^2}{(1+x)(1+x^2)}\right)\,dx\\\\ &=-i4\pi \int_0^\infty \frac{\log(x)}{(1+x)(1+x^2)}\,dx\\\\&+4\pi^2\int_0^\infty \frac{1}{(1+x)(1+x^2)}\,dx\tag2 \end{align}$$

Note that it is a straightforward exercise (left to the reader) to show that the contributions to the contour integral from integration around the semi-circles at $|z|=R$ and $|z|=\varepsilon$ vanish as $R\to \infty$ and $\varepsilon \to 0^+$, respectively.



Putting together $(1a)-(1c)$ and $(2)$, we find that

$$\int_0^\infty \frac{\log(x)}{(1+x)(1+x^2)}\,dx=-\pi^2/16$$



Aside:

As a bonus, we also find that

$$\int_0^\infty \frac{1}{1+x+x^2+x^3}\,dx=\pi/4 $$

Mark Viola
  • 184,670
  • Maybe it's obvious, but don't you have to prove that the integral vanishes over the small and big circles? – Srini Jun 12 '25 at 03:12
  • @Srini Yes, but the limits are $0$ which can be seen with straightforward analysis. – Mark Viola Jun 12 '25 at 13:37
  • Agreed. But for people who are new to contour integration and who come to MSE to get their questions answered, it will be confusing to see no mention of 2 segments of the contour. Just add a note saying it's straightforward to note that those 2 segments vanish. Look at it from a newbie perspective – Srini Jun 12 '25 at 15:30
  • 1
    @Srini I've edited according to your suggestions – Mark Viola Jun 12 '25 at 19:19
  • @MarkViola could you please elaborate a little bit on the first step of the contour integral. i.e about relating the ln^2(x) and the lnx integral – Nucleo Jun 12 '25 at 21:56
  • 2
    @Nucleo This is a commonly used methodology. Had the original integral had $\log^2$ instead of $\log$, then we would have analyzed the contour integral with $\log^3$. The idea is that the integration along the upper part of the branch cut has the logarithm and so we cannot simply analyze the contour integral of $\log$ itself because of cancellation. We need to somehow retain a logarithm in the sum of integrations around the two sides of the branch cut. See Example 5 HERE – Mark Viola Jun 12 '25 at 23:22
  • @MarkViola Thankyou so much, I finally understood everything and now I was able to solve everything on my own! – Nucleo Jun 15 '25 at 11:08
  • 1
    @nucleo You're welcome. My pleasure – Mark Viola Jun 15 '25 at 15:08