23
$\begingroup$

How to prove $\log(n) = O(\sqrt{n})$?

How do I find the $c$ and the $n_0$?

I understand to start, I need to find something that $\log(n)$ is smaller to, but I m having a hard time coming up with the example.

  • 1
    @Anson Can you write your own solution and accept it so that this question gets an answer? http://meta.math.stackexchange.com/questions/1401/what-to-do-if-you-figure-out-the-answer-to-your-own-question2012-05-16

4 Answers 4

52

Less sophisticated: $\log(x) < x$ for all $x > 0$ (as is easily seen from its integral representation). Therefore $\log(x) = 2 \log \sqrt{x} < 2 \sqrt{x}$.

7

You want $c > 0$ and $n_0$ such that $\log n \le c \sqrt{n}$ for $n > n_0$. Actually any $c > 0$ would work, the only problem is to find $n_0$. Alternatively, any $n_0 > 0$ would work if we find the right $c$, and if we have the freedom to choose this might be a better option because it's easier to solve for $c$ than to solve for $n$. The inequality says $c \ge \dfrac{\log n}{\sqrt{n}}$. Note that $\dfrac{d}{dn} \dfrac{\log n}{\sqrt{n}} = \dfrac{2-\log n}{2 n^{3/2}}$ so $\log (n)/\sqrt{n}$ is increasing for $n \le e^2$ and decreasing for $n \ge e^2$. Thus we could take $c = \log(e^2)/\sqrt{e^2} = 2/e \approx .7357588824$ which would work for all $n \ge 1$.

5

$\log(x) < \sqrt{x}$ for all $x>0$ because $\log(x) /\sqrt{x}$ has a single maximum value $2/e<1$ (at $x=e^2$).

-3

consider n=2^100

then log(n)=Log(2^100)

           =100*log2            =100 

and now apply this to sqrt(n)

then Sqrt(n)=sqrt(2^100)

           =2^50  

we can clearly say that sqrt(n) is larger then logn.

  • 1
    Use Mathjax https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference for math edidting2017-07-15