A uses 100nlog(n) operations while B uses n^(1.5) operations. Determine the value n0 such that A is better than B for n ≥ n0 assuming log base 2

I've tried a few different approaches but I'm not getting anywhere with this.

100log(n) = n^(0.5) ==> log(n) = n/100 ==> n = 2^(n/100) Stuck at this dead end.

100log(n) = n^(0.5) ==> log(n^(100)) = n ==> n^(100) = 2^(n) Stuck again.

I also looked at this post: $4\log_2(n)=n$ How to Solve for $n$?. However, none of the answers there helped me out much. The first answer suggests using, "the Lambert W-function, which can't be solved with elementary functions (but can be expressed as an infinite sum using the Lagrange inversion forumula)." But then it continues to say, "However just by trying random powers of 2 you can get an integer solution of n=16, probably the easiest way." Trying random powers of 2 won't work in this case unless I have a lot of time to spare and I've never heard of the Lambert W-function or Lagrange inversion formula. Has anybody had success with the Lambert W-function or Lagrange inversion formula in this case? Open to any other suggestions as well.

In the same post I tried playing around with the 3rd answer from the top but that didn't help me out either.

Any help with this would be greatly appreciated.

• In your first line it should be $\log n=\frac {\sqrt n}{100}$ but that is no easier to solve – Ross Millikan Jan 31 at 20:18

I would just solve it numerically. I like fixed point iteration, so would write your equation as $$n=10,000 (\log(n))^2$$ Now guess a value for $$n$$, plug it in on the right, get a value on the left and iterate to convergence. I find $$n \approx 4,945,093$$ I picked this version because the log varies so slowly. Starting with $$100$$ it was quite close in seven iterations.
• Fixed point iteration is a numeric approximation technique. You write your formula as $x=f(x)$ as I did. There are often a number of choices for $f(x)$ and it takes some playing to get the right one. Then you guess a starting value $x_0$ and iterate $x_{i+11}=f(x_i)$ to convergence. When you are close to the solution the error will be multiplied by about $f'(x)$ at each step. If this is less than $1$ in absolute value and you start close enough you will converge properly. I find this easier to set up than other 1D root finders. – Ross Millikan Jan 31 at 22:00
• Having a log function as $f$ is nice because it changes so slowly. – Ross Millikan Jan 31 at 22:00