# Solution of x^x = 2

Author

David Radcliffe

Last Updated

4 years ago

License

Creative Commons CC BY 4.0

Abstract

This article explains how to solve x^x = 2 in the real numbers using Lambert's W function.

Author

David Radcliffe

Last Updated

4 years ago

License

Creative Commons CC BY 4.0

Abstract

This article explains how to solve x^x = 2 in the real numbers using Lambert's W function.

```
\documentclass[12pt]{amsart}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\setlength{\parindent}{0pt}
\setlength{\parskip}{10pt}
\title{Solution of $x^x = 2$}
\date{\today}
\author{David Radcliffe}
\begin{document}
\maketitle
Consider the function $f(x) = x \exp(x)$,
defined on the interval $[-1, \infty)$.
This is a continuous function, and it is increasing since
$$f'(x) = (x + 1) \exp(x) > 0$$
for all $x > -1$. Therefore, $f$ is invertible.
The inverse of $f$ is known as Lambert's $W$ function, and it satisfies
$$W(t) \exp(W(t)) = t$$
for all $t \ge -1/e$. This equation can be rewritten as
\begin{equation}
W(t) = \frac{t}{\exp(W(t))}
\end{equation}
We will use Lambert's $W$ function to solve the equation $x^x = 2$.
Note that the equation has exactly one solution in the positive reals by the
Intermediate Value Theorem, since $x^x$ increases continuously from 1
to 4 as $x$ increases from 1 to 2.
\begin{align*}
x^x &= 2 &\text{Given}\\
\ln(x^x) &= \ln(2) &\text{Apply $\ln$ to both sides}\\
x \ln(x) &= \ln(2) &\text{Simplify}\\
t \exp(t) &= \ln(2) &\text{Substitute $t = \ln(x)$}\\
t &= W(\ln(2)) &\text{Definition of $W$}\\
x &= \exp(W(\ln(2))) &\text{Apply $\exp$ to both sides}\\
x &= \ln(2) / W(\ln(2)) &\text{By equation (1)} \\
x &\approx 1.55961046946.
\end{align*}
\end{document}
```

We only use cookies for essential purposes and to improve your experience on our site. You can find out more in our cookie policy.