## The power series \sum k^n*x^k and Eulerian numbers (1)

Let’s start with the geometric series $\displaystyle f(x):=\sum_{k=0}^ {\infty}x^k=\frac{1}{1-x}, \ |x| < 1.$ Then differentiating and multiplying by $x$ gives
$\displaystyle xf'(x)=\sum_{k=1}^{\infty}kx^k=\frac{x}{(1-x)^2}, \\ x(xf'(x))'=\sum_{k=1}^{\infty}k^2x^k=\frac{x(x+1)}{(1-x)^3}, \\ x(x(xf'(x))')'=\sum_{k=1}^{\infty}k^3x^3=\frac{x(x^2+4x+1)}{(1-x)^4},$
etc. An easy induction over $n \ge 1$ shows that
$\displaystyle \sum_{k=1}^{\infty}k^nx^k=\frac{xA_n(x)}{(1-x)^{n+1}}, \ \ \ \ \ \ \ (*)$
where $A_n(x)$ is a polynomial of degree $n-1$ in $x.$

Definition. In $(*),$ the coefficients of $A_n(x)$ are called Eulerian numbers and are denoted by $\text{E}(n,i), \ n \ge 1, \ 0 \le i \le n-1.$ So $\displaystyle A_n(x)=\sum_{i=0}^{n-1}\text{E}(n,i)x^i.$ We define $\text{E}(n,i)=0$ for $i \ge n.$

Problem. Show that $\displaystyle \text{E}(n,i)=\sum_{j=0}^i(-1)^j \binom{n+1}{j}(i-j+1)^n$ for all $i,n.$

Solution. We have from $(*)$ that $\displaystyle (1-x)^{n+1} \sum_{k=1}^{\infty}k^nx^k=xA_n(x)$ and thus
$\displaystyle \sum_{j=0}^{n+1}(-1)^j \binom{n+1}{j}x^j \sum_{k=0}^{\infty}(k+1)^nx^k=A_n(x)=\sum_{i=0}^n \text{E}(n,i)x^i.$
It is clear now that, on the left-hand side of the above equality, the coefficient of $x^i, \ i \ge 0,$ is $\displaystyle \sum_{j=0}^i(-1)^j \binom{n+1}{j}(i-j+1)^n. \ \Box$

Example. So, by the above problem, $\displaystyle \text{E}(n,0)=1.$ Also
$\displaystyle \text{E}(n,1)=\sum_{j=0}^1 (-1)^j \binom{n+1}{j}(2-j)^n=2^n -n-1,$ $\displaystyle \text{E}(n,2)=\sum_{j=0}^2 (-1)^j \binom{n+1}{j}(3-j)^n=3^n - (n+1)2^n + \binom{n+1}{2},$
etc.

Exercise 1. Given $i \ge 0,$ evaluate $\displaystyle \lim_{n\to\infty} \frac{\text{E}(n,i)}{(i+1)^n}.$

Exercise 2. Show that $\displaystyle \sum_{k=1}^{\infty}k^4x^{k-1}=\frac{x^3+11x^2+11x+1}{(1-x)^5}. \ |x| < 1.$

Exercise 3. Given $n \ge 1,$ can you find the value of $\text{E}(n,n-1) ?$

## Limit of integrals (4)

Problem. Given a real constant $\alpha > 0,$ consider the following sequences $\displaystyle a_n:=\int_0^1 \frac{(x+1)^n-1}{x}dx, \ \ b_n:=\int_0^1 (x^{\alpha}+1)^n \ dx.$ Show that
(i) $\displaystyle \lim_{n\to\infty}\frac{n}{2^n}a_n=2.$
(ii) $\displaystyle \lim_{n\to\infty} \frac{n}{2^n}b_n=\frac{2}{\alpha}.$

Solution. (i) We have $\displaystyle a_n=\int_0^1 \sum_{k=1}^{n} (x+1)^{k-1} dx=\sum_{k=1}^n \frac{2^k-1}{k}.$ Let $\displaystyle c_n:=\frac{n}{2^n}a_n, \ n \ge 1.$ Finding a lower bound for $c_n$ that goes to $2$ as $n \to\infty$ is very easy.
$\displaystyle c_n=\frac{n}{2^n}\sum_{k=1}^n \frac{2^k-1}{k} \ge \frac{n}{2^n} \sum_{k=1}^n \frac{2^k-1}{n}=2-\frac{n+2}{2^n}. \ \ \ \ \ \ \ (1)$
Finding an upper bound that goes to $2$ as $n \to\infty$ is less trivial.
$\displaystyle c_n \le \frac{n}{2^n}\sum_{k=1}^n \frac{2^k}{k}=1+\sum_{k=1}^{n-1}\frac{n}{k2^{n-k}}=2-\frac{1}{2^{n-1}}+\sum_{k=1}^{n-1}\frac{n-k}{k2^{n-k}}.$
But, from the MacLaurin series of $e^x,$ we know that $\displaystyle 2^{n-k}=e^{(\ln 2)(n-k)} \ge \frac{1}{2}(\ln 2)^2(n-k)^2.$ Thus
$\displaystyle c_n \le 2-\frac{1}{2^{n-1}}+\frac{2}{(\ln 2)^2}\sum_{k=1}^{n-1} \frac{1}{k(n-k)}=2-\frac{1}{2^{n-1}}+\frac{4}{(\ln 2)^2 n}\sum_{k=1}^{n-1}\frac{1}{k}= \\ 2-\frac{1}{2^{n-1}}+\frac{4}{(\ln 2)^2n} \left(\sum_{k=1}^{n-1} \frac{1}{k} - \ln(n-1) \right)+\frac{4\ln(n-1)}{(\ln 2)^2 n}. \ \ \ \ \ \ \ (2)$
Now $(1)$ and $(2)$ together with this fact that $\displaystyle \lim_{n\to\infty}\left(\sum_{k=1}^{n-1} \frac{1}{k} - \ln(n-1) \right)$ exists and is finite (it’s the Euler’s constant $\gamma$), complete the solution of this part.
(ii) We obviously have $x^{\alpha}+1 \ge 2 \sqrt{x^{\alpha}}$ and so
$\displaystyle b_n \ge \int_0^1 2^n x^{\frac{n\alpha}{2}} dx=\frac{2^{n+1}}{n\alpha+2}. \ \ \ \ \ \ \ (3)$
On the other hand, the substitution $x^{\alpha}=t$ gives $\displaystyle b_n=\frac{1}{\alpha} \int_0^1 (t+1)^{n-1}t^{\frac{1}{\alpha}-1} \ dt.$ Thus
$\displaystyle b_n=\frac{1}{\alpha} \int_0^1 \frac{(t+1)^n-1}{t}t^{\frac{1}{\alpha}} \ dt + 1 \le \frac{1}{\alpha} \int_0^1 \frac{(t+1)^n-1}{t} \ dt + 1=\frac{1}{\alpha}a_n + 1. \ \ \ \ \ \ \ (4)$
The result now follows from $(3), \ (4)$ and (i). $\Box$

Exercise 1. Let $\{c_n\}$ be the sequence in the solution of part (i) of the problem; that is $\displaystyle c_n=\frac{n}{2^n}\sum_{k=1}^n \frac{2^k-1}{k}.$ Show that $\displaystyle c_{n+1}=\frac{n+1}{2n}c_n+1-\frac{1}{2^{n+1}}, \ n \ge 1,$ and use this relation to prove (by induction over $n$) that $\displaystyle 2 < c_n < 2+\frac{1}{\sqrt{n}}$ for $n \ge 4.$
Exercise 2. Show that $\displaystyle \lim_{n\to\infty} \frac{n}{2^n} \sum_{k=1}^n \frac{\binom{n}{k}}{k}=2.$

## Integral of ln(1-x)ln(1+x)

Problem. Evaluate $\displaystyle I:=\int_0^1 \ln(1-x)\ln(1+x) \ dx.$

Solution. Integration by parts $\ln(x+1)=u$ and $\ln(1-x) \ dx = dv$ gives $\displaystyle I=2-2\ln 2 + 2\int_0^1 \frac{\ln x}{2-x} \ dx.$
The substitution $2-x=2t$ now gives us
$\displaystyle I=2(\ln 2)^2-2\ln 2 + 2+ 2 \int_{0.5}^1 \frac{\ln(1-t)}{t} \ dt. \ \ \ \ \ \ \ (*)$
But we showed here that $\displaystyle f(x):=\sum_{n=1}^{\infty} \frac{x^n}{n^2}=-\int_0^x \frac{\ln(1-t)}{t} \ dt, \ x \in [-1,1],$ and $\displaystyle f(0.5)=\frac{\pi^2}{12}-\frac{1}{2}(\ln 2)^2.$ Thus, by $(*),$
$\displaystyle I=2(\ln 2)^2-2\ln 2 + 2 + 2(f(0.5)-f(1))=(\ln 2)^2 - 2\ln 2 + 2 - \frac{\pi^2}{6}. \ \Box$

## 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 $\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,$ by L’Hospital rule.
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 \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$
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.$

## Integral of e^(-x^2)ln(x)

Problem. Show that $\displaystyle I:=\int_0^{\infty} e^{-x^2}\ln x \ dx = \frac{-(\gamma + 2\ln 2)\sqrt{\pi}}{4},$ where $\gamma$ is the Euler’s constant.

Solution. The solution is similar to how we proved $\displaystyle \gamma=-\int_0^{\infty} e^{-x}\ln x \ dx = \lim_{n\to\infty} \left(\sum_{i=1}^n \frac{1}{i}-\ln n \right).$
For integer $k \ge 0,$ we let $\displaystyle J_k:=\int_0^{\infty} x^{2k}e^{-x^2}dx.$ It is quite straightforward (see the exercise in this post) to show that
$\displaystyle J_k= \frac{(2k)! \sqrt{\pi}}{2^{2k+1}k!}=\frac{(2k)!}{4^k k!}J_0. \ \ \ \ \ \ \ (1)$
Now, back to the problem, integration by parts with $u=e^{-x^2}, \ dv=\ln x \ dx$ gives $\displaystyle I=\int_0^{\infty} e^{-x^2}\ln x \ dx=2\int_0^{\infty}x^2e^{-x^2}\ln x \ dx-2J_1.$
So, again, integration by parts with $u=e^{-x^2}, \ dv=x^2\ln x \ dx$ gives $\displaystyle I=\frac{2^2}{1\cdot 3}\int_0^{\infty}x^4e^{-x^2}\ln x \ dx - \frac{2^2}{1 \cdot 3^2}J_2-2J_1.$
If we keep using integration by parts with $u=e^{-x^2}, \ dv=x^{2m}\ln x \ dx$ we will see that for all integers $n \ge 1$ we have
$\displaystyle I=\frac{2^n}{1 \cdot 3 \cdot 5 \cdots (2n-1)}\int_0^{\infty}x^{2n}e^{-x^2}\ln x \ dx - \sum_{k=1}^n \frac{2^k}{1 \cdot 3 \cdot 5 \cdots (2k-3)(2k-1)^2}J_k=\frac{4^n n!}{(2n)!} \int_0^{\infty}x^{2n}e^{-x^2}\ln x \ dx - \sum_{k=1}^n\frac{4^k k!}{(2k-1)(2k)!}J_k.$
Therefore, by $(1),$ we have
$\displaystyle I=\frac{4^n n!}{(2n)!} \int_0^{\infty}x^{2n}e^{-x^2}\ln x \ dx - \sum_{k=1}^n\frac{1}{2k-1}J_0. \ \ \ \ \ \ \ (2)$
In the integral on the right-hand side of $(2)$ we write $\displaystyle \ln x = \ln \left(\frac{x}{\sqrt{n}} \right)+\ln \sqrt{n}$ and then we put $x = \sqrt{n}t$ to get
$\displaystyle I= \frac{4^n n!}{(2n)!} \int_0^{\infty}x^{2n}e^{-x^2} \ln \left(\frac{x}{\sqrt{n}} \right) dx + \frac{4^n n!}{(2n)!} \ln (\sqrt{n}) J_n- \sum_{k=1}^n\frac{1}{2k-1}J_0 = \\ \frac{4^n n!n^{n+\frac{1}{2}}}{(2n)!} \int_0^{\infty}t^{2n}e^{-nt^2} \ln t \ dt + \frac{\ln n}{2} J_0- \sum_{k=1}^n\frac{1}{2k-1}J_0.$
Thus, by this problem,
$\displaystyle I=\lim_{n\to\infty} \left( \frac{1}{2}\ln n - \sum_{k=1}^n\frac{1}{2k-1} \right)J_0=\frac{\sqrt{\pi}}{2} \lim_{n\to\infty} \left( \frac{1}{2}\ln n - \sum_{k=1}^n\frac{1}{2k-1} \right). \ \ \ \ \ \ \ (3)$
Now for integer $m \ge 1,$ let $\displaystyle s_m=\sum_{i=1}^m \frac{1}{i}.$ Then $\displaystyle \frac{1}{2} \ln n - \sum_{k=1}^n \frac{1}{2k-1}= - \ln 2 -(s_{2n}-\ln (2n))+\frac{1}{2}(s_n-\ln n)$
and so $\displaystyle \lim_{n\to\infty} \left( \frac{1}{2}\ln n - \sum_{k=1}^n\frac{1}{2k-1} \right)=-\ln 2 - \frac{1}{2} \gamma.$ The result now follows from $(3). \ \Box$

## Limit of integrals (3)

Problem. Define the sequence $\{c_n\}$ by $\displaystyle c_n= \frac{4^n n! n^{n+\frac{1}{2}}}{(2n)!} \int_0^{\infty} x^{2n}e^{-nx^2} \ln x \ dx .$ Show that $\displaystyle \lim_{n\to\infty} c_n=0.$

Solution. The problem and its solution is quite similar to this one.
Since $e^x \ge x+1,$ for all $x,$ we have $\displaystyle 1-\frac{1}{x} \le \ln x \le x-1$ for all $x > 0.$ Thus $\displaystyle 1-\frac{1}{x^2} \le 2 \ln x \le x^2-1$ for all $x > 0$ and hence for all $n$ we have $\displaystyle (x^{2n}-x^{2n-2})e^{-nx^2} \le 2 x^{2n}e^{-nx^2}\ln x \le (x^{2n+2}-x^{2n})e^{-nx^2}, \ \ \ \ \ \ \ (*)$
Now, for integers $k \ge 0,$ let $\displaystyle J_k: = \int_0^{\infty}x^{2k}e^{-x^2} dx.$ Integration by parts gives $\displaystyle J_k=\frac{(2k)!}{4^k k!}J_0$ (see the exercise in this post). Also the substitution $\sqrt{n}x=t$ gives $\displaystyle \int_0^{\infty}x^{2k}e^{-nx^2}dx=\frac{1}{n^{k+\frac{1}{2}}}J_k.$ Therefore integrating $(*)$ over the interval $(0,\infty)$ will give us $\displaystyle \frac{-1}{4n-2}J_0 \le c_n \le \frac{1}{4n}J_0$ and the result follows. $\Box$

## Integral of e^(-x^2)

Problem. Show that $\displaystyle \int_0^{\infty} e^{-x^2}dx = \frac{\sqrt{\pi}}{2}.$

Solution. Let $x \in [0,1].$ We have $\displaystyle 1-x^2 \le e^{-x^2} \le \frac{1}{1+x^2}$ because, as we showed in part (i) of this problem, $e^x \ge 1+x$ for all $x.$ Thus $\displaystyle (1-x^2)^n \le e^{-nx^2} \le \frac{1}{(1+x^2)^n}$ for all integers $n \ge 1$ and hence
$\displaystyle \int_0^1 (1-x^2)^n dx \le \int_0^1 e^{-nx^2} dx \le \int_0^1 \frac{dx}{(1+x^2)^n}. \ \ \ \ \ \ \ (1)$
Let’s define the sequence $\{a_n\}, \ n \ge 0,$ by $\displaystyle a_n= \frac{\binom{2n}{n}}{4^n}.$
Now the substitution $x = \cos t$ gives us $\displaystyle \int_0^1(1-x^2)^n dx=\int_0^{\frac{\pi}{2}} \sin^{2n+1}t \ dt.$ Thus, by part (i) of this problem, we have
$\displaystyle \int_0^1(1-x^2)^n dx=\frac{1}{(2n+1)a_n}. \ \ \ \ \ \ \ (2)$
Also, the substitution $nx^2 = y^2$ gives us
$\displaystyle \int_0^1 e^{-nx^2} dx=\frac{1}{\sqrt{n}}\int_0^{\sqrt{n}} e^{-y^2}dy. \ \ \ \ \ \ \ (3)$
Finally, the substitution $x=\tan s$ gives us $\displaystyle \int_0^1 \frac{dx}{(1+x^2)^n} \le \int_0^{\infty} \frac{dx}{(1+x^2)^n}=\int_0^{\frac{\pi}{2}}\cos^{2n-2}s \ ds=\int_0^{\frac{\pi}{2}}\sin^{2n-2}s \ ds.$
Thus, again by part (i) of the same problem, we have
$\displaystyle \int_0^1 \frac{dx}{(1+x^2)^n} \le \frac{\pi}{2}a_{n-1}, \ \ \ \ \ \ \ (4)$
So $(1), (2), (3)$ and $(4)$ give the following inequalities
$\displaystyle \frac{\sqrt{n}}{(2n+1)a_n} \le \int_0^{\sqrt{n}} e^{-y^2}dy \le \frac{\pi}{2}\sqrt{n}a_{n-1}. \ \ \ \ \ \ \ (5)$
Now, by part (ii) of the problem that I have already used twice, we have $\displaystyle \lim_{n\to\infty} \frac{\sqrt{n}}{(2n+1)a_n}=\lim_{n\to\infty} \frac{\pi}{2}\sqrt{n}a_{n-1}=\frac{\sqrt{\pi}}{2}$ and therefore, by $(5),$ $\displaystyle \int_0^{\infty}e^{-y^2}dy=\lim_{n\to\infty} \int_0^{\sqrt{n}} e^{-y^2}dy=\frac{\sqrt{\pi}}{2}. \ \Box$

Remark. The solution we have given here is quite elementary. There are many more solutions and you can find them here.

Exercise. Show that $\displaystyle \int_0^{\infty}x^{2n+1}e^{-x^2}dx=\frac{n!}{2}$ and $\displaystyle \int_0^{\infty}x^{2n}e^{-x^2}dx=\frac{(2n)! \sqrt{\pi}}{2^{2n+1}n!}$ for all integers $n \ge 0.$