<s>[INST] Proving by induction that $\sum_{i=2}^n(i^2-i) = \frac{n(n^2-1)}{3}$ for all $n \ge 2$ Doing proof by induction exercises, everything was fine until I tried to do one with $\sum$
:

Prove that
$$\sum_{i=2}^n(i^2-i) = \frac{n(n^2-1)}{3}$$
holds for all $n \ge 2$.

Now, my real problem is converting an algebraic expression to another (see bottom of question), but if you're curious here's the whole process.

Test it for $n = 2$:
$$\sum_{i=2}^2(i^2-i) = \frac{2(2^2-1)}{3}$$
$$(2^2-2) = \frac{2\cdot3}{3}$$
$$2 = \frac{6}{3}$$

We have to prove that it holds for $n + 1$, that is:
$$\sum_{i=2}^{n+1}(i^2-i) = \frac{(n+1)((n+1)^2-1)}{3}$$

Assume
$$\sum_{i=2}^n(i^2-i) = \frac{n(n^2-1)}{3}$$

Prove it. Have:
$$\sum_{i=2}^{n+1}(i^2-i)$$
Okay so, I normally attempt to use the hypothesis to make some replacement, but to do so I need to expand a bit this sum. I will try separating the last element in the sum, which I think would be like this:
$$\sum_{i=2}^{n}(i^2-i) + \color{blue}{((n+1)^2-(n+1))}$$
Because, it seems to me, that in the last element of the sum, the $i$ would be $(n+1)$.
Now I can make the replacement with the hypothesis that I wanted:
$$\color{blue}{\frac{n(n^2-1)}{3}} + ((n+1)^2-(n+1))$$
$$\frac{n(n^2-1)+3((n+1)^2-(n+1))}{3}$$
Not sure. I'll just try expanding that quadratic.
$$\frac{n(n^2-1)+3(n^2+2n+1-n-1)}{3}$$
$$\frac{n(n^2-1)+3(n^2+n)}{3}$$
$$\frac{n(n^2-1)+(3n^2+3n)}{3}$$
$$\frac{n^3-n+3n^2+3n}{3}$$
$$\frac{n^3+3n^2+2n}{3}$$
$$\frac{n^3+3n^2 + 2n}{3}$$
$$\frac{n^2(n+3)+2n}{3}$$

It does seem to me like this last expression is indeed equivalent to what I want to prove $\frac{(n+1)((n+1)^2-1)}{3}$, but I can't seem to figure how to transform it into that. How can I proceed?
 [/INST] MY approach:
first show that $\sum^n i = \frac{n(n+1)}{2} $ and $\sum^n i^2 = \frac{n(n+1)(2n +1 )}{6} $.
To show then, it is much easier the induction. So, therefore
$$ \sum^n (i^2 - i) = \sum^n i^2 - \sum^n i = \frac{n(n+1)(2n +1 )}{6} - \frac{n(n+1)}{2} =   $$
$$ = \frac{n(n+1)(2n-1) - 3n(n+1)}{6} = \frac{(n+1)(2n^2 + n - 3n )}{6} = \frac{(n+1)(2n^2 - 2n)}{6} =$$
$$ = \frac{(n+1)(n^2 - n)}{3} = \frac{n(n+1)(n-1)}{3} = \frac{n(n^2-1)}{3}$$
</s>