Solution to $2^x=x!$

140 Views Asked by At

I was trying to solve the equation for $x!=2^x$, where $x\ge0$.

I plotted it on Desmos and found two solutions for the same.

Attaching image for reference. Graph plot of $2^x$ and $x!$

As per the plot, there are two solutions for the equation. But I am only able to derive the solution $x=0$. (Through observation and guesswork).

How can the second solution be derived ($x\approx3.46$)?

I couldn't figure it out!

It looks so simple, yet its quite a bummer actually(at least for me).

Can someone please help regarding the same?

Thanks in advance!

3

There are 3 best solutions below

2
On BEST ANSWER

I cannot see any form of analytical solution possible to this equation. Instead, you can set a function $$f(x)=2^x-\Gamma(x+1)$$ and perform numerical methods for the second solution. You can use Newton's method for approximating roots.

Here, we start with the initial value $x=3$

enter image description here enter image description here

and so on to the desired accuracy.

The root we get is $$x\approx 3.45986564404499913418786108106898120277518459906428314529806887...$$

0
On

Let $f(x) =2^{x}-x!$.

We can see that $f(0)=0$ which implies $0$ is a root of $f(x)$.

Now we can see $f(3) > 0$ and $f(4) < 0$.

So by intermediate value theorem we can say that it has a root in between $3$ and $4$.

To find the approximated root we can use numerical approach. Better to use bisection method.

1
On

Looking at this old question of mine, you will find a superb approximation proposed by @robjohn (one of our moderators) for the solution of the general equation $$\large x!=a^x$$

$$x\sim e a\exp\Bigg[W\left(-\frac{\log (2 \pi a)}{2 e a}\right)\Bigg]-\frac 12$$ where $W(.)$ is Lambert function.

To show how good it is

$$\left( \begin{array}{ccc} a & \text{approximation} & \text{solution} \\ 2 & 3.44447 & 3.45987 \\ 3 & 6.00778 & 6.01604 \\ 4 & 8.60960 & 8.61488 \\ 5 & 11.2347 & 11.2390 \\ 6 & 13.8753 & 13.8786 \\ 7 & 16.5270 & 16.5296 \\ 8 & 19.1868 & 19.1892 \\ 9 & 21.8531 & 21.8552 \\ 10 & 24.5245 & 24.5263 \\ 11 & 27.2001 & 27.2018 \\ 12 & 29.8792 & 29.8807 \\ 13 & 32.5613 & 32.5626 \\ 14 & 35.2459 & 35.2472 \\ 15 & 37.9327 & 37.9339 \\ 16 & 40.6214 & 40.6225 \\ 17 & 43.3119 & 43.3129 \\ 18 & 46.0038 & 46.0048 \\ 19 & 48.6971 & 48.6980 \\ 20 & 51.3917 & 51.3925 \\ \end{array} \right)$$