Visual Calculus, Power Sums and Bernoulli Coefficients

Intro

My goal here is to motivate a natural construction of the general formula for sums of powers of integers through a geometrical understanding of derivation and integration of power functions. The core insight then lies in peeling an hypercube with the finite difference operator and decomposing layers in blocks of volumes of lower powers. Transitioning from that elementary induction formula to a general polynomial expression for the nn-th power sum leads to the introduction of a well known family of coefficients: the Bernoulli numbers..

In the following sections ff denotes the n-th power function : xxnx\mapsto x^n.

Differentiation


(Differentiation of Power Functions). xR\forall x \in \mathbb R, f(x)=nxn1f'(x)=n\cdot x^{n-1}.


picture

Proof/Geometrical Intuition. The rate of growth of an hypercube with respect to the length of one of its edges equals half the volume of its outer shell, i.e the volume of one of its walls times its number of walls, divided by 2. Consider the nn-cube cornered at the origin so that half of its walls are leaning against our frame (see fig.1 for nn=3), the derivative of ff corresponds to the rate at which our hypervolume grows/shrinks as xx grows/diminishes. A look at figure 1.1 should help one gain confidence in the fact that this rate is indeed equal to half the number of walls of the hypercube times the current volume of one of these walls. There are 2n2n walls 1, each having an area of xn1x^{n-1}.

With a bit more algebra :

The coloured volume is :

Δh[f](x)=(x+h)nxn=k=0n(nk)xkhnkxn=k=0n1(nk)xkhnk\Delta_h[f](x)=(x+h)^n-x^n=\sum_{k=0}^{n}\binom{n}{k}x^k h^{n-k}-x^n=\sum_{k=0}^{n-1}\binom{n}{k}x^k h^{n-k}

In particular :

Δ[f](x)=(x+1)nxn=k=0n(nk)xkxn=k=0n1(nk)xk\Delta[f](x)=(x+1)^n-x^n=\sum_{k=0}^{n}\binom{n}{k}x^k-x^n=\sum_{k=0}^{n-1}\binom{n}{k}x^k

And:

f(x)=limh0Δh[f](x)h=limh0k=0n1(nk)xkhn1k=nxn1f'(x)=\lim_{h \to 0}\frac{\Delta_h[f](x)}{h}=\lim_{h \to 0}\sum_{k=0}^{n-1}\binom{n}{k}x^k h^{n-1-k}=n\cdot x^{n-1}

Integration


(Integration of Power Functions). xR\forall x \in \mathbb R, 0xf(t)dt=xn+1n+1\int_{0}^{x}f(t)dt=\frac{x^{n+1}}{n+1}.


We use similar insights and a similar setting to get a grasp of the formula for a primitive of the n-th power function. For simplicity we consider the integral of ff to be from 00 to xx.

Proof/Geometrical Intuition. The integral of the nn-th power is equal to the volume of the (n+1)(n+1)-cube divided by half of its number of walls. To see this, look at what happens when we integrate our nn-cubes : we start with a point (the nn-cube of side-length 00) at the origin of our frame and keep piling up nn-cubes until we’ve reached one of the n+1n+1 walls of the (n+1)(n+1)-cube that don’t have our starting point as a vertex (figure 1.2). There are n+1n+1 ways to choose the destination wall, hence the division by n+1n+1 in the formula.

picture

Power Sums

Let Sm(n)S_m(n) stand for the power sum of power mm :

Sm(n):=k=0n1km=0m+1m+2m++(n1)mS_m (n):=\sum_{k=0}^{n-1}k^m=0^m + 1^m + 2^m + \ldots + (n-1)^m

The formulas for the sums of low order are the following well known identities :

  • S1(n)=1+2++(n1)=n(n1)2S_1(n)=1 + 2 + \ldots + (n-1)=\frac{n (n-1)}{2}

  • S2(n)=12+22++(n1)2=n(n1)(2n+1)6S_2(n)=1^2 + 2^2 + \ldots + (n-1)^2=\frac{n (n-1) (2n+1)}{6}

  • S3(n)=13+23++(n1)3=[1+2++(n1)]2=n2(n1)24S_3(n)=1^3 + 2^3 + \ldots + (n-1)^3=\left[1 + 2 + \ldots + (n-1)\right]^2=\frac{n^2(n-1)^2}{4}

These nn-th power sums are Riemann sums for the (n+1)(n+1)-th power function with a subdivision of length 11. Hence the expression of the sum of power mm being of dimension m+1m+1. One way to come up with a general formula for Sm(n)S_m (n) would then be to check the gap (in blue in fig. 3) between the continuous sum (the integral) and the discrete sum on each interval of the subdivision and then sum for the whole subdivision (see fig. 3).

picture

Sm(n)=0nxm.dxk=0n1[kk+1xm.dxkm]=nm+1m+1k=0n1[(k+1)m+1km+1m+1km]=nm+1m+1k=0n1[i=0m(m+1i)kim+1km]=1m+1[nm+1k=0n1i=0m1(m+1i)ki]=1m+1[nm+1i=0m1(m+1i)k=0n1ki]=1m+1[nm+1i=0m1(m+1i)Si(n)]\begin{aligned} S_m (n)&=\int_{0}^{n}x^m.dx-\sum_{k=0}^{n-1}\left[\int_{k}^{k+1}x^m.dx-k^m\right]\\ &= \frac{n^{m+1}}{m+1}-\sum_{k=0}^{n-1}\left[\frac{(k+1)^{m+1}-k^{m+1}}{m+1}-k^m\right]\\ &=\frac{n^{m+1}}{m+1}-\sum_{k=0}^{n-1}\left[\frac{\sum_{i=0}^{m}\binom{m+1}{i}k^i}{m+1}-k^m\right]\\ &=\frac{1}{m+1}\cdot\left[n^{m+1}-\sum_{k=0}^{n-1}\sum_{i=0}^{m-1}\binom{m+1}{i}k^i\right]\\ &=\frac{1}{m+1}\cdot\left[n^{m+1}-\sum_{i=0}^{m-1}\binom{m+1}{i}\sum_{k=0}^{n-1}k^i\right]\\ &=\frac{1}{m+1}\cdot\left[n^{m+1}-\sum_{i=0}^{m-1}\binom{m+1}{i}S_i(n)\right] \end{aligned}

(Induction Formula for Power Sums).

Sm(n)=1m+1[nm+1i=0m1(m+1i)Si(n)]S_m(n)=\frac{1}{m+1}\cdot\left[n^{m+1}-\sum_{i=0}^{m-1}\binom{m+1}{i}S_i(n)\right]

Looking back, the main geometrical insight behind this induction formula is the fact that peeling the nn-cube layer by layer with the finite difference operator Δ[f]\Delta[f] yields a collection of (np)\binom{n}{p} blocks of volume pp. We can thus reach the same formula without any mention of integration by looking at the decomposition of a single layer:

Δ[f](k)=(k+1)m+1km+1=i=0m+1(m+1i)kikn=k=0m(m+1i)ki\Delta[f](k)=(k+1)^{m+1}-k^{m+1}=\sum_{i=0}^{m+1}\binom{m+1}{i}k^i-k^n=\sum_{k=0}^{m}\binom{m+1}{i}k^i

And then putting back all the layers together to re-assemble the nn-cube :

nm+1=k=0n1Δ[f](k)=k=0n1(k+1)m+1km+1=k=0n1i=0m+1(m+1i)kikn=k=0n1k=0m(m+1i)ki=k=0m(m+1i)Si(n)\begin{aligned} n^{m+1}=\sum_{k=0}^{n-1}\Delta[f](k)&= \sum_{k=0}^{n-1}(k+1)^{m+1}-k^{m+1}\\ &=\sum_{k=0}^{n-1}\sum_{i=0}^{m+1}\binom{m+1}{i}k^i-k^n\\ &=\sum_{k=0}^{n-1}\sum_{k=0}^{m}\binom{m+1}{i}k^i\\ &=\sum_{k=0}^{m}\binom{m+1}{i}S_i(n) \end{aligned}

Which is the exact same formula :


(Decomposition of the Hypercube).

nm+1=k=0n1k=0m(m+1i)ki=i=0m(m+1i)Si(n)n^{m+1}=\sum_{k=0}^{n-1}\sum_{k=0}^{m}\binom{m+1}{i}k^i=\sum_{i=0}^{m}\binom{m+1}{i}S_i(n)

Bernoulli Numbers

Because of this decomposition of the nn-cube in blocks of volume p<np < n it is easy to see that Sm(n)S_m(n) is always a polynomial of degree m+1m+1 in nn with leading coefficient 1m+1\frac{1}{m+1} and constant term zero. Now we want the expression of all its coefficients in order to write it down as a function of nn. Since these coefficients depend on mm, we label the kk-th coefficient for Sm(n)S_m(n) as Ak1(m)A_{k-1}(m) (for the term in nmkn^{m-k}).

That is to say :

Sm(n)=k=0mAk(m)nm+1kS_m(n)=\sum_{k=0}^{m}A_k(m)n^{m+1-k}

(A0(m)A_0(m) is the coefficient of the term of highest order in Sm(n)S_m(n) (i.e the term in nm+1n^{m+1}), A1(m)A_1(m) the coefficient of the term of second highest order in Sm(n)S_m(n) (i.e the term in nmn^{m}), etc.)

From (I) we can deduce the following induction relation for the AkA_k :

Ak+1(m)=1m+1[(m+1mk1)A0(mk1)(m+1mk)A1(mk)(m+1m1)Ak(m1)]=1m+1i=0k[(m+1mk1+i)Ai(mk1+i)]\begin{aligned} A_{k+1}(m)&=\frac{1}{m+1}\left[-\binom{m+1}{m-k-1}A_0(m-k-1)-\binom{m+1}{m-k}A_1(m-k)-\ldots -\binom{m+1}{m-1}A_{k}(m-1)\right]\\ &=\frac{1}{m+1}\sum_{i=0}^{k}\left[-\binom{m+1}{m-k-1+i}A_i(m-k-1+i)\right] \end{aligned}

If we look at the first few coefficients we find that :

A0(m)=1m+1=1m+1[(m+1m+1)][1]A1(m)=1m+1[(m+1m1)A0(m1)]=1m+1[(m+1m1)1m]=1m+1[(m+1m)][12!]A2(m)=1m+1[(m+1m2)A0(m2)(m+1m1)A1(m1)]=1m+1[(m+1m2)1m1(m+1m1)1m[(mm1)][12!]]=1m+1(m+1m1)[2!3!+12!]\begin{aligned} A_0(m)&=\frac{1}{m+1} \\ &=\boldsymbol{\frac{1}{m+1}\left[\binom{m+1}{m+1}\right]\left[1\right]}\\ A_1(m)&=\frac{1}{m+1}\left[-\binom{m+1}{m-1}A_0(m-1)\right]\\ &=\frac{1}{m+1}\left[-\binom{m+1}{m-1}\frac{1}{m}\right]\\ &=\boldsymbol{\frac{1}{m+1}\left[\binom{m+1}{m}\right]\left[-\frac{1}{2!}\right]}\\ A_2(m)&=\frac{1}{m+1}\left[-\binom{m+1}{m-2}A_0(m-2)-\binom{m+1}{m-1}A_1(m-1)\right]\\ &=\frac{1}{m+1}\left[-\binom{m+1}{m-2}\frac{1}{m-1}-\binom{m+1}{m-1}\frac{1}{m}\left[\binom{m}{m-1}\right]\left[-\frac{1}{2!}\right]\right]\\ &=\boldsymbol{\frac{1}{m+1}\binom{m+1}{m-1}\left[-\frac{2!}{3!}+\frac{1}{2!}\right]} \end{aligned}

As one works his way through the successive computations it becomes clear that every Ai(m)A_i(m) can be written under the following form:

Ai(m)=1m+1(m+1m+1i)BiA_i(m)=\frac{1}{m+1}\binom{m+1}{m+1-i}B_i

It is not difficult to prove that result by induction. We’ve already verified it for A0(m)A_0(m), A1(m)A_1(m) and A2(m)A_2(m) and if we suppose that this is true for all i<ki<k then :

Ak+1(m)=1m+1i=0k[(m+1mk1+i)Ai(mk1+i)]=1m+1i=0k[(m+1mk1+i)1mk+i(mk+imk)Bi]=1m+1i=0k[(m+1mk)(k+2i)1k+2Bi]=1m+1(m+1mk)[1k+2i=0k(k+2i)Bi]\begin{aligned} A_{k+1}(m)&=\frac{1}{m+1}\sum_{i=0}^{k}\left[-\binom{m+1}{m-k-1+i}A_i(m-k-1+i)\right]\\ &=\frac{1}{m+1}\sum_{i=0}^{k}\left[-\binom{m+1}{m-k-1+i}\frac{1}{m-k+i}\binom{m-k+i}{m-k}B_i\right]\\ &=\frac{1}{m+1}\sum_{i=0}^{k}\left[-\binom{m+1}{m-k}\binom{k+2}{i}\frac{1}{k+2} B_i\right]\\ &=\frac{1}{m+1}\binom{m+1}{m-k}\left[-\frac{1}{k+2}\sum_{i=0}^{k}\binom{k+2}{i}B_i\right] \end{aligned}

Which proves the result and gives us the expression for BkB_k :

Bk=1k+1i=0k1(k+1i)BiB_k=-\frac{1}{k+1}\sum_{i=0}^{k-1}\binom{k+1}{i}B_i

These coefficients are the Bernoulli numbers :


(Bernoulli Numbers). The members of the integer sequence (Bk)kN\left(B_k\right)_{k\in\mathbb N} defined inductively by B0=1B_0=1 and Bk=1k+1i=0k1(k+1i)BiB_k=-\frac{1}{k+1}\sum_{i=0}^{k-1}\binom{k+1}{i}B_i are called the Bernoulli numbers.


We then have the following identity :

Sm(n)=k=0mAk(m)nm+1k=1m+1k=0m(m+1m+1k)Bknm+1k=1m+1k=0m(m+1k)Bknm+1kS_m(n)=\sum_{k=0}^{m}A_k(m)n^{m+1-k}=\frac{1}{m+1}\sum_{k=0}^{m}\binom{m+1}{m+1-k}B_k n^{m+1-k}=\frac{1}{m+1}\sum_{k=0}^{m}\binom{m+1}{k}B_k n^{m+1-k}

(Induction Formula for Power Sums).

Sm(n)=1m+1k=0m(m+1k)Bknm+1k(II)S_m(n)=\frac{1}{m+1}\sum_{k=0}^{m}\binom{m+1}{k}B_k n^{m+1-k} \tag{II}

Now that we’ve reached this expression of Sm(n)S_m(n) as a polynomial in nn we can make sense of a broader continuous version Sm(x)S_m(x) of Sm(n)S_m(n). This leads to the introduction of the Bernoulli polynomials :


(Bernoulli Polynomials).

Bm(x)=k=0m(mk)BkxmkB_m(x)=\sum_{k=0}^{m}\binom{m}{k}B_k x^{m-k}

Which lead to the identity :


(Formula for Power Sums).

Sm(n)=1m+1(Bm+1(n)Bm+1)S_m(n)=\frac{1}{m+1}\left(B_{m+1}(n)-B_{m+1}\right)


  1. The number of pp-cubes on the boundary of an nn-cube is 2np(np)2^{n-p}\binom{n}{p} which gives us 2n2n “walls”.