What are the steps to Solve $N \cdot \log_2N = 10^6$ algebraically?

259 Views Asked by At

I can write code that can solve it by just going through every integer but what are the steps to solve it with basic algebra. I seem to end up in a circular fashion of just writing it in terms of other things.

1

There are 1 best solutions below

0
On

$f : x\mapsto x \log_2x$ clearly is a strictly increasing countinuous function over $[1,\infty)$ since both $x\mapsto x$ and $x\mapsto \log_2x$ are and are positive on $[1,\infty)$. Given that $f(1) = 0$ and that $\underset{+\infty}{\lim}f = +\infty$, the intermediate value theorem enables us to know there is a unique solution to: $$ (E_a) : f(x) = a, a\in [1,\infty) $$ Let $g : x\mapsto x \ln x$ to make calculaions easier. Similarly to what was previously said, $(E'_a) : g(x) = a, a\in [1,\infty)$ has a unique solution $x\in[1,\infty)$. Note that the solution to $(E'_{a\ln2})$ is the solution to $(E_a)$.

Then, as SmileyCraft thought, this is a plain use case of Lambert W function which is defined as the reciprocal of $w \mapsto we^w$. We have $x\ln x = a$ so $e^{\ln x}\ln x = a$ and $\ln x = W(a)$ and $x = e^{W(a)}$ which yields $x = \frac{a}{W(a)}$ (because, by definition $W(a)e^{W(a)} = a$).

We thus solved $(E'_a)$ for all $a\in [1,\infty)$: $$ x \ln x = a \Leftrightarrow x = \frac{a}{W(a)} $$ Then, given what was said previously: $$ x\log_2x = a \Leftrightarrow x =\frac{a\ln 2}{W(a\ln 2)} $$ Algebra will not get you much further than that.