TITLE: Recurrence trouble: $T(n)=2T(n/2)+T(n/3)+\theta(n^2)$
QUESTION [5 upvotes]: I have to solve the following recurrence :$\displaystyle T(n)=2T(n/2)+T(n/3)+\theta(n^2)$ 
I have done the whole tree analyses and  now I have to prove that $\displaystyle T(n) \leq dn^{2}\log_{2}(n)$ but I can not find mathematical way to prove that, is there any trick with logarithms that I can use?

REPLY [4 votes]: Do it by induction. First, let's set the constant in $\theta$ to 1, so we get
$T(n)=2T(n/2)+T(n/3)+n^2$
Now, assume $T(m) \leq k m^2$ for some constant $k$ for all $m < n$. Then
$T(n) = 2 T(n/2) + T(n/3) + n^2 \leq k n^2/2 + k n^2/9 + n^2 \leq (11 k /18 +1) n^2 $
and if $k = 3$, say, we have
$T(n) \leq (11/6+1) n^2 \leq 3 n^2.$
so if our bound holds for all $m < n$, then our bound holds for $n$. 
To make this a real proof, you would need to take the case when $n$ is not a multiple of 6 into account, but the details will work out when you do them carefully.