Sum of Sequence of Cubes

Theorem:$$\sum_{i=1}^n i^3 = \frac{n^2(n+1)^2}{4}$$

Proof: We use induction on $$n\,$$. The base case holds since $$1^3=\frac{1 (1+1)^2}{4}$$ Now we need to show that if it holds for $$n\,$$, it holds for $$n+1\,$$. $$\sum_{i=1}^{n+1} i^3=\sum_{i=1}^n i^3+(n+1)^3$$ $$=\frac{n^2(n+1)^2}{4}+(n+1)^3$$ (by the induction hypothesis) $$=\frac{n^4+2n^3+n^2}{4}+\frac{4n^3+12n^2+12n+4}{4}$$ $$=\frac{n^4+6n^3+13n^2+12n+4}{4}$$ $$=\frac{(n+1)^2(n+2)^2}{4}$$

By the Principle of Mathematical Induction, the proof is complete.