Proving a recurrence's $\Theta$ with induction

93 Views Asked by At

Prove with induction that $T(n)=T(\frac n 2)+\log n = \Theta (n^2)$

Starting with the big $O$, the basis $T(2)\le c 2^2$ is obvious.

Assume it's true for $n$ and prove for $n+1$: $T(n)=T(\frac n 2)+\log n \overset{I.H}\le c (\frac n 2 )^2+ \log n \le c \frac {n^2} 4 + \frac {3n^2} 4 =cn^2$

But I didn't reach an expression with a $"n+1"$, so is it still okay?