<s>[INST] Difficulty Understanding Tom Apostol's Method of Exhaustion Proof In Tom Apostol's Calculus Vol 1 book, Apostol presents the following equation:
$$3[1^2+2^2+...+(n-1)^2]+ 3[1 + 2+ . . . + (n - 1)] + (n - 1)=n^3-1^3$$
He then states that the second sum on the left, which is $[1 + 2+ . . . + (n - 1)]$, is a sum of terms in an arithmetic progression, so that part will simplify to $\frac{n(n-1)}{2}$, thus the final equation becomes this:
$$1^2+2^2+...+(n-1)^2=\frac{n^3}{3}-\frac{n^2}{2}+\frac{n}{6}$$
What I cannot understand is how Apostol simplified $[1 + 2+ . . . + (n - 1)]$ to $\frac{n(n-1)}{2}$. As far as I understand, a sum of terms of an arithmetic progression has the following format: $\frac{n(a+b)}{2}$, with $a$ and $b$ representing the initial and $b$th term of the sequence, respectively. Where does he get $n-1$? Furthermore, how does he simplify the final formula to $1^2+2^2+...+(n-1)^2=\frac{n^3}{3}-\frac{n^2}{2}+\frac{n}{6}$?
 [/INST] Note that you have $n-1$ terms, not $n$. Thus the sum will be of the form $\frac{(n-1)(a+b)}{2}$. Now it makes sense.
After substituting this in the equation you get:
$$3\sum_{k=1}^{n-1} k^2 = n^3 - 1 - (n-1) - 3\frac{n(n-1)}{2} = n^3 - n - \frac{3n^2}{2} + \frac{3n}{2} = n^3 - \frac{3n^2}{2} + \frac{n}{2}$$
$$\sum_{k=1}^{n-1} k^2 = \frac{n^3}{3} - \frac{n^2}{2} + \frac n6$$
</s>