I am very upset about this.
The third issue of CLRS, p. 95 (chapter 4.5), mentions relapses such as
T(n) = 2T(n/2) + n lg n
cannot be solved using the main theorem, since the difference
f(n)/n^(log_b(a)) = (n lg n)/n^1 = lg n
is not a polynomial.
But then I come across pages, for example this , where the same repetition is mentioned at the bottom of the page and says that this can be solved using the main theorem, because it falls into "extended case 2", although the difference is not polynomial. It becomes n lg^2 n (increasing the log factor by f(n) by one).
Then I come across pages like this , where in example (e) it seems like a clear application of Extended Case 2 (repeating T(n) = 4T(n/2) + n^2 lg n ), but then the solution is not n^2 log^2 n , but rather n^2 log n ! Am I mistaken or is the article incorrectly written?
Can anyone clarify the contradictions and make it very clear when the Master Theorem can be used, and when it is impossible? When is the polynomial difference checked, and when not? Is extended case 2 usable, or is it really breaking something?
EDIT:
I tried to solve recursion (e) directly from the second article, and I get:
T(n) = n^2 lg^2(n)/2 + n^2 lg(n)/2
Is this not a big theta n^2 lg^2 n ?