from pylab import *
from scipy.integrate import fixed_quad
8.12.1Bernoulli polynomials¶
The Bernoulli polynomial , is defined implicitly by the generating function
The first few polynomials are[1]
Note that
It can be shown that for all
8.12.2Bernoulli numbers¶
These are defined implicitly by
The first few numbers are
8.12.3Connection¶
To obtain the relation between and , integrate the generating function of Bernoulli polynomial on to obtain
Hence
Next, define the periodic extension of by
8.12.4Error of trapezoid rule¶
In more detail, the error of trapezoid method can be written as
is defined to be one, it is not present in the definition of the generating function.
- Atkinson, K. E. (2004). An Introduction to Numerical Analysis (2nd ed.). Wiley.
- Fornberg, B. (2021). Improving the Accuracy of the Trapezoidal Rule. SIAM Review, 63(1), 167–180. 10.1137/18M1229353