Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

$$\begin{align}\require{cancel} \lim_{n\to\infty}\frac{lgn}{xlgn}&\ge1\\ \lim_{n\to\infty}\frac\infty{x\times\infty}&\ge1\\[5pt] \text{Apply L'Hopital's rule}\\ \lim_{n\to\infty}\frac{\frac1n}{x\times\frac1n}&\ge1\\ \lim_{n\to\infty}\frac1n\times\frac nx&\ge1\\ \lim_{n\to\infty}\frac1{\cancel n}\times\frac{\cancel n}x&\ge1\\ \lim_{n\to\infty}\frac1x&\ge1 \end{align}$$

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

share|cite|improve this question
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|cite|improve this answer
Thank you. So if we set c = x, then this holds true. – Kamran224 Sep 29 '12 at 2:18

Your Answer


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.