# Proof for integral representation of Lambert W function

The Lambert W function satisfies the identity

$$W(z)e^{W(z)}=z.$$

How do you prove that

$$W(z) = \frac{z}{2\pi} \int_{-\pi}^{\pi} \frac{(1-\nu \cot(\nu))^2+\nu^2}{z+\nu \csc(\nu)e^{-\nu\cot(\nu)}} \, \mathrm{d}\nu$$

where $$z$$ is a real number and $$z\geq-\frac{1}{e}$$?

• @MarkViola I found it on a Wikipedia article. The source the article gave was this Sep 7, 2019 at 16:26

The proof uses the fact that the function $$W(z)/z$$ is holomorphic on the domain $$D=\mathbb{C}\setminus (-\infty, -1/e]$$. By Cauchy's integral formula, it follows that: $$\frac{W(z)}{z}=\frac{1}{2\pi i}\int_C \frac{W(t)}{t(t-z)}~dt$$ where $$C$$ is a positively oriented keyhole contour, as follows: Letting $$r\to 0$$ and $$R\to \infty$$, it can be shown that this reduces to (it can be shown that the contributions of each circle to the integral is zero): $$\frac{W(z)}{z}=\frac{1}{2\pi i} \left[\int_{-\infty}^{-1/e} \frac{W(t)}{t(t-z)}~dt+\int_{-1/e}^{-\infty} \frac{\overline{W(t)}}{t(t-z)}~dt\right]$$ Note that in the above we have used that for $$x\in D$$, we have that $$W(\overline{x})=\overline{W(x)}$$. Additionally, we have that for all $$w\in \mathbb{C}$$ that $$\Im(w)=\frac{w-\overline{w}}{2i}$$, hence the integral reduces to: $$\frac{W(z)}{z}=\frac{1}{\pi} \int_{-\infty}^{-1/e} \frac{\Im(W(t))}{t(t-z)}~dt=\frac{1}{\pi} \int_{-1/e}^{-\infty} \frac{\Im(W(t))}{t(z-t)}~dt$$ The article then proceeds to use the change of variable $$\nu=\Im(W(t))$$. The variables can be shown to be related by: $$t=-\nu \csc(\nu) e^{-\nu \cot(\nu)}$$ Differentiating gives: $$dt=-\csc(\nu)e^{-\nu \cot(\nu)}(\nu^2+(1-\nu\cot(\nu))^2)~d\nu$$ Hence, it follows that (since $$t=-1/e$$ gets mapped to $$\nu=0$$ and $$t\to -\infty$$ gets mapped to $$\nu=\pi$$): $$\frac{W(z)}{z}=\frac{1}{\pi} \int_0^{\pi} \frac{\nu^2+(1-\nu\cot(\nu))^2}{z+\nu \csc(\nu) e^{-\nu \cot(\nu)}}~d\nu$$ Since the integrand is even with respect to $$\nu$$, we obtain the desired result.