Sum of \(k^a\)

Sum of \(k\)

Let $$ S_n=\sum_{k=1}^n = 1+2+3+4+\cdots+n $$ $$ \begin{eqnarray}S_n & = & 1 & + & 2 & + & 3 & + \cdots + & n \\S_n & = & n & + & n-1 & + & n-2 & + \cdots + & 1 \\\end{eqnarray} $$ $$ \begin{eqnarray}2S_n & = & (1+n)+(2+n-1)+(3+n-2) + \cdots + (n+1) \\ & = & \underbrace{(n+1)+(n+1)+(n+1)+\cdots+(n+1)}_{n\ \text{times}} \\& = & n(n+1)\end{eqnarray} $$ Therefore, $$ S_n=\frac{n(n+1)}{2} $$

Sum of \(k^2\)

$$ (k-1)^3 = k^3 - 3k^2 + 3k - 1 $$ $$ k^3 - (k-1)^3 = 3k^2-3k+1 $$ Sum both sides $$ $$ $$\begin{align} \sum_{k=1}^n \left(k^3-(k-1)^3\right) &= \sum_{k=1}^n\left(3k^2 - 3k + 1\right) \\ \sum_{k=1}^n \left(k^3-(k-1)^3\right) &= 3\sum_{k=1}^n k^2 - 3\sum_{k=1}^n k + \sum_{k=1}^n\\ n^3 &= 3 \sum_{k=1}^n k^2 - 3 \sum_{k=1}^n k + \sum_{k=1}^n 1 \\ n^3 &= 3 \sum_{k=1}^n k^2 - 3 \frac{n(n+1)}2 + n \\ 3 \sum_{k=1}^n k^2 &= n^3 + 3 \frac{n(n+1)}2 - n \\ \Rightarrow \sum_{k=1}^n k^2 &= \frac13 n^3 + \frac12 n^2 + \frac16 n \\&= \frac{n(n+1)(2n+1)}6 \end{align}$$

Sum of \(k^3\)