# How do you solve ln(x)=x-2?

Nov 25, 2017

$x = - {W}_{n} \left(- {e}^{- 2}\right) \text{ }$ for any $n \in \mathbb{Z}$

#### Explanation:

The Lambert W function (actually a family of functions) satisfies:

${W}_{n} \left(z {e}^{z}\right) = z$

Given:

$\ln \left(x\right) = x - 2$

Taking the exponent of both sides, we get:

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

So:

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

So:

$\left(- x\right) {e}^{- x} = - {e}^{- 2}$

So:

$- x = {W}_{n} \left(- {e}^{- 2}\right) \text{ }$ for any branch of the Lambert W function.

So:

$x = - {W}_{n} \left(- {e}^{- 2}\right) \text{ }$ for any $n \in \mathbb{Z}$