Find Big O using Iteration I am trying to find Big O of this formula: $T(n)=T(n-1)+2n$ by using iteration however I am stuck on a step.

$T(n)=T(n-1)+2n$ I then plugged $T(n-1)$ into the equation so $T(n-1)=T(n-1-1)+2(n-1)$ which then I got $T(n)=T(n-2)+2(n-1)+2n$. $T(n-2)$ gives $T(n-3)+2(n-3)$ which plugging it back in gives $T(n)=T(n-3)+2(n-3)+2(n-1)+2n$. I substituted the following $2(n-3)+2(n-1)+2n$ into a summation that gave me $\sum_{i=0}^k 2(n-i)$$=-(k+1)(k-2n)$. I am not too sure how I should continue.
You're almost there. You correctly have
$$\begin{align}
T(n) &amp;= T(n-1)+2n\\
     &amp;= [T(n-2)+2(n-1)] + 2n = T(n-2)+2(n-1)+2n\\
     &amp;= T(n-3)+2(n-2)+2(n-1)+2n\\
     &amp;= T(n-4)+2(n-3)+2(n-2)+2(n-1)+2n
\end{align}$$
and in general,
$$
T(n)=T(n-j)+2(n-j+1)+2(n-j+2)+2(n-j+3)+\dotsm+2n
$$
Now all you need is the base value for the recurrence. Let's suppose that it was $T(0)=0$ (for the big-O estimate it really wouldn't matter if we had had, say $T(1)=3$ as our base).

To get to the base case, $T(0)$, we'd then need $n-j=0$. In that case, we'd have
$$
T(n)=T(0)+2(1)+2(2)+2(3)+\dotsm+2n= \sum_{k=1}^n2k=2\cdot\frac{n(n+1)}{2} = O(n^2)
$$