230
19 Bernoulli and Euler Polynomials
allows to compute negative values and from
E n (x + 1) = 2x
n
− E n (x)
(19.12b)
we get
E n (x + m) = (−1)
m E n (x) + 2
m−1
k=0
(−1)
k (x + m − 1 − k)
n , m ∈ N
(19.12c)
to compute Euler polynomials for arbitrary large real arguments. These transformations are only necessary for the series expansion, Eq. (19.11). Complex arguments
are only supported in the polynomial representation.
19.2.2 Programs
The syntax of the classes to evaluate Euler polynomials, respectively, Euler numbers
is similar to the corresponding Bernoulli classes. Thus in short:
Euler Numbers can be evaluated with the SPECFUNPHYS class eulen with
syntax [obj, En] = eulen(n, all). Because E 2n+1 = 0 only even Euler
numbers will be evaluated. The input argument “n” should be even, n = 0, 2, 4, · · · .
“all” is optional and with “all” equals “a” all even Euler numbers up to “n” will be
returned, otherwise only one. The output arguments are the class object “obj” with
properties “En”, the Euler number(s) and “info” with some information. The first
36 Euler numbers are table based [1] all others are computed via Eqs. (19.11) for
x =
1
2 .
Euler Polynomial Coefficients are returned from the SPECFUNPHYS class
eulepoly with syntax [obj, Ek] = eulepoly(n). The input argument
“n” is the polynomial degree with n ≥ 0. All polynomial coefficients up to
“n” will be evaluated. The output arguments are the class object “obj” with
properties “polycoef”, a table of the polynomial coefficients and “info” with some
basic information. “Ek” is an array of polynomial coefficients; in the first row
the coefficients for degree equal to 0 and in the n-th row for degree n − 1.
For degree smaller than 15 the result is table based [1] and higher orders are
computed with the help of the MATLAB function polyint via Eq. (19.10) and
if necessary the integration constant via Eq. (19.11). The class eulepoly comes
in addition with methods plot, for plotting, deri to compute the n-th derivative
and polyvalue to evaluate the Bernoulli polynomials. All methods are located in
the class bepolymeth. For details and examples see Sect. (19.1.2).
Euler Polynomial Values can be computed via the SPECFUNPHYS class eulex
with syntax [obj, En] = eulex(n, x, wcom). The input argument “n” is
the Euler polynomial degree, a positive integer value. “x” (optional) are a vector
with the positions at which the polynomial shall be evaluated. Default value is
0 · · · 1. In case “x” is complex the polynomial representation of the Euler polynomial
Précédent

- 236/287

Suivant