Improper integral involving ln

jacobi

Active member
How would I evaluate $$\displaystyle \int_0^\infty \frac{\ln(x)}{1+x^2} dx$$?

Opalg

MHB Oldtimer
Staff member
How would I evaluate $$\displaystyle \int_0^\infty \frac{\ln(x)}{1+x^2} dx$$?
If you know about contour integration, integrate it round a keyhole contour.

ZaidAlyafey

Well-known member
MHB Math Helper
How would I evaluate $$\displaystyle \int_0^\infty \frac{\ln(x)}{1+x^2} dx$$?
$$\displaystyle \int_0^\infty \frac{\ln(x)}{1+x^2} dx = -\int_0^\infty \frac{\ln(x)}{1+x^2} dx$$

Actually this can be generalized to

$$\displaystyle \int_0^\infty \frac{\ln(x)^{2n+1}}{1+x^2} dx =0$$

On the other hand

$$\displaystyle \int_0^\infty \frac{\ln(x)^{2n}}{1+x^2} dx$$

Can be solved using complex analysis approaches .

jacobi

Active member
Could I use differentiation under the integral sign or any elementary integration techniques to do it? I don't know complex analysis

ZaidAlyafey

Well-known member
MHB Math Helper
Could I use differentiation under the integral sign or any elementary integration techniques to do it? I don't know complex analysis
There is no need to use complex analysis .The integral is equal to $0$ as I pointed to prove that make the substitution $x = \frac{1}{t}$ which reslults in $I = -I$ only possibly if $I=0$.

jacobi

Active member
Oh, I see. Thanks!

chisigma

Well-known member
How would I evaluate $$\displaystyle \int_0^\infty \frac{\ln(x)}{1+x^2} dx$$?
Integrals of this type are solved in elementary way with the procedure described in...

http://mathhelpboards.com/math-notes-49/integrals-natural-logarithm-5286.html

This integral however is 'even more elementary' because splitting the integral in two parts and with the substitution $x= \frac{1}{t}$ in the second part You obtain...

$\displaystyle \int_{0}^{\infty} \frac{\ln x}{1 + x^{2}}\ dx = \int_{0}^{1} \frac{\ln x}{1 + x^{2}}\ dx + \int_{1}^{\infty} \frac{\ln x}{1 + x^{2}}\ dx = \int_{0}^{1} \frac{\ln x}{1 + x^{2}}\ dx - \int_{0}^{1} \frac{\ln t}{1 + t^{2}}\ dt =0\ (1)$

Kind regards

$\chi$ $\sigma$

chisigma

Well-known member
If you know about contour integration, integrate it round a keyhole contour.
The exact value of the integral, obtained in absolutely elementary way, is zero and that allows us to do an interesting analysis about the keyhole contour integration when a logarithm is in the function to be integrated. Before doing that it is necessary to answer to the following question: what is the principal value of $\displaystyle \ln (e^{i\ \theta})$ for $0 \le \theta < 2 \pi$?... Most of the 'Holybooks' report the discontinous function that also 'Monster Wolfram' reports...

ln (e^(i x)) x from 0 to 2 pi - Wolfram|Alpha+

In my opinion such a definition is questionable because if we intend to integrate the function $\displaystyle f(z)= \frac{\ln z}{1+z^{2}}$ along the path illustrated in the figure...

... we find that that's impossible because the discontinuity of the term $\ln z$ when the negative x axis is crossed. If we adopt the 'more logical' definition...

$\displaystyle \ln (e^{i\ \theta}) = i\ \theta,\ 0 \le \theta < 2\ \pi\ (1)$

... we find that f(z) has two poles in z=i and z=-i and one 'brantch point' in z=0, so that keyhole integration alonf the path of the figure can be performed. First step is to compute the residues...

$\displaystyle r_{1}= \lim_{z \rightarrow i} f(z)\ (z-i) = \frac{\pi}{4}$

$\displaystyle r_{2}= \lim_{z \rightarrow - i} f(z)\ (z+i) = - \frac{3\ \pi}{4}\ (2)$

... so that the integral along the path of the figure is...

$\displaystyle \int_{A B C D} f(z)\ dz = i\ \int_{0}^{2\ \pi} \frac{R\ (\ln R + i\ \theta)}{1 + R^{2}\ e^{2\ i\ \theta}}\ e^{i\ \theta}\ d \theta + \int_{R}^{r} \frac{\ln x}{1+x^{2}}\ dx + 2\ \pi\ i\ \int_{R}^{r} \frac{d x}{1+x^{2}} +$

$\displaystyle +i\ \int_{2\ \pi}^{0} \frac{r\ (\ln r + i\ \theta)}{1 + r^{2}\ e^{2\ i\ \theta}}\ e^{i\ \theta}\ d \theta + \int_{r}^{R} \frac{\ln x}{1 + x^{2}}\ d x = 2\ \pi\ i\ (r_{1} + r_{2})= - i\ \pi^{2}\ (3)$

Now if we push r to 0 and R to infinity we find that the first and fourth term vanishes and (3) is reduced to the trivial identity $- i\ \pi^{2} = -i\ \pi^{2}$ that doesn't give any information about the value of the integral $\displaystyle \int_{0}^{\infty} \frac{\ln x}{1 + x^{2}}\ dx$. May be that some different way has to be found...

Kind regards

$\chi$ $\sigma$

DreamWeaver

Well-known member
Here's an alternative evaluation for

$$\displaystyle \int_z^{\infty}\frac{\log x}{(1+x^2)}\,dx$$

For the sake of simplicity, I'll assume z > 1 here, although it's not particularly complicated if z <1. Make the reciprocal substitution $$\displaystyle x \to 1/y\,$$ to obtain :

$$\displaystyle \int_z^{\infty}\frac{\log x}{(1+x^2)}\,dx=\int_0^{1/z}\frac{\log(1/y)}{1+(1/y)^2}\frac{dy}{y^2}=$$

$$\displaystyle -\int_0^{1/z}\frac{\log x}{(1+x^2)}\,dx=\log z\tan^{-1}(1/z)+\int_0^{1/z}\frac{\tan^{-1}x}{x}\,dx$$

That last integral is the Inverse Tangent Integral, a transcendental function in it's own right defined by:

$$\displaystyle \text{Ti}_2(z)=\int_0^z\frac{\tan ^{-1}t}{t}\,dt$$

$$\displaystyle \int_z^{\infty}\frac{\log x}{(1+x^2)}\,dx=\log z\tan^{-1}(1/z)+\text{Ti}_2(1/z)$$

Incidentally, by noting that

$$\displaystyle \tan^{-1}x+\cot^{-1}x=\tan^{-1}x+\tan^{-1}(1/x)=\frac{\pi}{2}$$

it is easy enough to deduce the inversion relation for the Inverse Tangent Integral:

$$\displaystyle \text{Ti}_2(z)+\text{Ti}_2(1/z)=\int_0^z\frac{\tan ^{-1}t}{t}\,dt+\int_0^z\frac{\tan ^{-1}(1/t)}{t}\,dt=$$

$$\displaystyle \frac{\pi}{2}\int_0^z\frac{dt}{t}=\frac{\pi}{2} \log z$$

So the final evaluation of your integral could just as easily be re-written as:

$$\displaystyle \int_z^{\infty}\frac{\log x}{(1+x^2)}\,dx=\log z\cot^{-1}z+\frac{\pi}{2} \log z-\text{Ti}_2(z)$$

I hope that helps!

Gethin

DreamWeaver

Well-known member
Furthermore, note that

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

$$\displaystyle \int_0^{\pi/2}\log(\sin x)\,dx-\int_0^{\pi/2}\log(\cos x)\,dx= 0$$

Since

$$\displaystyle \int_0^{\pi/2}\log(\sin x)\,dx=\int_0^{\pi/2}\log(\cos x)\,dx=-\frac{\pi}{2}\log 2$$

Follow the link for a bit more about the Inverse tangent integral... Inverse tangent integral : Special Functions

DreamWeaver

Well-known member
$$\displaystyle \int_0^\infty \frac{\ln(x)}{1+x^2} dx = -\int_0^\infty \frac{\ln(x)}{1+x^2} dx$$

Actually this can be generalized to

$$\displaystyle \int_0^\infty \frac{\ln(x)^{2n+1}}{1+x^2} dx =0$$

On the other hand

$$\displaystyle \int_0^\infty \frac{\ln(x)^{2n}}{1+x^2} dx$$

Can be solved using complex analysis approaches .

Hello Z!

Your results above have a very simple explanation... ( I know you know this, I just thought it worth adding to this 'ere thread )

Let

$$\displaystyle \mathcal{T}_m(\theta)=\int_0^{\theta}\log^m(\tan x)\,dx$$

Substituting $$\displaystyle y=\tan x\,$$ in $$\displaystyle \mathcal{T}_m(\theta)\,$$ and setting $$\displaystyle \theta=\pi/4\,$$ yields

$$\displaystyle \mathcal{T}_m(\pi/4)=\int_0^{\pi/4}\log^m(\tan x)\,dx=\int_0^1\frac{(\log x)^m}{(1+x^2)}\,dx$$

Now expand the denominator $$\displaystyle (1+x^2)^{-1}\,$$ into the infinite series

$$\displaystyle \frac{1}{(1+x^2)}=\sum_{k=0}^{\infty}(-1)^kx^{2k}$$

and insert that into the integral:

$$\displaystyle \int_0^1\frac{(\log x)^m}{(1+x^2)}\,dx=\sum_{k=0}^{\infty}\int_0^1x^{2k}(\log x)^m\,dx$$

But...

$$\displaystyle \int_0^1x^n(\log x)^m\,dx = \frac{(-1)^mm!}{(n+1)^{m+1}}$$

Hence

$$\displaystyle \int_0^1\frac{(\log x)^m}{(1+x^2)}\,dx=(-1)^mm!\,\sum_{k=0}^{\infty}\frac{(-1)k}{(2k+1)^{m+1}}$$

This is none other than the Dirichlet Beta function, defined by:

$$\displaystyle \beta(x)=\sum_{k=0}^{\infty}\frac{(-1)^k}{(2k+1)^x}$$

Which, amongst others, has the special value $$\displaystyle \beta(2) = G\,$$ (Catalan's contsant).

So

$$\displaystyle \int_0^{\pi/4}\log^m(\tan x)\,dx=(-1)^mm!\,\beta(m+1)$$

Finally, observe that

$$\displaystyle \int_0^{\pi/4}\log^m(\tan x)\,dx+\int_{\pi/4}^{\pi/2}\log^m(\tan x)\,dx=\int_0^{\pi/2}\log^m(\tan x)\,dx$$

Substitute $$\displaystyle x=\pi/2-y\,$$ in the second integral to get

$$\displaystyle \int_0^{\pi/4}\log^m(\tan x)\,dx-\int_{\pi/4}^0\log^m(\cot x)\,dx=$$

$$\displaystyle \int_0^{\pi/4}\log^m(\tan x)\,dx+(-1)^m\int_0^{\pi/4}\log^m(\tan x)\,dx=$$

$$\displaystyle [1+(-1)^m]m!\,\beta(m+1)$$

Hence

$$\displaystyle \int_0^{\pi/2}\log^{2m}(\tan x)\,dx=2\, m!\,\beta(2m+1)$$

and

$$\displaystyle \int_0^{\pi/2}\log^{2m+1}(\tan x)\,dx=0$$

wdavidjones1968

New member
How would I evaluate $$\displaystyle \int_0^\infty \frac{\ln(x)}{1+x^2} dx$$?
First change the variable. Substitute for x such x = exp(t). Then the derivative of x is exp(t) dt.

The limits of the new integral are the same.

Next, turn to the contour. Instead of a circle or semi-circle, use a rectangle. The lower bound is the real axis, from -R to R; the upper bound is parallel and above the real axis at -R + i\pi to R + i\pi. The left boundary goes from the real axis at -R to the line parallel axis from -R + i\pi to R + i\pi. A similar situation exists for the right boundary.

Why i\pi?