I am doing an exercise which says that this is true: T(n) = 2 + 2T($\frac{n}{4}$) = O($\sqrt{n}$)
So I tried to solve it by substitution, but I am getting a non-sense result. So would really appreciate some pointer in the right direction.
So I want to show it for $\frac{n}{4}$ (sub-question, I am picking $\frac{n}{4}$ to show it for because the recurrence has $T(\frac{n}{4})$, but this might not be the correct way to go always?)
I substitute $T(n/4)$ for $c\sqrt{n}$ in the original equation and get
T($\frac{n}{4}$) $\leq$ 2 + 2(c $\sqrt{\frac{n}{4}}$) =
2 + 2c$\frac{\sqrt{n}}{\sqrt{4}}$ =
2+2c$\frac{\sqrt{n}}{2}$ =
2+c$\sqrt{n}$ $\leq$ c$\sqrt{n}$
Which is clearly not true.