I was trying to solve
$T(n) = T(n-1)+\log^2(n)$
using substitution method and variables substitution but I can't find the correct answer.
Let $m = \log(n)$
then $T(2^m) = T(2^m-1)+m^2$
next, we assume that $S(m) = T(2^m)$
so $S(m) = S(m-1)+m^2$ but here I'm stuck with this passage and I can't continue. Am i doing something wrong? Any tips?