7

I am trying to solve: $$8n^2=64 n\log(n)$$

I factored out $8n$ and was left with

$$n = 8 \log n$$

but I do not know how to proceed from here, I checked the solution on Wolfram Alpha, and they were able to simplify it down to:

enter image description here

which is approximately:

enter image description here

how where they able to get to this point ?

Winther
  • 24,478

2 Answers2

11

Your equation does not have a closed form in terms of standard functions you come across in school, but it does have a solution in terms of the Lambert W-function $W(z)$. The defining equation for $W(z)$ is $$z=W(z)e^{W(z)}$$ We want to rearrange your equation into something similar so we get $$\begin{align*}n&=8\log n \\ \longrightarrow\hspace{10mm}\frac n8&=\log n \\ \longrightarrow\hspace{7mm} e^{\frac n8}&=n \\ \longrightarrow\hspace{12mm} 1&=ne^{-\frac n8} \\ \longrightarrow\hspace{5mm} -\frac18&=-\frac n8e^{-\frac n8} \\\end{align*}$$ Now $$Y=Xe^X\iff X=W(Y)$$ Thus we get $$\begin{align*}-\frac n8&=W\left(-\frac18\right)\\ n&=-8W\left(-\frac18\right)\end{align*}$$ To get decimal approximations, you can numerically evaluate $W$ for its different branches and you get the solutions wolfram alpha gave you.

E.O.
  • 6,942
4

Your equation, after your initial simplification, simply write

$$f(n) = n - 8 \log(n)$$

and you want $f(n)$ to be zero.

By inspection (or better plotting the function), you notice that you have two solutions, one close to $1,$ the other close to $26$. I shall admit here that you do not know about Lambert function (from very far away, this is not a crime!!). Then the solutions will be obtained numerically.

Since the function looks very well conditioned, Newton method is a very simple candidate for locating the roots as accurately as desired. Starting from a guess (let us name it $n_{old}$), the new estimate (let us name it $n_{new}$) is simply given by

$$n_{new} = n_{old} - f(n_{old}) / f'(n_{old})$$

and the process is repeated as long as the desired accuracy has not been reached.

For illustration purposes, I shall start the iterations at $n_{old} = 1$. The successive iterates are then: $1.14286, 1.15529, 1.15537$.
For this last value, the function $f(n)$ is $4.88805\times10^{-6}$; this is quite accurate and only three iterations have been required.

For the second solution, I shall start, on intent, quite far from the solution, say at $n_{old} = 15$. The successive iterates are then: $29.2809, 26.1639, 26.0935$.
For this last value, the function $f(n)$ is $1.00707\times10^{-5}$; this is quite accurate and only three iterations have been required.

BlackAdder
  • 4,029
  • @BlackAdder. Thanks for editing. I am almost blind and, beside plain ASCII, everything is hard to me (I do not see what I type). Moreover, ages is not of any help. Cheers. – Claude Leibovici Dec 24 '13 at 07:38