Special functions · Number theory

Bernoulli Polynomials and Bernoulli Numbers

Jacob Bernoulli wanted a formula for \( 1^n + 2^n + \cdots + m^n \) for every power \(n\). He found one, and in it appeared a mysterious sequence of rational numbers: \( 1, -\frac12, \frac16, 0, -\frac1{30}, 0, \frac1{42}, \dots \). These Bernoulli numbers later turned up in Taylor series, in the Euler–Maclaurin formula, and in the values of the zeta function. This post introduces them the modern way, through a generating function, and shows how to compute them and use them.

1. Generating functions

1° Generating function A function \(G(t, x)\) of the complex variable \(t\) and the complex parameter \(x\) is the generating function of the sequence of functions \(\varphi_n(x)\) (\(n = 0, 1, 2, \dots\)) if \[ G(t, x) = \sum_{n=0}^\infty\varphi_n(x)\,t^n. \]

The idea: pack an infinite sequence into one function, as the coefficients of its power series in \(t\). One closed-form function then "remembers" the whole sequence, and manipulations of the function (multiplying, differentiating, substituting) translate into identities for the sequence. To recover \(\varphi_n\), expand \(G\) in powers of \(t\): \( \varphi_n(x) = \frac{1}{n!}\frac{\partial^nG}{\partial t^n}(0, x) \).

Example 1 \( \frac{1}{1 - xt} = \sum x^nt^n \) generates the powers \( \varphi_n(x) = x^n \). And \( e^{xt} = \sum\frac{x^n}{n!}t^n \) generates \( \varphi_n(x) = \frac{x^n}{n!} \). Generating functions are also how Legendre polynomials, Hermite polynomials and many other special families are defined.

2. Bernoulli polynomials

2° Bernoulli polynomials (book's definition) The Bernoulli polynomials \(B_n(x)\) are defined by the generating function \[ G(t, x) = \begin{cases}\dfrac{t\,e^{tx}}{e^t - 1}, & t \ne 0,\\[1.5ex] 1, & t = 0,\end{cases} \qquad G(t, x) = \sum_{n=0}^\infty B_n(x)\,t^n. \]
Two remarks on the book's formulation
  • The cases should be distinguished by \(t\), not by \(x\): the expression \( \frac{te^{tx}}{e^t - 1} \) is of the form \(\frac00\) at \(t = 0\), and its limit there is \(1\) (since \( e^t - 1 \approx t \)). So the definition is "\(t \ne 0\)" and "\(t = 0\)". The series converges for \( |t| < 2\pi \), because the nearest zeros of \(e^t - 1\) other than \(0\) are \( t = \pm2\pi i \).
  • Normalization. With \(G = \sum B_n(x)t^n\), as in the book, the polynomials come with a factor \(\frac{1}{n!}\). Most modern texts write \( \frac{te^{tx}}{e^t - 1} = \sum B_n(x)\frac{t^n}{n!} \), so their \(B_n(x)\) is \(n!\) times the book's. In this post we use the modern normalization: then the book's formula 3° 1) becomes \( B_n(x) = \sum_k\binom nkB_kx^{n-k} \), and 3° 2) becomes \( B_n(x) = (B + x)^n \). The two conventions differ only by the factor \(n!\).

So, in the modern normalization,

\[ \frac{t\,e^{tx}}{e^t - 1} = \sum_{n=0}^\infty B_n(x)\,\frac{t^n}{n!}. \]

The first few polynomials (obtained by expanding, or from Section 4):

\[ B_0(x) = 1, \quad B_1(x) = x - \tfrac12, \quad B_2(x) = x^2 - x + \tfrac16, \quad B_3(x) = x^3 - \tfrac32x^2 + \tfrac12x, \quad B_4(x) = x^4 - 2x^3 + x^2 - \tfrac1{30}. \]
0.5 −0.5 1/2 1 B₁ B₂ B₃ B₄
Figure 1. Bernoulli polynomials \(B_1\) to \(B_4\) on \([0, 1]\). Each has mean value \(0\) on this interval (\(\int_0^1B_n = 0\) for \(n \ge 1\)); odd ones are antisymmetric and even ones symmetric about \(x = \frac12\). Note the small vertical scale: the polynomials stay close to \(0\) on \([0, 1]\).

3. Bernoulli numbers

The Bernoulli numbers are the values at \(x = 0\): \( B_n = B_n(0) \). Putting \(x = 0\) in the generating function:

3° 3) Generating function of the Bernoulli numbers If \( f(x) = \frac{x}{e^x - 1} \) for \(x \ne 0\) and \(f(0) = 1\), then \[ f(x) = \sum_{n=0}^\infty\frac{B_n}{n!}x^n. \]

Computing them

Multiply \( \frac{x}{e^x - 1} = \sum\frac{B_k}{k!}x^k \) by \( e^x - 1 = \sum_{j\ge1}\frac{x^j}{j!} \) and compare coefficients of \(x^n\) on both sides of \( x = (e^x - 1)\sum\frac{B_k}{k!}x^k \). This gives the recurrence

\[ \sum_{k=0}^{n-1}\binom nk B_k = 0 \quad (n \ge 2), \qquad B_0 = 1. \]
Example 2 · The first Bernoulli numbers
  • \(n = 2\): \( B_0 + 2B_1 = 0 \Rightarrow B_1 = -\frac12 \).
  • \(n = 3\): \( B_0 + 3B_1 + 3B_2 = 0 \Rightarrow 1 - \frac32 + 3B_2 = 0 \Rightarrow B_2 = \frac16 \).
  • \(n = 4\): \( 1 - 2 + 6\cdot\frac16 + 4B_3 = 0 \Rightarrow B_3 = 0 \).
  • \(n = 5\): \( 1 - \frac52 + 10\cdot\frac16 + 0 + 5B_4 = 0 \Rightarrow B_4 = -\frac1{30} \).
\(n\)012345678910
\(B_n\)\(1\)\(-\frac12\)\(\frac16\)\(0\)\(-\frac1{30}\)\(0\)\(\frac1{42}\)\(0\)\(-\frac1{30}\)\(0\)\(\frac5{66}\)

Why the odd ones vanish (from \(B_3\) on): the function \( \frac{x}{e^x - 1} + \frac x2 = \frac x2\cdot\frac{e^x + 1}{e^x - 1} = \frac x2\coth\frac x2 \) is even. So after removing the term \( B_1x = -\frac x2 \), only even powers remain. The nonzero ones alternate in sign, and they eventually grow very fast: \( |B_{2k}| \approx \frac{4\sqrt{\pi k}}{(\pi e)^{2k}}(2k)^{2k} \). For example \( B_{30} \approx 6\cdot10^{8} \).

Different conventions, again In the previous section of the book (on the zeta function), "Bernoulli numbers \(B_k\)" means the older numbering: \( B_1 = \frac16, B_2 = \frac1{30}, B_3 = \frac1{42}, \dots \), i.e. \( |B_2|, |B_4|, |B_6|, \dots \) in the present notation. The definition used here, through \( \frac{x}{e^x - 1} \), is the modern one. Some authors also use \( B_1 = +\frac12 \). Always check which convention a formula uses.

4. The symbolic formula \((B + x)^n\)

3° 1)–2) Polynomials from numbers (modern normalization) \[ B_n(x) = \sum_{k=0}^n\binom nkB_k\,x^{n-k}, \qquad\text{written symbolically}\qquad B_n(x) = (B + x)^n, \] where, after expanding the power by the binomial theorem, each \(B^k\) is replaced by \(B_k\) (\(k = 0, 1, \dots, n\), with \(B^0 = B_0 = 1\)).

Why: the generating function is a product: \( \frac{te^{tx}}{e^t - 1} = \frac{t}{e^t - 1}\cdot e^{tx} = \Big(\sum_k B_k\frac{t^k}{k!}\Big)\Big(\sum_j x^j\frac{t^j}{j!}\Big) \). The coefficient of \(\frac{t^n}{n!}\) in the product is \( \sum_k\binom nkB_kx^{n-k} \), exactly the binomial expansion with \(B^k \to B_k\). This "pretend \(B\) is a number and lower the exponents at the end" trick is called the umbral (shadow) calculus. (In the book's normalization, the same formula reads \( n!\,B_n(x) = (B + x)^n \).)

Example 3 \( B_3(x) = (B + x)^3 = B_3 + 3B_2x + 3B_1x^2 + B_0x^3 = 0 + \frac12x - \frac32x^2 + x^3 \). ✓

The recurrence of Section 3 is itself umbral: it says \( (B + 1)^n = B^n \) for \(n \ge 2\), i.e. \( B_n(1) = B_n(0) \).

5. More properties

All of the following follow from simple manipulations of the generating function (modern normalization):

PropertyFormulaFrom the generating function
Derivative\( B_n'(x) = nB_{n-1}(x) \)\(\partial_x\) multiplies \(G\) by \(t\)
Difference\( B_n(x + 1) - B_n(x) = nx^{n-1} \)\( G(t, x + 1) - G(t, x) = te^{tx} \)
Symmetry\( B_n(1 - x) = (-1)^nB_n(x) \)\( G(-t, 1 - x) = G(t, x) \)
Mean value\( \int_0^1B_n(x)\,dx = 0 \) (\(n \ge 1\))\( \int_0^1G\,dx = 1 \)
Endpoints\( B_n(1) = B_n(0) = B_n \) (\(n \ge 2\))difference formula at \(x = 0\)

The first property makes Bernoulli polynomials an Appell sequence, like the powers \(x^n\) themselves; the second is the one that powers sums of powers.

6. Sums of powers

Bernoulli's original problem. Sum the difference formula \( B_{n+1}(k + 1) - B_{n+1}(k) = (n + 1)k^n \) over \(k = 0, 1, \dots, m - 1\): the left side telescopes, so

Faulhaber–Bernoulli formula \[ 0^n + 1^n + 2^n + \cdots + (m - 1)^n = \frac{B_{n+1}(m) - B_{n+1}}{n + 1}. \]
Example 4 · Squares and cubes \[ \sum_{k=0}^{m-1}k^2 = \frac{B_3(m) - B_3}{3} = \frac{m(m - 1)(2m - 1)}{6}, \qquad \sum_{k=0}^{m-1}k^3 = \frac{B_4(m) - B_4}{4} = \frac{m^2(m - 1)^2}{4}. \] For \(m = 10\): \( 1^3 + 2^3 + \cdots + 9^3 = \frac{100\cdot81}{4} = 2025 \). (Note \(2025 = 45^2 = (1 + \cdots + 9)^2\), a classical identity.)

Bernoulli was proud that his formula let him compute \( 1^{10} + 2^{10} + \cdots + 1000^{10} \) "in half a quarter of an hour". The same mechanism, applied to sums \(\sum f(k)\) of general smooth functions, gives the Euler–Maclaurin formula, which compares sums with integrals and has Bernoulli numbers as its correction coefficients.

7. Connection with \(\zeta(2k)\)

The poles of \( \frac{x}{e^x - 1} \) at \( x = \pm2\pi i, \pm4\pi i, \dots \) determine how fast its Taylor coefficients grow, and expanding by partial fractions (\( \frac x2\coth\frac x2 = 1 + 2\sum_{k\ge1}\frac{x^2}{x^2 + 4\pi^2k^2} \)) links them to sums of \(\frac{1}{k^{2n}}\). The result, in the modern convention:

\[ \zeta(2n) = \frac{(-1)^{n+1}B_{2n}(2\pi)^{2n}}{2\,(2n)!}. \]

For \(n = 1\): \( \frac{\frac16\cdot4\pi^2}{4} = \frac{\pi^2}{6} \); for \(n = 2\): \( \frac{\frac1{30}\cdot16\pi^4}{48} = \frac{\pi^4}{90} \). This is the formula from the post on the zeta function, now written with modern Bernoulli numbers. It also shows that the \(B_{2n}\) alternate in sign and grow like \( \frac{2(2n)!}{(2\pi)^{2n}} \), since \(\zeta(2n) \to 1\).

8. Summary

ConceptFormula (modern normalization)
Generating function\( \frac{te^{tx}}{e^t - 1} = \sum B_n(x)\frac{t^n}{n!} \), \(|t| < 2\pi\)
Bernoulli numbers\( \frac{x}{e^x - 1} = \sum B_n\frac{x^n}{n!} \); \( \sum_{k<n}\binom nkB_k = 0 \)
Values\(1, -\frac12, \frac16, 0, -\frac1{30}, 0, \frac1{42}, \dots\); \(B_{2k+1} = 0\) for \(k \ge 1\)
Polynomials\( B_n(x) = \sum\binom nkB_kx^{n-k} = (B + x)^n \)
Key properties\( B_n' = nB_{n-1} \), \( B_n(x + 1) - B_n(x) = nx^{n-1} \)
Sums of powers\( \sum_{k=0}^{m-1}k^n = \frac{B_{n+1}(m) - B_{n+1}}{n + 1} \)
Zeta\( \zeta(2n) = \frac{(-1)^{n+1}B_{2n}(2\pi)^{2n}}{2(2n)!} \)
Book's normalizationbook's \(B_n(x)\) = (modern \(B_n(x)\)) / \(n!\)

9. Practice problems

Try each one before opening the solution. More solved problems from this topic are in Series.

Problem 1: Compute \(B_6\) from the recurrence.

\(n = 7\): \( B_0 + 7B_1 + 21B_2 + 35B_3 + 35B_4 + 21B_5 + 7B_6 = 0 \): \( 1 - \frac72 + \frac72 + 0 - \frac76 + 0 + 7B_6 = 0 \), so \( 7B_6 = \frac16 \), \( B_6 = \frac1{42} \).

Problem 2: Find \(B_2(x)\) using \( (B + x)^2 \), and check \( B_2'(x) = 2B_1(x) \).

\( B_2 + 2B_1x + x^2 = \frac16 - x + x^2 \). Derivative \( 2x - 1 = 2(x - \frac12) \). ✓

Problem 3: Derive \( 1 + 2 + \cdots + (m - 1) \) from the formula for sums of powers.

\( n = 1 \): \( \frac{B_2(m) - B_2}{2} = \frac{m^2 - m}{2} \).

Problem 4: Verify \( \int_0^1B_2(x)\,dx = 0 \).

\( \frac13 - \frac12 + \frac16 = 0 \). ✓

Problem 5: Compute \( \zeta(6) \) from \(B_6\).

\( \frac{\frac1{42}(2\pi)^6}{2\cdot720} = \frac{64\pi^6}{60480} = \frac{\pi^6}{945} \).

Problem 6: What are the first terms of the book's \(B_n(x)\) (with the \(\frac1{n!}\) normalization)?

\(1\), \( x - \frac12 \), \( \frac12\big(x^2 - x + \frac16\big) \), \( \frac16\big(x^3 - \frac32x^2 + \frac12x\big) \). They satisfy \( \frac{te^{tx}}{e^t - 1} = \sum B_n(x)t^n \).

Final thoughts

A single function, \( \frac{te^{tx}}{e^t - 1} \), contains the whole theory. Expanding it in \(t\) defines the Bernoulli polynomials; setting \(x = 0\) gives the Bernoulli numbers; multiplying generating functions explains the symbolic formula \((B + x)^n\); shifting \(x\) by \(1\) gives the difference equation, and with it Bernoulli's formula for sums of powers. The same numbers then reappear in Euler–Maclaurin summation and in the values \(\zeta(2n)\). Mind the conventions, though: the factor \(n!\) and the sign of \(B_1\) vary from book to book.

Related posts: the hypergeometric and zeta functions, power series, and Taylor's formula.