Proving that $\int x^{x^{x^{.^{…….}}}} dx= \sum_{n=1}^{\infty}\frac {(-n)^{n-1}}{n!} \Gamma(n, -\ln x)$ [Proof Verification]

calculusindefinite-integralsintegrationlambert-wproof-verification

Please check if I solved this correctly and if there are any mistakes. Many of steps are well known properties , so I might have skipped them.

To prove:
$$\int x^{x^{x^{.^{…….}}}} dx= – \sum_{n=1}^{\infty}\frac {(-n)^{n-1}}{n!} \Gamma(n, -\ln x)$$

To start of,

$$ \int x^{x^{x^{.^{…….}}}} dx= \int\frac {-W(-\ln(x))}{\ln(x)} dx$$

where $W( )$ is the Lambert-W function. This can be verified by wolfram alpha https://www.wolframalpha.com/input/?i=y%3Dx%5Ey

let $ -\ln x=t $

$$ x=e^{-t} $$

$$dx =-xdt $$

$$ \therefore \int\frac {-W(-\ln(x))}{\ln(x)} dx =- \int \frac {W(t)}{te^t}dt $$
Now expanding $W(t)$:
$$ W(t)= \sum_{n=1}^{\infty}\frac {(-n)^{n-1}}{n!}t^n $$

$$ \therefore – \int \frac {W(t)}{te^t}dt= -\frac{1}{te^t}\sum_{n=1}^{\infty}\frac {(-n)^{n-1}}{n!}t^n = -\sum_{n=1}^{\infty} \int\frac {(-n)^{n-1}}{(n!)te^t}t^n dt=-\sum_{n=1}^{\infty} \int\frac {(-n)^{n-1}}{(n!)e^t}t^{n-1} dt$$

Also, $\int t^{n-1}e^{-t} dt=-\Gamma(n,t) $

$$\therefore~ -\sum_{n=1}^{\infty} \int\frac {(-n)^{n-1}}{(n!)e^t}t^{n-1} dt = \sum_{n=1}^{\infty} \frac {(-n)^{n-1}}{(n!)}\Gamma(n, t) $$

Substituting $ t= -\ln x $ back into the final equation:

$$\int \left( x^{x^{x^{.^{…….}}}} \right) dx = \sum_{n=1}^{\infty} \frac {(-n)^{n-1}}{(n!)}\Gamma(n, -\ln x) $$

Edit: I am now pretty sure this is correct as by looking at the desmos graph https://www.desmos.com/calculator/v0uulbfbsa , you can see that both the graphs match in the range of $e^{-e} \lt x \le e^{1/e}$. This is the same range at which the integral of $x^{x^{x^{.^{…….}}}}$ is defined.

But still I would also appreciate if someone else could verify this 🙂

Here are some integrals like this if you enjoy doing integrals like this,

$\int x^{x}dx = \sum _{n=0}^{\infty} \frac{\left(-1\right)^n \Gamma \left(n+1,-\left(n+1\right)\ln\left({x}\right)\right)}{n!\left(n+1\right)^{(n+1)}} ~(1)$

$ \int x^{\frac{1}{x}} dx= \sum_{n=0}^\infty \frac {\Gamma(n+1,(n-1)\log(x))}{(n-1)^{n+1}.n!} ~(2)$

$ \int x^{x^{x^{.^{…….}}}} dx = \sum_{n=0}^{\infty}-\frac {(-1)^n(-\ln x)^ne^{[-nW(-\ln x)]}[-nW(-\ln x)]^{-n}[n\Gamma(n+1, -nW(-\ln x))- \Gamma(n+2, -nW(-\ln x))]} {(n!)n^2} ~(3)$

$ \int x^{1/x^{1/x^{1/x…}}} dx= \sum_{n=0}^{\infty} \frac {(\ln x)^n e^{-n W(\ln x)} \left( – (n+2)W(\ln x) \right)^{-n} \left( (n+2) \Gamma (n+1 , -(n+2)W(\ln x)) – \Gamma (n+2 , -(n+2)W(\ln x)) \right)}{(n+2)^2n!} ~(4) $

$\int \left( \frac{1}{x} \right) ^{x}dx = \sum _{n=0}^{\infty} \frac{\Gamma \left(n+1,-\left(n+1\right)\ln\left({x}\right)\right)}{n!\left(n+1\right)^{(n+1)}} ~(5)$

$ \int \left(\frac{1}{x} \right) ^{\frac{1}{x}} dx= \sum_{n=0}^\infty \frac {(-1)^n \Gamma(n+1,(n-1)\log(x))}{(n-1)^{n+1}.n!} ~(6) $

$ \int \left( \frac {1}{x} \right) ^{1/x^{1/x^{.^{…}}}} dx = \sum_{n=0}^{\infty}\frac {( \ln (1/x))^ne^{[-nW(-\ln (1/x))]}[-nW(-\ln (1/x))]^{-n}[n\Gamma(n+1, -nW(-\ln (1/x)))- \Gamma(n+2, -nW(-\ln (1/x)))]} {(n!)n^2} ~(7) $

$ \int \left( \frac {1}{x} \right) ^{x^{x^{x…}}} dx= \sum_{n=0}^{\infty} \frac {(-1)^n(\ln (1/x))^n e^{-n W(\ln (1/x))} \left( – (n+2)W(\ln (1/x)) \right)^{-n} \left( (n+2) \Gamma (n+1 , -(n+2)W(\ln (1/x))) – \Gamma (n+2 , -(n+2)W(\ln (1/x))) \right)}{(n+2)^2n!} ~(8) $

$ \int \left( exp(x) \right) ^{exp(x)^{exp(x)…}} dx = \frac{1}{2} W(-x)(W(-x)+2) ~~~~~~~~~~~~~~(9) $

Best Answer

The proof above isn't correct.

My mistake above is that I exchanged the $\sum$ operator with the $\int$ operator even though the series $\sum_{n=1}^{\infty}\frac {(-n)^{n-1}}{n!}$ is divergent.

Correct integral of $\int x^{x^{x^{.^{.......}}}} dx$ :

$$ \int x^{x^{x^{.^{.......}}}} dx= \int\frac {-W(-\ln(x))}{\ln(x)} dx$$ let $ -\ln x=t $

$$ x=e^{-t} $$

$$dx =-xdt $$

$$ \therefore \int\frac {-W(-\ln(x))}{\ln(x)} dx =- \int \frac {W(t)}{te^t}dt $$ We know that: $$\frac{1}{e^t}=\sum_{n=0}^{\infty}\frac{(-t)^n}{n!}$$

$$- \int \frac {W(t)}{te^t}dt=- \int \sum_{n=0}^{\infty}\frac {(-1)^nW(t)(t)^n}{tn!}dt=- \int \sum_{n=0}^{\infty} \frac{(-1)^nW(t)(t)^{n-1}}{n!}dt $$ Since the series $\sum_{n=0}^{\infty}\frac {(-1)^n}{n!}$ is convergent, we can exchange the $\sum$ and $\int$ operators.

$$- \int \sum_{n=0}^{\infty} \frac{(-1)^nW(t)(t)^{n-1}}{n!}dt = - \sum_{n=0}^{\infty} \frac{(-1)^n}{n!}\int W(t)(t)^{n-1}dt $$ Now, $$\int W(t)(t)^{n-1}dt= \sum_{n=0}^{\infty}\frac {(t)^ne^{[-nW(t)]}[-nW(t)]^{-n}[n\Gamma(n+1, -nW(t))- \Gamma(n+2, -nW(t))]} {n^2} $$

The proof for this is long and can be confirmed by Wolfram Alpha. If you want me to prove this then comment down below.

Substituting $t=- \ln x$:

$\sum_{n=0}^{\infty}-\frac {(-1)^n(-\ln x)^ne^{[-nW(-\ln x)]}[-nW(-\ln x)]^{-n}[n\Gamma(n+1, -nW(-\ln x))- \Gamma(n+2, -nW(-\ln x))]} {(n!)n^2} $

And finally we have:

$ \int x^{x^{x^{.^{.......}}}} dx = \sum_{n=0}^{\infty}-\frac {(-1)^n(-\ln x)^ne^{[-nW(-\ln x)]}[-nW(-\ln x)]^{-n}[n\Gamma(n+1, -nW(-\ln x))- \Gamma(n+2, -nW(-\ln x))]} {(n!)n^2} $