I have no idea how to solve this. My math proving skills are pretty rusty. The problem gives the following definition to start:
$$T(n) = \begin{cases} 1 \text{ if } n = 1 \\ T(n-1) + n \text{ otherwise} \end{cases}$$
Show, by induction, that $T(n) = \frac{n(n+1)}{2}$.
My Attempt
So they're giving a recurrence relation as a place to start. So, I imagine I need to find a closed form. Expanding the piecewise function we have,
\begin{align*} T(1) &= 1 \\ T(2) &= T(2-1) + 1 \\ &= T(1) + 1 \\ &= 1 + 1 \\ &= 2 \\ T(3) &= T(3-1) + 1 \\ &= T(2) + 1 \\ &= 2 + 1 \\ &= 3 \\ &\vdots \\ T(n) &= \frac{n(n+1)}{2} \text{ since it appears to be the sum of the first n ints.} \end{align*}
Proof.
Base case. Let $n = 1$. Then, $T(1) = \frac{1(1+1)}{2} = \frac{2}{2} = 1$, as defined.
Induction. Suppose, $T(n) \implies T(n+1)$. Then by definition,
$$ \frac{n(n+1)}{2} \implies \frac{(n+1)((n+1)+1)}{2} = \frac{(n+1)(n+2)}{2} = \frac{n^2+3n+2}{2} $$
Suppose $\frac{n(n+1)}{2}$ for some $n > 1$.
This is as far as I get. I know I need to use the inductive hypothesis at some point here, I just don't know/remember how/where to do that at. Any help is greatly appreciated.