<s>[INST] Find the sum of the first $n$ terms of $\sum^n_{k=1}k^3$ The question:
Find the sum of the first $n$ terms of $$\sum^n_{k=1}k^3$$
[Hint: consider $(k+1)^4-k^4$]
[Answer: $\frac{1}{4}n^2(n+1)^2$]
My solution:
$$\begin{align}
\sum^n_{k=1}k^3&=1^3+2^3+3^3+4^3+\cdots+(n-1)^3+n^3\\
&=\frac{n}{2}[\text{first term} + \text{last term}]\\
&=\frac{n(1^3+n^3)}{2}
\end{align}$$
What am I doing wrong?
 [/INST] Let's take the suggested hint, and consider $$(k+1)^{4}-k^{4}=4k^{3}+6k^{2}+4k+1$$
Summing up both sides from $k=1$ to $n$. Notice that $$\sum_{k=1}^{n}[(k+1)^{4}-k^{4}]=[2^{4}-1^{4}]+[3^{4}-2^{4}]+\ldots+[n^{4}-(n-1)^{4}]+[(n+1)^{4}-n^{4}]$$
Cancelling, we get $(n+1)^{4}-1$. So altogether,
$$(n+1)^{4}-1=4\sum_{k=1}^{n}k^{3}+6\sum_{k=1}^{n}k^{2}+4\sum_{k=1}^{n}k+\sum_{k=1}^{n}1$$
Assuming you already know the results for $\sum1$, $\sum k$, $\sum k^{2}$, we can substitute them in:
$$n^{4}+4n^{3}+6n^{2}+4n+1-1=4S+n(n+1)(2n+1)+2n(n+1)+n$$
$$[n^{4}+4n^{3}+6n^{2}+4n]-[2n^{3}+3n^{2}+n]-[2n^{2}+2n]-[n]=4S$$
Thus, simplifying further
$$n^{4}+2n^{3}+n^{2}=n^{2}(n+1)^{2}=4S \implies \sum_{k=1}^{n}k^{3}=\frac{n^{2}(n+1)^{2}}{4}  \square$$
</s>