How to solve where an equation where the variable is in the exponent?

64 Views Asked by At

My question is how to solve this problem specifically, but this type of problem generally?

$$ 2^{n/8} - n < 0 $$

EDIT I should have probably been more specific. This is a computer science algorithms running time question: "For inputs of size $n$, insertion sort runs in $8n^2$ steps, while merge sort runs in $64nlog_2n$ steps. For which values of $n$ does insertion sort beat merge sort?"

So I made this inequality $$8n^2 < 64n\,log_2\,n$$

In the solutions manual they go from $$2^n < n^8$$ to $$2 \leq n \leq 43$$

And I guess I am wondering how they got to there?

So I am not sure if you are just supposed to approximate this with like a graph or if there is a 'simple' way to solve this algebraically?

1

There are 1 best solutions below

0
On BEST ANSWER

Consider that you look for the zero's of function $$f(n)=2^{n/8}-n$$ for which $$f'(n)=2^{\frac{n}{8}-3} \log (2)-1\qquad \text{and} \qquad f''(n)=2^{\frac{n}{8}-6} \log ^2(2)\quad > 0 \quad \forall n$$ The first derivative cancels at $$n_*=24-\frac{8 \log (\log (2))}{\log (2)}\approx 28.2301$$ This point is a minimum by the second derivative test and $$f(n_*)=\frac{8 \left(1+\log \left(\frac{\log (2)}{8}\right)\right)}{\log (2)}\approx -16.6886$$ So, two roots.

To approximate the roots, build a Taylor expansion around $n_*$ to get $$f(n)=\frac{8 \left(1+\log \left(\frac{\log (2)}{8}\right)\right)}{\log (2)}+\frac{\log (2)}{16} \left(n-n_*\right)^2+O\left(n-n_*)^3\right)$$ This gives two solutions $8.60300$ and $47.8573$.

Now, let us start Newton method with these estimates. The iterates would be

  • For the first root

$$\left( \begin{array}{cc} k & n_k \\ 0 & 8.6029995 \\ 1 & 0.6563652 \\ 2 & 1.0991250 \\ 3 & 1.0999970 \end{array} \right)$$

  • For the second root

$$\left( \begin{array}{cc} k & n_k \\ 0 & 47.857262 \\ 1 & 44.427279 \\ 2 & 43.601473 \\ 3 & 43.559365 \\ 4 & 43.559260 \end{array} \right)$$

As said in comments, there is explicit solution in terms of Lambet function $$-\frac{8 W_0\left(-\frac{\log (2)}{8}\right)}{\log (2)} \qquad \text{and} \qquad -\frac{8 W_{-1}\left(-\frac{\log (2)}{8}\right)}{\log (2)}$$