Thread: serious trouble finding big O

1. serious trouble finding big O

Original statement:

$\displaystyle f(n)=(n^3+4log_2 n)/(n+4)$

I'm sure the n+4 in both the denominator and numerator have something to do with it, but if i make $\displaystyle n$in the denominator a $\displaystyle n^3$, wouldn't that then make it smaller the the LHS?

I'm suppose to prove

$\displaystyle f(n)=0(n^2)$

which means i need the inequality to make the RHS bigger than the LHS

2. Originally Posted by Roclemir
Original statement:

$\displaystyle f(n)=(n^3+4log_2 n)/(n+4)$

I'm sure the n+4 in both the denominator and numerator have something to do with it, but if i make $\displaystyle n$in the denominator a $\displaystyle n^3$, wouldn't that then make it smaller the the LHS?

I'm suppose to prove

$\displaystyle f(n)=0(n^2)$

which means i need the inequality to make the RHS bigger than the LHS
For $\displaystyle n>1$ (which makes everything of interest here positive):

$\displaystyle f(n)=\frac{n^3+4\log_2 n}{n+4}<\frac{n^3+4\log_2 n}{n}$ $\displaystyle =n^2+\frac{4 \log_2 (n)}{n}$

Then as $\displaystyle \frac{4 \log_2 (n)}{n} \to 0$ as $\displaystyle n \to \infty$ for large enough $\displaystyle n$ we have:

$\displaystyle \frac{4 \log_2 (n)}{n}<n^2$

So for large enough $\displaystyle n$ :

$\displaystyle f(n)<2n^2$

CB

3. thanks mate, just on one line...

Thanks. All makes sense except that one line starting with "Then as... we have:", hate to be a noob, but can you please explain what you mean with the arrows and stuff thanks.

4. Beautiful CB, just filling in some details for him

That notation means as n approaches infinity, $\displaystyle \frac{4log_2(n)}{n}$ becomes arbitrarily close to 0. It is read the limit of $\displaystyle \frac{4log_2(n)}{n}$ as n approaches infinity is 0.

So given any $\displaystyle \epsilon >0$, there exists an integer N for which, $\displaystyle |\frac{4log_2(n)}{n}|<\epsilon$ for all n>N.

In particular, if $\displaystyle \epsilon=1$, there exists an N, such that for all n>N, $\displaystyle \frac{4log_2(n)}{n}<1$, this means we clearly have the identity $\displaystyle \frac{4log_2(n)}{n}<1<n^2\Rightarrow n^2+\frac{4log_2(n)}{n}<n^2+n^2=2n^2$.

Thus $\displaystyle |\frac{x^2+\frac{4log_2(n)}{n}}{n^2}|\leq 2$ for all n>N. Which is the definition of $\displaystyle f(n)=O(n^2)$