# How can one show that $\int_{0}^{\infty}\left({1\over 1+nx^n}-e^{-nx^n}\right)\cdot{\mathrm dx\over x^{1+n}}=1-\gamma?$

Consider

$$\int_{0}^{\infty}\left({1\over 1+nx^n}-e^{-nx^n}\right)\cdot{\mathrm dx\over x^{1+n}}=1-\gamma\tag1$$ $n\ge1$;(integers)

n seem to be not involved in the closed form(why?)

How does one show that $(1)$ converges to $1-\gamma?$

An attempt:

$$(1+nx^n)^{-1}=1-nx^n+(nx^n)^2-(nx^n)^3+\cdots$$

$(1)$ becomes

$$\int_{0}^{\infty}\left(x^{-n-1}-nx^{-1}+n^2x^{n-1}-n^3x^{2n-1}+\cdots-{e^{-nx^n}\over x^{n+1}}\right)\mathrm dx\tag2$$

$(2)$ divgerges, how else can we tackle $(1)$?

Or do we have to differentiate m times w.r.t n

• setting $x^n=y$ the $n$-dependence in your eqn $(1)$ cancels out trivially – tired Feb 22 '17 at 7:55
• @tired. Is it $n x^n=y$ instead ? – Claude Leibovici Feb 22 '17 at 8:24
• @ClaudeLeibovici: you are right. it appears "tired" left that part for readers. – Paramanand Singh Feb 22 '17 at 8:27
• To get good ideas for solving it see math.stackexchange.com/questions/980593/… . – user90369 Feb 22 '17 at 11:19

If you change variable $n x^n=y$, almost as suggested by tired in his comment, you end with $$\int_{0}^{\infty}\left({1\over 1+nx^n}-e^{-nx^n}\right)\cdot{\mathrm dx\over x^{1+n}}=\int_{0}^{\infty}\frac{\frac{1}{y+1}-e^{-y}}{y^2}\,dy$$ The antiderivative is given by $$\int\frac{\frac{1}{y+1}-e^{-y}}{y^2}\,dy=\text{Ei}(-y)+\frac{e^{-y}}{y}-\frac{1}{y}-\log (y)+\log (y+1)=f(y)$$ where appears the exponential integral.

Since $\lim_{y\to \infty } \, f(y)=0$, we are left with $\lim_{y\to 0 } \, f(y)$.

Using asymptotics , $$\text{Ei}(-y)=\gamma+\log (y) -y+\frac{y^2}{4}+O\left(y^3\right)$$ and Taylor series for small values of $y$

$$f(y)=(\gamma -1)+\frac{y}{2}-\frac{5 y^2}{12}+O\left(y^3\right)$$ which then leads to the result.

• I never used non-elementary anti-derivarives for evaluating integrals, but then my experience with evaluating integrals is very limited. +1 – Paramanand Singh Feb 22 '17 at 9:20
• @ParamanandSingh. The problem was becoming quite simple after the change of variable. One integration by parts leads to the definition of the exponential integral function. To me, it is always surprizing to notice on this site how often special functions appear in questions and answers. – Claude Leibovici Feb 22 '17 at 9:26
• All that can be done with special functions can be done without special function. But it would be very tedious, with closed forms replaced by big expressions. No special function available means going back to the Flood, in depriving us of the background from centuries of mathematical works. – JJacquelin Feb 22 '17 at 11:13
• @JJacquelin. Hi Jean ! I totally agree with you and your answer is nice. What I found interesting was to be able to approximate quite well $\int_\epsilon^\infty \cdots\,dy$ – Claude Leibovici Feb 22 '17 at 11:24

Claude Leibovicy already send a nice answer, while I was still typing.

Nevertheless, I joint my answer. Even if not smart, solving by brute force :

$$I= \int_{0}^{\infty}\frac{\frac{1}{x+1}-e^{-x}}{x^2}\,dx$$

Let

$$I(s)= \int_{0}^{\infty}\frac{x^{s-1}}{x+1}-x^{s-1}e^{-x}\,dx =\Gamma(s)\Gamma(1-s)-\Gamma(s)$$

Taking the limit

$$\lim_{s \to -1}\Gamma(s)\Gamma(1-s)-\Gamma(s)$$

Near $-1$ we have

$$\Gamma(s)\Gamma(1-s)-\Gamma(s) = -\frac{1}{s+1}+\frac{1}{s+1}-\gamma+1+O((s+1))$$

Hence

$$I= \int_{0}^{\infty}\frac{\frac{1}{x+1}-e^{-x}}{x^2}\,dx = 1-\gamma$$

$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} &\int_{0}^{\infty}\pars{{1 \over 1 + nx^{n}} - \expo{-nx^{n}}} \,{\dd x\over x^{1 + n}} \,\,\,\stackrel{y\ =\ nx^{n}}{=}\,\,\, \int_{0}^{\infty}\pars{{1 \over y + 1} - \expo{-y}}\,{\dd y \over y^{2}} \\[5mm] = &\ \lim_{\epsilon \to 0^{+}}\bracks{% \int_{\epsilon}^{\infty}{\dd y \over y^{2}} - \int_{\epsilon}^{\infty}\pars{{1 \over y} - {1 \over y + 1}}\dd y - \int_{\epsilon}^{\infty}{\expo{-y} \over y^{2}}\,\dd y} \\[5mm] = &\ \lim_{\epsilon \to 0^{+}}\bracks{% {1 \over \epsilon} + \ln\pars{\epsilon \over \epsilon + 1} - {\expo{-\epsilon} \over \epsilon} + \int_{\epsilon}^{\infty}{\expo{-y} \over y}\,\dd y} \\[5mm] = &\ \lim_{\epsilon \to 0^{+}}\bracks{% {1 \over \epsilon} + \ln\pars{\epsilon \over \epsilon + 1} - {\expo{-\epsilon} \over \epsilon} - \ln\pars{\epsilon}\expo{-\epsilon} + \int_{\epsilon}^{\infty}\ln\pars{y}\expo{-y}\,\dd y} \\[5mm] = & \underbrace{\lim_{\epsilon \to 0^{+}}\bracks{% {1 \over \epsilon} + \ln\pars{\epsilon \over \epsilon + 1} - {\expo{-\epsilon} \over \epsilon} - \ln\pars{\epsilon}\expo{-\epsilon}}}_{\ds{=\ 1}}\ +\ \underbrace{\int_{0}^{\infty}\ln\pars{y}\expo{-y}\,\dd y}_{\ds{=\ -\gamma}} = \bbx{\ds{1 - \gamma}} \end{align}