Find a closed form of $\sum_{i=1}^n i^3$ I'm trying to compute the general formula for $\sum_{i=1}^ni^3$. My math instructor said that we should do this by starting with a grid of $n^2$ squares like so:
$$
\begin{matrix}
1^2     & 2^2      & 3^2   &   ...   &   (n-2)^2 & (n-1)^2 & n^2      \\
2^2     & 3^2      & 4^2   &   ...   &   (n-1)^2 & n^2     & 1^2      \\
3^2     & 4^2      & 5^2   &   ...   &   n^2     & 1^2     & 2^2      \\
\vdots &\vdots    & \vdots&\ddots      & \vdots  & \vdots  & \vdots   \\
(n-2)^2 & (n-1)^2  & n^2   &   ...   &   (n-5)^2 & (n-4)^2 & (n-3)^2  \\
(n-1)^2 & n^2      & 1^2   &   ...   &   (n-4)^2 & (n-3)^2 & (n-2)^2  \\
n^2     & 1^2      & 2^2   &   ...   &   (n-3)^2 & (n-2)^2 & (n-1)^2  \\
\end{matrix}
$$
And then sum the rows, and then sum all of the sums of rows. How would I then compute the general formula for $\sum_{i=1}^ni^3$?
 A: Perhaps your instructor wanted to show this.

The total sum must be 
$$(1^3 + 2^3 + 3^3 + \dots  +n^3) +\sum_{i=1}^{n-1} i (n-i)^2= n ( 1^2 + 2^2 + 3^2 + \dots + n^2)$$
Upon simplification i get 
$$\sum_{i=1}^n i^3 = n^3 + \sum_{i=1}^{n-1}   (n i^2 - i (n-i)^2) = n^3 + \sum_{i=1}^{n-1} -i \left(i^2-3 i n+n^2\right) \\ 
\implies 2 \sum_{i=1}^{n-1} i^3 +  n^3  = n^3 +  3 n \sum_{i=1}^{n-1}i^2  - n^2 \sum_{i=1}^n i  $$
Given that you know how to evaluate $\displaystyle \sum_{i=1}^n i^2$, you can calculate the value from above.
A: Notice 
$$k^3 = k(k+1)(k+2) - k(3k+2) = k(k+1)(k+2) - 3k(k+1) + k$$
and following identities for positive integer $m$:
$$\sum_{k=1}^n k(k+1)(k+2)\cdots(k+m-1) =  \frac{1}{m+1} n(n+1)(n+2)(n+3)\cdots(n+m)$$
One get
$$\begin{align}
\sum_{k=1}^n k^3 = & \frac{1}{4}n(n+1)(n+2)(n+3) - n(n+1)(n+2) + \frac12 n(n+1)\\
= & \frac{1}{4}n(n+1)((n+2)(n+3) - 4(n+2) + 2)\\
= & \frac{1}{4}\left(n(n+1)\right)^2\\
= & \left(\sum_{k=1}^n k\right)^2
\end{align}$$
A: Try this link http://mathschallenge.net/library/number/sum_of_cubes It gives full explanation of how to compute it.
