Solving the equation $n\log n = 10^9$

2.9k Views Asked by At

This seems very basic (I guess my calculus needs brushing up). Is there a way to find n without a calculator in this one?

$10^{9} = n\log(n)$

My Attempt

(log is base 2 base on the book convention.)

$10^9 = n\log n(n)\\ 2^{10^9} = 2^{\log(n^n)}\\ 2^{10^9} = n^n$

Currently I'm tempted to use Newton's method on $n^n-2^{10^9}=0$ but that seems to be an overkill.

2

There are 2 best solutions below

0
On BEST ANSWER

Let us consider the more general case of the equation $$x \log(x)=n$$ As mentioned by user1337, almost from definition, the solution is given by Lambert function $$x=\frac{n}{W(n)}$$ Now, let us consider the case where $n$ is just huge as in your case. There are quite good approximations of Lambert function for such a case. For example, $$W(n) \simeq L_1-L_2+\frac{L_2}{L_1}+\frac{L_2(L_2-2)}{2L_1^2}+...$$ where $L_1=\log(n)$ and $L_2=\log\Big(\log(n)\Big)$.

Let us try with your number $n=10^9$; this gives the approximation $W(10^9)\simeq 17.84192146$ and so $x \simeq 5.604777502\times 10^7$ while the exact answer is $x \simeq 5.604838914\times 10^7$.

Let us try with $n=10^{99}$; this gives the approximation $W(10^{99})\simeq 222.5507677$ and so $x \simeq 4.493356775 \times 10^{96}$ while the exact answer is $x \simeq 4.493356750 \times 10^{96}$.

Let us try with $n=10^{999}$; this gives the approximation $W(10^{999})\simeq 2292.545090$ and so $x \simeq 4.361964370 \times 10^{995}$ while the exact answer is $x \simeq 4.361964370 \times 10^{995}$.

We can better approximate the result using more terms.

1
On

The solution can be expressed in terms of the Lambert W function as:

$$n=\frac{1000000000 \log (2)}{W(1000000000 \log (2))} \approx 3.96201\times 10^7.$$