1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Big-O estimate

  1. Jul 9, 2009 #1
    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)
    Thank You For Your Help.
  2. jcsd
  3. Jul 9, 2009 #2
    (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. ]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for estimate
Estimating Eigenvalues from linear ODE