Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Prove that if $d(n) = \log(n^x)$, where $x$ is a constant greater than zero, then $d(n)$ is $O(\log(n))$.

I have attempted this solution but it seems to me that $\log(a) > \log(b$) if $a > b > 0$.

Here is my solution: http://i.imgur.com/sicPn.png

which is only valid if $0 < x \leq 1$. Can anyone explain to me where my logic is wrong?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You have a misunderstanding concerning big O notation. We say that $f(n) = O(g(n))$ if there is some constant $C$ such that $f(n) \leq Cg(n)$ for all $n$ (assuming $f(n),g(n) > 0$ for all $n$). You took $C = 1$, but this need not be so. One important advantage of big O notation is that it doesn't care about (multiplicative) constants.

share|improve this answer
    
Thank you. So if we set c = x, then this holds true. –  Kamran224 Sep 29 '12 at 2:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.