<s>[INST] Find a closed form for $\sum_{k=0}^{n} k^3$ Find a closed form for $\sum_{k=0}^{n} k^3$.
I would appreciate ideas for approaching questions like this in general as well.
Thanks.
 [/INST] Consider the polynomial
$$\sum_{k=0}^n(z+1)^k=\frac{(z+1)^{n+1}-1}{z}=(n+1)+\frac{(n+1)n}2z+\frac{(n+1)n(n-1)}6z^2+\frac{(n+1)n(n-1)(n-2)}{24}z^3...$$
when $z=0$, it takes the value $$\color{blue}{\sum_{k=0}^n1=n+1}.$$
Derive on $z$:
$$\sum_{k=0}^nk(z+1)^{k-1}=\frac{(n+1)n}2+\frac{2(n+1)n(n-1)}6z+\frac{3(n+1)n(n-1)(n-2)}{24}z^2...$$
when $z=0$, it takes the value $$\color{blue}{\sum_{k=0}^nk=\frac{(n+1)n}2}.$$
Multiply by $z+1$:
$$\sum_{k=0}^nk(z+1)^{k}=\frac{(n+1)n}2+\frac{3n(n+1)+2(n+1)n(n-1)}6z+\frac{8(n+1)n(n-1)+3(n+1)n(n-1)(n-2)}{24}z^2...$$
Derive on $z$:
$$\sum_{k=0}^nk^2(z+1)^{k-1}=\frac{(n+1)n(2n+1)}6+\frac{(n+1)n(n-1)(3n+2)}{12}z...$$
when $z=0$, it takes the value $$\color{blue}{\sum_{k=0}^nk^2=\frac{(n+1)n(2n+1)}6}.$$
Multiply once more by $z+1$ and derive to get the third order sum. The constant term is
$$\frac{(n+1)n(2n+1)}6+\frac{(n+1)n(n-1)(3n+2)}{12}=\frac{3(n+1)n(n^2+n)}{12},$$
giving:
$$\color{blue}{\sum_{k=0}^nk^3=\frac{(n+1)^2n^2}4}.$$
</s>