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$?

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.
