Another Frullani integral

We have already seen a Frullani integral here. In this post, we solve another one with a different method.
The Leibniz integral rule is a powerful technique for evaluating definite integrals. Here is how this rule works:
suppose that f(x) is a function of x and some parameter t; for example f(x)=e^{tx} or \displaystyle f(x)=\frac{\cos x}{x^2+t^2}, etc. Then \displaystyle \int_a^b f(x) \ dx is a function of t. Let \displaystyle g(t):=\int_a^b f(x) \ dx. The rule says that, under some simple conditions, \displaystyle g'(t)=\int_a^b \frac{df}{dt} \ dx. So if we can evaluate \displaystyle \int_a^b \frac{df}{dt} \ dx, then we can find g(t) by integrating \displaystyle \int_a^b \frac{df}{dt} \ dx with respect to t.
I don’t prove the Leibniz integral rule here since the proof belongs to multivariable calculus but that doesn’t mean we can’t prove the rule for specific integrals. The following problem is one example.

Problem. Show that if t > 0, then \displaystyle I(t):=\int_0^{\infty} \frac{e^{-tx}-e^{-x}}{x} \ dx=-\ln t.

Solution. First Solution. Let’s first solve the problem using the usual methods of integration. We use integration by parts with \displaystyle e^{-tx}-e^{-x}=u and \displaystyle \frac{dx}{x}=dv. Then du=(e^{-x}-te^{-tx}) \ dx and v=\ln x and so

\displaystyle \begin{aligned}I(t)=\int_0^{\infty}(te^{-tx}-e^{-x})\ln x \ dx=t \int_0^{\infty}e^{-tx}\ln x \ dx - \int_0^{\infty}e^{-x}\ln x \ dx\end{aligned}

\displaystyle \begin{aligned}=\int_0^{\infty}e^{-x}\ln(x/t) \ dx - \int_0^{\infty}e^{-x}\ln x \ dx=-\ln t \int_0^{\infty}e^{-x} dx=-\ln t.\end{aligned}

Notice that we used the convergence of \displaystyle \int_0^{\infty}e^{-x}\ln x \ dx, a fact we proved here.

Second Solution. Before getting into the second solution, see that, assuming we can use the Leibniz integral rule, we must have

\displaystyle I'(t)=\int_0^{\infty}  \frac{d}{dt}\left( \frac{e^{-tx}-e^{-x}}{x}\right) dx=-\int_0^{\infty} e^{-tx}dx=\frac{-1}{t}.

Now, let’s begin the solution. Note that, as we showed here, I(t) is convergent for t > 0. We’re going to use the definition of derivative to prove that \displaystyle I'(t)=\frac{-1}{t}, for all t > 0. That gives I(t)=-\ln t + C for some constant C. But since I(1)=0, we have C=0 and so I(t)=-\ln t.
Now, by the definition of derivative,

\displaystyle I'(t)=\lim_{h\to0} \frac{I(t+h)-I(t)}{h}=-\lim_{h\to0} \int_0^{\infty} \frac{e^{-tx}-e^{-(t+h)x}}{hx} \ dx. \ \ \ \ \ \ \ \ \ \ (*)

Suppose that h > 0. By the mean value theorem, \displaystyle e^{-tx}-e^{-(t+h)x}=hxe^c for some c in the interval (-(t+h)x,-tx). Thus \displaystyle e^{-(t+h)x} < \frac{e^{-tx}-e^{-(t+h)x}}{hx} < e^{-tx} and hence

\displaystyle \frac{1}{t+h} \le \int_0^{\infty} \frac{e^{-tx}-e^{-(t+h)x}}{hx} \ dx \le \frac{1}{t}.

Thus \displaystyle \lim_{h\to0^+} \int_0^{\infty} \frac{e^{-tx}-e^{-(t+h)x}}{hx} \ dx=\frac{1}{t}.
A similar argument shows that \displaystyle \lim_{h\to0^-} \int_0^{\infty} \frac{e^{-tx}-e^{-(t+h)x}}{hx} \ dx=\frac{1}{t} and therefore \displaystyle \lim_{h\to0} \int_0^{\infty} \frac{e^{-tx}-e^{-(t+h)x}}{hx} \ dx=\frac{1}{t}. The result now follows from (*). \ \Box

Example. Show that \displaystyle \int_0^1 \left(\frac{1}{1-x}+\frac{1}{\ln x}\right) \ dx = \gamma, where \gamma is the Euler’s constant.

Solution. You might think that the integral is improper but it is not because

\displaystyle \lim_{x\to0^+}\left(\frac{1}{1-x}+\frac{1}{\ln{x}}\right)=1, \ \ \lim_{x\to1} \left(\frac{1}{1-x}+\frac{1}{\ln{x}}\right)=\frac{1}{2}.

We begin the solution by noting that the inequalities in the example in this post give

\displaystyle 0 < \frac{1}{1-x}+\frac{1}{\ln{x}} < 1, \ \ \ \ \ \ \ \ \ \ \ \ (1)

for x > 0, \ x \ne 1. Now let n > 0 be an integer. Then

\displaystyle \frac{1}{1-x}+\frac{1}{\ln x}=\frac{1-x^n}{1-x}+\frac{1-x^{n-1}}{\ln x}-x^{n-1}\left(\frac{x}{x-1}-\frac{1}{\ln x}\right). \ \ \ \ \ \ \ \ \ \ \ \ \ \ (2)

Clearly

\displaystyle \int_0^1 \frac{1-x^n}{1-x} \ dx=\int_0^1(1+x+ \cdots + x^{n-1}) \ dx = \sum_{i=1}^n \frac{1}{i}. \ \ \ \ \ \ \ \ \ \ \ \ \ \ (3)

Also, the substitution \ln x = -u and the above problem gives

\displaystyle \int_0^1 \frac{1-x^{n-1}}{\ln x} \ dx = \int_0^{\infty} \frac{e^{-nu}-e^{-u}}{u} \ du =-\ln n. \ \ \ \ \ \ \ \ \ \ \ \ \ (4)

Finally, if in (1) we replace x with \displaystyle \frac{1}{x}, we get \displaystyle 0 < \frac{x}{x-1} - \frac{1}{\ln x} < 1 which gives

\displaystyle 0 < \int_0^1 x^{n-1}\left(\frac{x}{x-1}-\frac{1}{\ln x}\right) dx < \frac{1}{n}

and hence

\displaystyle \lim_{n\to\infty} \int_0^1 x^{n-1}\left(\frac{x}{x-1}-\frac{1}{\ln x}\right) dx =0. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (5)

So, by (2)-(5), we have \displaystyle \int_0^1 \left(\frac{1}{1-x}+\frac{1}{\ln x}\right) dx=\lim_{n\to\infty} \left(\sum_{i=1}^n \frac{1}{i}-\ln n\right)=\gamma. \ \Box

Exercise 1. Show that \displaystyle \lim_{h\to0^-} \int_0^{\infty} \frac{e^{-tx}-e^{-(t+h)x}}{hx} \ dx=\frac{1}{t}.

Exercise 2. Show that \displaystyle \int_0^{\infty} \frac{e^{-ax}-e^{-bx}}{x} \ dx=\ln \left(\frac{b}{a}\right) for all real numbers a,b > 0.

Exercise 3. Show that \displaystyle \lim_{x\to0^+}\left(\frac{1}{1-x}+\frac{1}{\ln{x}}\right)=1 and \displaystyle \lim_{x\to1} \left(\frac{1}{1-x}+\frac{1}{\ln{x}}\right)=\frac{1}{2}.

Exercise 4. Given real numbers a,b > -1, show that \displaystyle \int_0^1 \frac{x^a-x^b}{\ln x} \ dx=\ln\left(\frac{a+1}{b+1}\right).
Hint. Make the substitution \ln x =-t and then use Exercise 2.

Exercise 5. For an integer n \ge 1, show that

\displaystyle \int_0^1\frac{x^n}{\ln(1-x)} \ dx=\sum_{k=1}^n(-1)^k\binom{n}{k}\ln(k+1).

Hint. By Exercise 4,

\displaystyle \ln(k+1)=\int_0^1\frac{x^k-1}{\ln x} \ dx.

Exercise 6. Show that

\displaystyle \sum_{n=1}^{\infty}\frac{1}{n+1}\sum_{k=0}^n(-1)^{k+1}\binom{n}{k}\ln(k+1)=\gamma,

where \gamma is the Euler’s constant.
Hint. First use Exercise 5 and then use the above Example.

A Frullani integral

In this post I give an elementary solution to a Frullani’s integral. These integrals are generally solved using more advanced methods such as double integrals or differentiating under the integral sign (Leibniz integral rule).

Problem. Given a positive constant c , let \displaystyle f(x):= \tan^{-1}(cx)-\tan^{-1}x. Show that

(i) \displaystyle \lim_{x\to\infty} f(x) \ln x=\lim_{x\to0+} f(x) \ln x =0.

(ii) \displaystyle \int_0^{\infty} \frac{f(x)}{x} \ dx=\frac{\pi}{2}\ln c.

Solution. (i) We have \displaystyle \lim_{t\to0} \frac{\tan^{-1}t}{t}=1 and so, by L’Hospital rule,

\displaystyle \lim_{x\to0+} f(x)\ln x = \lim_{x\to0+} (cx-x)\ln x = (c-1)\lim_{x\to0+} \frac{\ln x}{x^{-1}}=0,

Also, since \displaystyle \tan^{-1}t + \tan^{-1}(t^{-1})=\frac{\pi}{2}, for t > 0, we have \displaystyle \lim_{t\to+\infty}\frac{\frac{\pi}{2}-\tan^{-1}t}{t^{-1}}=1 and thus

\displaystyle \lim_{x\to\infty} f(x)\ln x = \lim_{x\to\infty} \left( \frac{1}{x}-\frac{1}{cx} \right)\ln x = \frac{c-1}{c} \lim_{x\to\infty} \frac{\ln x}{x}=0,

by L’Hospital rule.

(ii) We start with integration by parts: \displaystyle f(x)=u, \ \frac{dx}{x}=dv. Then (i) gives

\displaystyle \begin{aligned} \int_0^{\infty} \frac{f(x)}{x} \ dx= \int_0^{\infty} f'(x) \ln x \ dx =\int_0^{\infty} \left( \frac{c}{c^2x^2+1}-\frac{1}{x^2+1} \right) \ln x \ dx \\ =\frac{1}{c}\int_0^{\infty} \frac{\ln x}{x^2+c^{-2}} \ dx -\int_0^{\infty} \frac{\ln x}{x^2+1} \ dx \end{aligned}

and we are done, by this problem. \Box

Exercise 1. Given positive constants a,b, evaluate \displaystyle \int_0^{\infty} \frac{\tan^{-1}(ax)-\tan^{-1}(bx)}{x} \ dx.

Exercise 2. Show that \displaystyle \int_0^{\infty} \frac{\tan^{-1}x}{x} \ dx is divergent.
Hint. One way is to look at the function \displaystyle y=\tan^{-1}x - \frac{x}{x+1}, \ x \ge 0.