Integrating sum 
*

*$\displaystyle \sum_{k=1}^n k=\dfrac{n(n+1)}{2}$


Which is equivalent of saying, $$1+2+3+4+5+\cdots+n=\dfrac{n(n+1)}{2}$$
Now how do I integrate the left side of the equality and how that would look like?
Integrating the right side gives $\int \dfrac{n(n+1)}{2} \, \mathrm dn =\dfrac{1}{2}(\dfrac{n^3}{3}+\dfrac{n^2}{2})$
Which is quite similar to the sum $\dfrac{1}{2}\displaystyle \sum_{k=1}^n k^2=\dfrac{1}{2}(\dfrac{n^3}{3}+\dfrac{n^2}{2}+\dfrac{n}{6})$
Can someone explain these?

This phenomenon is closely related to Umbral Calculus and Faulhaber's formula. Specifically, the Umbral form of Faulhaber's formula is:
$$\sum_{k=1}^nk^p=\frac{1}{p+1}\sum_{j=0}^p\binom{p+1}{j}B_jn^{p+1-j}=\frac{(B+n)^{p+1}-B^{p+1}}{p+1},$$
where $B$ is the "umbral" identification of Bernoulli polynomials, where we effectively stated that $B_j=B^j$ (there is a rigorous way of defining this, see the above links). This comes from the duality of $(x^n)'=nx^{n-1}$ and $(B_n(x))'=nB_{n-1}(x)$.
Write $k^p=(k+x)^p$ with $x=0$. Then, integrating both sides in $x$ and setting $x=0$ gives:
$$\frac{1}{p+1}\sum_{k=1}^nk^{p+1}=\frac{(B+n)^{p+2}-B^{p+2}}{(p+1)(p+2)},$$
as desired, after clearing the $p+1$ factors.
