# Big-O estimate

1. Jul 9, 2009

### TheLegace

1. The problem statement, all variables and given/known data
Hi, I am trying to solve this problem:
I want the Big-O Estimate for this problem
(n*logn + 1)^2 + (logn +1)(n^2+1)

2. Relevant equations
now only real problem comes when I try to do the square of the first term.

I just dont know what (n*logn)^2 would be equal, it may be a it stupid, but it completely escapes my memory how to do it.

Checking on the calculator 2nlogn != (n*logn)^2 neither does n^2logn^2, so although it may be a little stupid, I just cant recall what thats equal to, I have been looking up log rules, but to no avail.

3. The attempt at a solution
To me it makes sense that (n*logn)^2 = 2n*log(n)

2. Jul 9, 2009

### Billy Bob

(n log n)^2 is just n^2 (log n)^2.

Your best big-O estimate for (n*logn + 1)^2 + (logn +1)(n^2+1) is going to be
O( n^2 (log n)^2 ).

Of course, it is also O( n^3), or O( n^8 ), etc., but those aren't best.

[ You might be confusing yourself with the property log(n^2)=2 log n. This property doesn't come into play in this problem. ]