General Method
Now she tells us!

T (n)    =    T(1)                   for n = 1
                  aT(n/b)+f(n)     for n > 1

Do the expansions (book calls this the substition method). The text notes,
it can be shown that

Use this with the homework:
T(n) = 8 T(n/2) + n3
Hint: The solution contains a term cn3log2n.

How does this compare?


T (n)    = aT(n/b)+f(n)
T(n) = 8 T(n/2) + n3     so a = 8 and b = 2 and f(n)is n3

nlogba = nlog28 = n3

T(n) = n3[T(1) + u(n)] where u(n)= j=1 to k h(bj) and h(n)= f(n)/nlogba

so looking at h(n), n3/n3 = 1.     How nice h(n) = 1

so u(n) = j=1 to k 1     = k

but what is k? log2n

We have T(n) = n3[T(1) + u(n)]

so T(n) = n3[T(1) + log2n]

T(1) = 1 so T(n) = n3[ 1 + log2n] = n3 + n3log2n