Big-O Estimate for (n*logn + 1)^2 + (logn + 1)(n^2+1) - Homework Problem

  • Thread starter Thread starter TheLegace
  • Start date Start date
  • Tags Tags
    Estimate
TheLegace
Messages
26
Reaction score
0

Homework Statement


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)

Homework Equations


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

I just don't 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 can't recall what that's equal to, I have been looking up log rules, but to no avail.

The Attempt at a Solution


To me it makes sense that (n*logn)^2 = 2n*log(n)
Thank You For Your Help.
 
Physics news on Phys.org
(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. ]
 
Back
Top