# Sum of Sequence of Cubes/Proof by Recursion

## Theorem

$\ds \sum_{i \mathop = 1}^n i^3 = \paren {\sum_{i \mathop = 1}^n i}^2 = \frac {n^2 \paren {n + 1}^2} 4$

## Proof

$(1): \quad \displaystyle \map A n := \sum_{i \mathop = 1}^n i = \frac{n \paren {n + 1} } 2$
$(2): \quad \displaystyle \map B n := \sum_{i \mathop = 1}^n i^2 = \frac{n \paren {n + 1} \paren {2 n + 1} } 6$

Let $\displaystyle \map S n = \sum_{i \mathop = 1}^n i^3$.

Then:

 $\ds \map S n$ $=$ $\ds n^3 + \paren {n - 1}^3 + \paren {n - 2}^3 + \cdots + 2^3 + 1^3$ $\ds$ $=$ $\ds \sum_{k \mathop = 0}^{n \mathop - 1} \paren {n - k}^3$ $\ds$ $=$ $\ds \sum_{k \mathop = 0}^{n \mathop - 1} \paren {n^3 - 3 n^2 k + 3 n k^2 - k^3}$ $\ds$ $=$ $\ds n^4 - 3 n^2 \cdot \map A {n - 1} + 3 n \cdot \map B {n - 1} - \map S {n - 1}$ $\text {(3)}: \quad$ $\ds \leadsto \ \$ $\ds \map S n$ $=$ $\ds n^4 - 3 n^2 \cdot \frac {n \paren {n - 1} } 2 + 3n \cdot \frac{n \paren {n - 1} \paren {2 n - 1} } 6 - \map S {n - 1}$ substituting from $(1)$ and $(2)$ $\text {(4)}: \quad$ $\ds \map S n$ $=$ $\ds n^3 + \map S {n - 1}$ recursive definition $\ds \leadsto \ \$ $\ds 2 \map S n$ $=$ $\ds n^4 + n^3 - 3 n^2 \cdot \frac {n \paren {n - 1} } 2 + 3 n \cdot \frac {n \paren {n - 1} \paren {2 n - 1} } 6$ adding $(3)$ and $(4)$ $\ds \leadsto \ \$ $\ds$ $=$ $\ds \frac {n^2 \paren {n + 1}^2} 2$ simplification $\ds \leadsto \ \$ $\ds \map S n$ $=$ $\ds \frac {n^2 \paren {n + 1}^2} 4$

$\blacksquare$