11
$\begingroup$

Believe it or not, this isn't homework. It's been many years since grade school, and I'm trying to brush up on these things. But my intuition isn't helping me here.

  • 1
    $n\log n = C$ is equivalent to $n^n = e^C$ which has no closed form solution for $n$. There is a solution for $n$ in terms for [Lambert W function](http://en.wikipedia.org/wiki/Lambert%27s_W_function).2012-08-30

4 Answers 4

6

If what you want is to solve for $n$, there is no simple way. The solution has $n=e^{W(C)} = \frac C{W(C)}$ where $W()$ is the Lambert W function.

3

Since $n \ln n = \ln n^n$, just raise $e$ to each side and you get $n^n = e^C$.

If you want to solve for $n$, I don't know of any method that will work (usually in Computer Science we use approximations or we solve it numerically).

1

I will take the base of the logarithm to be $e$. (If you are in a different base; just replace the $e$.)

$n\log n = C$

$\log n = \frac{C}{n}$

$e^{\frac{C}{n}} = n$

$(e^C)^{\frac{1}{n}} = n$

$e^C = n^n$

  • 0
    I don't quite see how this solves for $n$.2018-03-10
0

You can show that the function $g(x)=x\ln x$ is negative for $0 (with a local minimum of $-\frac{1}{e}$ at $\frac{1}{e}$).

It is equal to zero for $x=1$ and is greater than zero for $x>1$.

Therefore we have to make some initial assumptions on $C$. We either have $C\in[-\frac{1}{e},0)$, $C=0$ or $C>0$.

Note that for $C=0$ we have $n=1$ is the solution.

Because $g(x)$ is not one-to-one on $(0,1)$ and has a local minimum we have two solutions for $C\in[-1/e,0)$ so we will disregard this.

There are various ways of solving the equation numerically and here I will just show another idea.

Consider the function $f_C(x)=\frac{C}{\ln x}.$ The fixed point of $f_C(x)$, $x_f$ is the $n$ that solves your equation.

If the fixed point is attracting you have a way of approximating it. To be attracting we need $|f_C'(x_f)|<1$. This is equivalent to

$C

but $C=x_f\ln x_f$ and so if $x_f>e$ we have

$C=x_f\ln x_f

So if the solution to the equation is greater than $e$ the fixed point is attracting. Therefore if we can choose an $x_0$ close enough to $x_f$ then the iterations of $x_0$ under $f_C$ will converge to $x_f$.

For example, suppose I am looking at $400=n\ln n$ and I start with $x_0=3$. I find after eight iterations that I have correct to four significant figures $n=89.09$.