title: Finding the complexity T(n) = 4T(n/2) + (n^2)*logn using the iteration method
body: <p>I need to find complexity of this recursion using the iteration method only:</p>
  
  <pre><code>T(n) = 4T(n/2) + (n^2)*logn
  </code></pre>
  
  <p>I know that you can solve this using the master method and the complexity is <code>(n^2)(logn)^2</code>, but I tried solving it using the iteration method and I got something else:</p>
  
  <pre><code>T(n) = 4 * T(n/2) + (n^2) * log(n)
  T(n/2) = 4 * T (n/4) + ((n/2)^2) * log(n/2)
  T(n/4) = 4 * T(n/8) + ((n/4)^2) * log(n/4)
  
  T(n) = 4 * (4 *  (4 * T(n/8) + (n/4)^2 * log(n/4)) + (n/2)^2 * log(n/2)) + (n^2) * log(n)
  
  T(n) = 64T(n/8) + 16((n/4)^2) * log(n/4) + 4((n/2)^2) * log(n/2) + (n^2)log(n)
  
  T(n) = (4^i) * T(n/(2^i)) + 4^(i-1) * (n/(2^(i-1)))^2 * log(n/(2^(i-1)))
  </code></pre>
  
  <p>After using i = logn I get that the algorithm has a complexity of 2^n.. which is incorrect.</p>