# how to prove that $f(n)=n^3+n\log^2n$ = $\theta(n^3)$?

i have $$f(n)=n^3+n\log^2n$$ and i was trieng to prove that $$f(n)=n^3+n\log^2n$$ = $$\theta(n^3)$$. but i feel that i am doing it all wrong , which means i understand why the statent is true but i don't know if the way i proved it was enough.. here is what i did so far :

first i need to prove that : $$f(n)=n^3+n\log^2n$$ = $$O(n^3)$$ We can choose constant C like this : if we devide the equation with $$n^3$$ then we get : $$1+n\log^2n/n^3$$ $$<=$$ $$C$$ but $$n\log^2n/n^3$$ <= 1 for every n so if we choose C to be C>=2 then this will be proved.

second i need to prove :$$f(n)=n^3+n\log^2n$$ = $$pi(n^3)$$ this i think doesn't need to be proved because if i choose any C<1 then for every n we will get : $$n^3+n\log^2n$$ >= $$C(n^3)$$

here is

• What are $\theta$ and pi?..... BTW the codes \le and \leq give $\le$ while \ge and \geq give $\ge$. Nov 21, 2018 at 7:03

Hint: $$\lim_{n \to \infty} \frac{\log n}{\sqrt n} = (\infty / \infty) = (by L'Hospital) \lim_{n \to \infty}\frac{2\sqrt n}{n} =0$$
• @jasmin: basically, $\log n$ grows slower than $\sqrt n$ so $\log^2 n$ grows slower than $n$ which means $n\log^2 n/n^3< 1/n \le 1$ Nov 20, 2018 at 20:35
• To the proposer: For any positive $A,B$ we have $\lim_{x\to \infty}(\ln x)^A/x^B=0.$ Nov 21, 2018 at 7:07