# Thread: Integral with log and residues

1. ## Integral with log and residues

Hi, I'm new (and sorry for my bad english ), I'm trying to solve this complex integral $\int_{0}^{+\infty} \frac{log x}{(2x+1)(x^{2}+x+1)} dx$ and the result should be $\frac{1}{27}(-\pi^2-9log^2(2))$. I write what I did:
The function is integrable and it is not even, and I choose the auxiliary function $f(z)=\frac{log^{2} z}{(2z+1)(z^2+z+1)}$ with the square natural log.
The regular path I choose is the superior semicircle excluding singularity points: $0$ and $-1/2$. The two poles are $-1/2+i\sqrt{3}/2$ (which falls inside) and $-1/2-i\sqrt{3}/2$.

$2{\pi}{i}Res(f, -\frac{1}{2}+i\frac{\sqrt{3}}{2})=\int_{+\partial{T }}f(z)dz=\int_{-R}^{-\delta -\frac{1}{2}}\frac{{(log|z|+iarg(z))}^{2}}{(2z+1)(z ^2+z+1)}dz - \int_{+\Gamma\delta}f(z)dz +\int_{-\frac{1}{2}+\delta}^{\epsilon}\frac{{(log|z|+iarg( z))}^{2}}{(2z+1)(z^2+z+1)}dz - \int_{+\Gamma\epsilon}f(z)dz + \int_{+\epsilon}^{+R}\frac{{(log|z|+iarg(z))}^{2}} {(2z+1)(z^2+z+1)}dz + \int_{+\Gamma{R}}f(z)dz$.

The integral calculated on the semicicrcle centred in $0$ is $0$ and also the integral on the big semicircle is $0$ while the integral on the semicircle centred in $-1/2$ is $\frac{2}{3}(i\pi-log(2))^{2}$. Finally the residue on the pole is $Res(f, \frac{-1}{2}+i\frac{\sqrt{3}}{2})=\frac{4}{27}{\pi}^{2}$ so:

$2{\pi}{i}\frac{4}{27}{\pi}^{2}=\frac{2}{3}(i\pi-log(2))^{2} + \int_{-\infty}^{-\frac{1}{2}}\frac{{(log|x|+i{\pi})}^{2}}{(2x+1)(x^ 2+x+1)}dx+\int_{-\frac{1}{2}}^{0}\frac{{(log|x|+i{\pi})}^{2}}{(2x+1 )(x^2+x+1)}dx$ $+ \int_{0}^{+\infty}\frac{log^{2}x}{(2x+1)(x^2+x+1)} dz$

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

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

so:

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

I change the sign of the integral I want find:

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

Considering only the coefficients with $-i$.

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

but this is not the result... :|

Some ideas?? Thanks for understanding

2. ## Re: Integral with log and residues

This looks like a somewhat messy calculation whichever way you do it. But I think that you are using an awkward contour for the purpose. With the function $f(z) = \frac{\log^2 x}{(2x+1)(x^{2}+x+1)},$ try taking the contour that goes along the positive real axis from $\delta$ to $R$, then anticlockwise round a complete circle from $R$ all the way round to $R$ (except that you will now be on a different branch of the log function), then back along the positive real axis from $R$ to $\delta$, and finally clockwise all the way round a circle of radius $\delta$ back to the starting point.

3. ## Re: Integral with log and residues

Thanks Opalg, but for the next time how can I choose the right contour? Why my contour is not good?

4. ## Re: Integral with log and residues

Originally Posted by quidh
Thanks Opalg, but for the next time how can I choose the right contour? Why my contour is not good?
Maybe because the logarithm is discontinuous along many points on the negative real axis...

5. ## Re: Integral with log and residues

Originally Posted by quidh
Thanks Opalg, but for the next time how can I choose the right contour? Why my contour is not good?
The integral to be solved is...

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

... and the presence of the log means that the function to ve integrated has in $z=0$ a type of singularity called brantch point. Such type of singularity cannot be treated as an 'ordinary pole' and that means that the path of integration must be choosen so that the point $z=0$ is outside it. A good choice is the path L in figure, suggested by Opalg...

The same problem [and the same path to be used...] exists if, for example, the integral is...

$\int_{0}^{\infty} \frac{x^{p}}{(1+2 x)\ (1+x+x^{2})}\ dx$ (2)

... where p is a real number...

Kind regards

$\chi$ $\sigma$

6. ## Re: Integral with log and residues

Originally Posted by chisigma
... and the presence of the log means that the function to ve integrated has in $z=0$ a type of singularity called brantch point. Such type of singularity cannot be treated as an 'ordinary pole' and that means that the path of integration must be choosen so that the point $z=0$ is outside it. A good choice is the path L in figure, suggested by Opalg...
Ok, but the contour that I initially chose is the same as your with the only difference $Im(z) >= 0$, isn't it more restrictive?

The difference is that I excluded 2 poles, is this an error? So, in order to choose a good contour have I to include all poles and exclude singularities?

7. ## Re: Integral with log and residues

Originally Posted by quidh
Ok, but the contour that I initially chose is the same as your with the only difference $Im(z) >= 0$, isn't it more restrictive?

The difference is that I excluded 2 poles, is this an error? So, in order to choose a good contour have I to include all poles and exclude singularities?
The objection that I have to that contour is that it comes too close to the pole at –1/2. The integral of the function along the negative real axis fails to converge because of the singularity at that point.

8. ## Re: Integral with log and residues

Originally Posted by quidh
Ok, but the contour that I initially chose is the same as your with the only difference $Im(z) >= 0$, isn't it more restrictive?

The difference is that I excluded 2 poles, is this an error? So, in order to choose a good contour have I to include all poles and exclude singularities?
The problem is the 'small half circle' around the pole at $z=-\frac{1}{2}$. It is not difficult to 'discover' that on that 'half circle' is...

$\lim_{r \rightarrow 0} |\int_{-\frac{1}{2}-r}^{-\frac{1}{2}+r} f(z)\ dz | = \infty$

Kind regards

$\chi$ $\sigma$

9. ## Re: Integral with log and residues

Originally Posted by chisigma
...It is not difficult to 'discover' that on that 'half circle' is...

$\lim_{r \rightarrow 0} |\int_{-\frac{1}{2}-r}^{-\frac{1}{2}+r} f(z)\ dz | = \infty$
Ok, I did that choice because I used the "Lemma del cerchio piccolo" (I don't know its english name) (Lemma del cerchio piccolo - Wikipedia)

$\lim_{r \rightarrow -\frac{1}{2}} \frac{(\log|z|+i\arg(z))^{2}}{z^{2}+z+1}= \frac{2}{3}(-\log(2)+i\pi)^{2}$ that's a number so the Lemma seems to work.

I've to use your test anyway before using any lemma?

10. ## Re: Integral with log and residues

Originally Posted by quidh
Ok, I did that choice because I used the "Lemma del cerchio piccolo" (I don't know its english name) (Lemma del cerchio piccolo - Wikipedia)

$\lim_{r \rightarrow -\frac{1}{2}} \frac{(\log|z|+i\arg(z))^{2}}{z^{2}+z+1}= \frac{2}{3}(-\log(2)+i\pi)^{2}$ that's a number so the Lemma seems to work.

I've to use your test anyway before using any lemma?
What the [italian version of] Wiki calls 'Lemma del piccolo cerchio' is no more than a particular case of the 'residue theorem'. The 'small circle' or 'half small circle' procedure You have to apply to the solution of the integral is symply an expedient to 'cut out' from the integration path particular singularities as brantch points or even 'removable singularities' that aren't treated by the residue theorem...

Kind regards

$\chi$ $\sigma$

11. ## Re: Integral with log and residues

Thanks for help!