# Find the sum $\sum\limits_{i=1}^{n}i^k$ using integration.

Observe that we can find the sum $\sum\limits_{i=1}^{n}i^3$ using "integration": $$\sum\limits_{i=1}^{n}\frac{i^3}{3}=\int\sum\limits_{i=1}^{n}i^2dn.$$ and actually we get exactly the right result(if we know the sum of $i^2$ in terms of $n$) For other $k$ this approach is not generally true, but by integrating the sum we still get the right coefficient. What is the reason behind this method? Does this integration have a name and can we utilize the method to get the sum $\sum\limits_{i=1}^{n}i^k$ in terms of $n$?

• The integral of $i^2$ is not $i^3/3$ because here $i$ is a constant. It doesn't even make sense to say $di$ when $i$ is a fixed integer like that. – Gregory Grant Nov 13 '17 at 20:42

Let $S_k(n)=\sum_{i=1}^n i^k$. It's easy to prove that $S_k(n)$ is a polynomial of degree $k+1$ in $n$. It is characterised by $S_k(0)=0$ and $S_k(x)-S_k(x-1)=x^k$. Differentiating the last gives $$S_k'(x)-S_k'(x-1)=kx^{k-1}=k(S_{k-1}(x)-S_{k-1}(x-1)).$$ Therefore $$S_k'(x)-kS_{k-1}(x)=S_k'(x-1)-kS_{k-1}(x-1)$$ which implies that $S'_k(x)-kS_{k-1}(x)$ is a constant. Let's call that $C_k$. Then $$S_k(x)=\int_0^x(kS_{k-1}(t)+C_k)\,dt =C_kx+k\int_0^x S_{k-1}(t)\,dt.$$ Of course, $C_k$ is determined by the condition that $S_k(1)=1$. So we more-or-less get $S_k$ by integrating $kS_{k-1}$....