If I were to solve the recurrence of following equation and give asymptotic upper and lower bounds: $$T(n) = 4T(\frac{n}{2}) + n^2 + n$$
Can I apply Master Theorem on this?
My attempt was following: Then,
$f(n) = n^2 + n$ $c = 2$ so it has $O(n^2)$
$a = 4, b = 2,$ $n^{\log_b a} = n^{\log_2 4} = n^2$
Therefore, I applied Case 2, since $n^2+n = \Theta (n^2)$
Can you correct me on this?
A direct approach: the sequence $R(k)=4^{-k}T(2^k)$ solves the recursion $$R(k)=R(k-1)+1+2^{-k},$$ hence $$R(k)=R(0)+k+1-2^{-k}=k+O(1),$$ and $$T(2^k)=k4^k+O(4^k),$$ which, if the sequence $(T(n))$ is well-behaved, yields $$T(n)\in \Theta(n^2\log n).$$ A non-asymptotic upper bound is $$R(k)\leqslant R(0)+k+1=k+1+T(1).$$ If $(T(n))$ is nondecreasing, using the smallest $k$ such that $2^k\geqslant n$, one gets $$ T(n)\leqslant 4n^2(\log n+\log2+1+T(1)).$$ Likewise, a non-asymptotic lower bound is $$R(k)\geqslant R(0)+k=k+T(1).$$ If $(T(n))$ is nondecreasing, using the largest $k$ such that $2^k\leqslant n$, one gets $$ T(n)\geqslant n^2(\log n+T(1)).$$