# Solution of a Simple Exponential Equation via the Lambert W Function

How to solve

x = \mathrm{exp}\left(\frac{2}{x}\right)

was posed at Mathematics Stack Exchange.

To solve it, we use the Lambert W function.

1 = \frac{1}{x} \mathrm{exp}\left(\frac{2}{x}\right)

2 = \frac{2}{x} \mathrm{exp}\left(\frac{2}{x}\right)

\mathrm{W}(2) = \frac{2}{x}

x = \frac{2}{\mathrm{W}(2)} \approx 2.34575

Where $$\mathrm{W}(z)$$ is the Lambert W function.

A good tutorial can be found here, where we see that for $$a=b\mathrm{e}^{b}$$, we have $$b=\mathrm{W}(a)$$.