# Integral of $\int x^{n-1}W(x)dx$

How to prove that : $$\int x^{n-1}W(x)dx = \frac {x^ne^{[-nW(x)]}[-nW(-x)]^{-n}[n\Gamma(n+1, -nW(x)- \Gamma(n+2, -nW(x))]} {n^2}$$ Where $$W(x)$$ is the Lambert-W function https://en.wikipedia.org/wiki/Lambert_W_function and $$\Gamma$$ is the incomplete gamma function.

I found this on wolfram alpha https://www.wolframalpha.com/input/?i=int+(x)%5E(n-1)W(x), but have no idea how it got this.

For those who are wondering why I want to know the proof of this integral it is because with this integral I can find the integral of the infinite titration of x as :

$$\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}$$

Lol the answer is so long that it doesnt fit on one line.

• You probably want to make the substitution $ue^u = x$, $dx = (u+1)e^u du$ that would give you $\int u^{n-1} e^{(n-1)u} W(ue^u) (u+1)e^u du$. We know that $W(ue^u) = u$ Hence our integral is $\int u^{n} e^{(nu}(u+1) du$. What next? Well $\Gamma(x) =$ (tbc) – George Dewhirst Apr 3 at 22:47
• If we try integration by parts: $$I=\int x^{n-1}W(x)dx$$ $u=W(x)$ then $u'=\frac{W(x)}{x[W(x)+1]}$ and $v'=x^{n-1}$ so $v=\frac{x^n}{n}$ so: $$I=\frac{x^n}{n}W(x)-\int\frac{x^{n-1}}{n}\frac{W(x)}{W(x)+1}dx$$ This may get somewhere – Henry Lee Apr 4 at 3:29

You probably want to make the substitution $$ue^u = x$$,

$$dx = (u+1)e^u du$$ that would give you $$\int u^{n-1} e^{(n-1)u} W(ue^u) (u+1)e^u du$$.

We know that $$W(ue^u) = u$$

Hence our integral is

$$\int u^{n} e^{nu}(u+1) du$$.

What next?

Well $$\Gamma(x) = \int t^{x-1} e^{-t}dt$$ So our integral looks kind of like a gamma integral but not quite.

We will separate it into

$$\int u^{n+1} e^{nu} du (1) + \int u^{n} e^{nu} du (2)$$.

$$t = -nu$$

$$(1) = \int (-1/n)^{n+1} t^{n+1} e^{-t} dt/(-n) = (-1/n)^{n+2} \Gamma(n+2)$$

$$(2) = \int (-1/n)^{n} t^{n} e^{-t} dt/(-n) = (-1/n)^{n+1} \Gamma(n+1)$$

Final answer $$(-1/n)^{n+2} \Gamma(n+2)+(-1/n)^{n+1} \Gamma(n+1)$$

(tbc)

• Obviously think about what limits you'd like on the integrals as well, as the Gamma function is an integral over $[0,\infty)$ – George Dewhirst Apr 3 at 23:09