How to determine equation for $\sum_{k=1}^n k^3$
How do you find an algebraic formula for $\sum_{k=1}^n k^3$? I am able to find one for $\sum_{k=1}^n k^2$, but not $k^3$. Any hints would be appreciated.
You can derive it from the formulas for the sums of lower powers:
$$\begin{align*} \sum_{k=1}^nk^3&=\sum_{k=1}^n\left(k\cdot k^2\right)\\ &=\sum_{k=1}^nk^2\sum_{i=1}^k1\\ &=\sum_{k=1}^n\sum_{i=1}^kk^2\\ &=\sum_{i=1}^n\sum_{k=i}^nk^2\\ &=\sum_{i=1}^n\left(\sum_{k=1}^nk^2-\sum_{k=1}^{i-1}k^2\right)\\ &=\sum_{i=1}^n\left(\frac16n(n+1)(2n+1)-\frac16i(i-1)(2i-3)\right)\\ &=\frac16n^2(n+1)(2n+1)-\frac16\sum_{i=1}^ni(i-1)(2i-3)\\ &=\frac16n^2(n+1)(2n+1)-\frac16\sum_{i=1}^n\left(2i^3-5i^2+3i\right)\\ &=\frac16n^2(n+1)(2n+1)+\frac56\sum_{i=1}^ni^2-\frac12\sum_{i=1}^ni-\frac13\sum_{i=1}^ni^3\\ &=\frac16n^2(n+1)(2n+1)+\frac5{36}n(n+1)(2n+1)-\frac14n(n+1)-\frac13\sum_{k=1}^nk^3\;, \end{align*}$$
and from here you can clearly solve for $\sum_{k=1}^nk^3$. Evidently this technique can be applied repeatedly, though it rapidly becomes very tedious.
Graham, Knuth, & Patashnik, Concrete Mathematics, offer many other approaches, including via finite calculus and generating functions.
Added (because I like it): The finite calculus approach requires first rewriting $k^3$ in terms of the falling factorials $k^{\underline1}=k$, $k^{\underline2}=k(k-1)=k^2-k$, and $k^{\underline3}=k(k-1)(k-2)=k^3-3k^2+2k$:
$$k^3=k^{\underline3}+3k^2+2k=k^{\underline3}+3k^{\underline2}+k^{\underline1}\;.$$
The coefficients are Stirling numbers of the second kind: in general $$x^n=\sum_{k=0}^n{n\brace k}x^{\underline k}\;.$$
Then
$$\begin{align*} \sum_{k=1}^nk^3&=\sum_{k=1}^n\left(k^{\underline3}+3k^{\underline2}+k^{\underline1}\right)\\ &=\left[\frac14k^{\underline4}+k^{\underline3}+\frac12k^{\underline2}\right]_1^{n+1}\\ &=\frac14n(n+1)(n-1)(n-2)+n(n+1)(n-1)+\frac12n(n+1)-0\\ &=\frac14n(n+1)\Big(n^2-3n+2+4(n-1)+2\Big)\\ &=\frac14n(n+1)\left(n^2+n\right)\\ &=\frac14n^2(n+1)^2\;. \end{align*}$$
There is a nice introduction to finite calculus in Section $2.6$ of Graham, Knuth, & Patashnik, Concrete Mathematics; Pete L. Clark has a handout with another introduction here.
Here is another approach,
$$ \sum_{k=1}^{n} (k+1)^4 - \sum_{k=1}^{n} k^4 = (n+1)^4-1 $$
$$ \implies 4\sum_{k=1}^{n}k^3 + 6\sum_{k=1}^{n} k^2 + 4\sum_{k=1}^{n}k + \sum_{k=1}^{n}1 = (n+1)^4 -1 $$
$$ \implies 4\sum_{k=1}^{n}k^3 = (n+1)^4-1-6\sum_{k=1}^{n}k^2 - 4\sum_{k=1}^{n}k - \sum_{k=1}^{n}1$$
$$ \implies \sum_{k=1}^{n}k^3 = \dots. $$
The general approach is to write $p(k)$ in terms of the polynomals $\binom{k}{i}$ with $i=0,1,2,\dots$
For example, $$k^3 = 6\binom k 3 + 6\binom k 2 + \binom k 1$$
Now, since $$\sum_{k=1}^{n} \binom{k}{i} = \binom{n+1}{i+1}$$
you get:
$$\sum_{k=1}^{n} k^3 =6\binom{n+1}{4} + 6\binom{n+1}{3} + \binom{n+1}{2}$$
(There is a slight problem above when $i=0$. You really need sums from $k=0$ to $n$ for that case. In all other cases, $k=0$ doesn't add anything.)