bernoulli
compute Bernoulli numbers and polynomials
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
bernoulli(n)
bernoulli(n, x)
bernoulli(n, opts)
n
-
nonnegint; the index of the required Bernoulli number or polynomial
x
algebraic; the expression at which the Bernoulli polynomial is evaluated
opts
(optional) equation of the form singleton = true or singleton = false
singleton = truefalse
The singleton option controls whether or not the bernoulli routine computes additional Bernoulli numbers in parallel with the requested one. For example, if your computer has 4 cores, then the commands bernoulli(1000) and bernoulli(1000, singleton=false) will compute (and store) bernoulli(1002), bernoulli(1004), and bernoulli(1006). Since in practice nearly all computations which use Bernoulli numbers require many of them, and require them in sequence, this results in considerable efficiency gains. The commands bernoulli(1000, singleton) and bernoulli(1000, singleton=true) (which are equivalent) will result in only the 1000th Bernoulli number being computed.
The singleton option has no effect if your computer has only a single core.
The default value is false.
The bernoulli(n) function computes the nth Bernoulli number. Bernoulli numbers come from the coefficients in the Taylor expansion of x/(e^x - 1).
The bernoulli(n, x) function computes the nth Bernoulli polynomial, in the expression x.
The nth Bernoulli number is defined as bernoulli(n, 0).
The nth Bernoulli polynomial, Bn⁡x, is defined by the exponential generating function:
t⁢ⅇx⁢tⅇt−1=∑n=0∞⁡Bn⁡x⁢tnn!
bernoulli⁡4
−130
bernoulli⁡4,0
bernoulli⁡4,x
−130+x4−2⁢x3+x2
bernoulli⁡4,12
7240
bernoulli⁡4,4⁢x
−130+256⁢x4−128⁢x3+16⁢x2
bernoulli⁡0,975
1
The first 15 Bernoulli numbers are listed in the following table. It can be noted that Bn = 0_ for all odd 1<n.
DocumentTools:-Tabulate⁡n,seq⁡1..15,B__n,seq⁡bernoulli⁡i,i=1..15,`=`⁡fillcolor,T,i,j↦`if`⁡type⁡j,evenandj≠2,LightGrey,White
Tabulate
2
3
4
5
6
7
8
9
10
11
12
13
14
15
B__n
−12
16
0
142
566
−6912730
76
The singleton option was introduced in Maple 16.
For more information on Maple 16 changes, see Updates in Maple 16.
See Also
euler
initialfunctions
Download Help Document