On this page
You can solve e^x = 5 with a logarithm. But x·e^x = 5 mixes x with an exponential, and no logarithm trick isolates x. The Lambert W function is built for exactly this, and with one rearranging move, 2^x = x² and x^x = 10 get closed-form answers too.
What is the Lambert W function?
The Lambert W function is defined by W(x)·e^(W(x)) = x, equation 4.13.1 in the NIST Digital Library of Mathematical Functions (DLMF). In words, W undoes the map w → w·e^w, the way ln undoes w → e^w.
That map is not one-to-one, which is why W has branches. The derivative of w·e^w is e^w(w + 1), which is zero at w = −1, so the graph has its lowest point there, at height −1/e ≈ −0.3679. That flat point is exactly where the inverse function theorem says a smooth inverse can break down. Together with the DLMF page, that gives the picture for real x:
For x ≥ 0 there is one real solution, the principal branch W₀(x).
For −1/e < x < 0 there are two: W₀, with W ≥ −1, and the lower branch W₋₁, with W ≤ −1.
At x = −1/e both branches equal −1, and below −1/e there is no real solution.
The same DLMF section lists easy values to check your work: W₀(0) = 0 and W₀(e) = 1. It cites the standard survey, On the Lambert W function by Corless, Gonnet, Hare, Jeffrey and Knuth (Advances in Computational Mathematics, 1996).
How do you solve x·e^x = 5 with the Lambert W function?
It is already in the right shape: x = W(5). Since 5 is positive, there is one real answer, on W₀. With no W button on your calculator, use Newton's method.
Take f(w) = w·e^w − 5, so f′(w) = e^w(w + 1). The Newton step w − f/f′ simplifies to w_new = (w² + 5e^(−w)) / (w + 1). Since 1·e ≈ 2.72 is below 5 and 2·e² ≈ 14.8 is above it, start at w = 1:
w₁ = (1 + 5e^(−1)) / 2 = 1.4197
w₂ = 1.3326
w₃ = 1.32675
w₄ = 1.32672
Check: 1.32672 × e^1.32672 ≈ 1.32672 × 3.7687 ≈ 5.000. So W(5) ≈ 1.3267. Our explainer on Newton's method and the Hessian step shows the same idea in more than one variable.
How do you solve 2^x = x² and x^x = 10?
The whole method is one move: rearrange until one side reads (stuff)·e^(stuff) and the other side is a number c. Then stuff = W(c).
First, 2^x = x². For positive x, take square roots: x = 2^(x/2) = e^(x·ln2/2). Divide by the exponential and multiply by −ln2/2:
(−x·ln2/2)·e^(−x·ln2/2) = −ln2/2 ≈ −0.3466
The right side lies between −1/e and 0, so both branches give an answer:
W₀(−ln2/2) = −ln2, which gives x = 2.
W₋₁(−ln2/2) = −2ln2, which gives x = 4.
Check: −2ln2·e^(−2ln2) = −2ln2/4 = −ln2/2. The two branches are the two positive answers. The negative root comes from x = −2^(x/2) the same way: x = −2·W₀(ln2/2)/ln2 ≈ −0.7667.
Next, x^x = 10. Take logs: x·ln x = ln10. Write x as e^(ln x) and you have (ln x)·e^(ln x) = ln10 ≈ 2.3026. So ln x = W(ln10) ≈ 0.9188, and x = e^0.9188 ≈ 2.5062. Check: 2.5062 × ln(2.5062) ≈ 2.5062 × 0.91877 ≈ 2.3026, which is ln10.
Where does the Lambert W function show up in physics and biology?
A diode in series with a resistor is the classic case. The diode equation on PVEducation is I = I₀(e^(qV/nkT) − 1), where n is an ideality factor between 1 and 2 and kT/q is the thermal voltage, 25.85 mV at 300 K. With a resistor R and supply V, the diode sees only V − IR, so I appears on both sides. Applying the recipe with a = nkT/q gives
I = (a/R)·W((I₀R/a)·e^((V + I₀R)/a)) − I₀
Banwell and Jayakumar published an exact analytical solution for current flow through a diode with series resistance in Electronics Letters (2000), citing the Corless survey on W.
Population models need W too. In a 2020 study of the γ-Ricker population model, J. Leonel Rocha and Abdel-Kaddous Taha used the Lambert W function to write the model's positive fixed points explicitly, and tied its Allee effect to how W behaves near zero.
How should you practise the Lambert W function?
Sketch w·e^w, mark its minimum at (−1, −1/e), then flip it to see both branches.
Drill the rearranging step until u·e^u = c takes two or three lines.
When c is negative, check it is above −1/e and look for two answers.
Substitute every answer back.
If inverse functions, e^x or logarithms feel shaky, the Fermi Concept Library covers concepts across physics, chemistry, biology, mathematics and computing. To practise the rearranging step, the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than printing an answer.



