continued fractions for special functions: handbook and ... · z 1+ k1 m=2 (m-1) 2z 2m-1,...

59
Continued Fractions for Special Functions: Handbook and Software Team: A. Cuyt, V.B. Petersen, J. Van Deun, B. Verdonk, H. Waadeland, F. Backeljauw, S. Becuwe, M. Colman, T. Docx, W.B. Jones Universiteit Antwerpen Sør-Trøndelag University College Norwegian University of Science and Technology University of Colorado at Boulder 1 / 59

Upload: others

Post on 30-Jan-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

  • Continued Fractions for Special Functions:Handbook and Software

    Team:

    A. Cuyt,V.B. Petersen, J. Van Deun, B. Verdonk, H. Waadeland,

    F. Backeljauw, S. Becuwe, M. Colman, T. Docx,W.B. Jones

    Universiteit Antwerpen

    Sør-Trøndelag University College

    Norwegian University of Science and Technology

    University of Colorado at Boulder

    1 / 59

  • . Project

    Book

    Maple

    C++

    Project

    Deliverables:

    I Book: formulas with tables and graphsI Maple library: all fractionsI C++ library: all functionsI Web version to explore: all of the above

    (www.cfsf.ua.ac.be)

    2 / 59

  • . Project

    Book

    Maple

    C++Related to larger-scale projects:

    I dlmf.nist.govI functions.wolfram.com

    Only 10% of the CF representations also found there!

    3 / 59

  • . Project

    Book

    Maple

    C++

    4 / 59

  • . Project

    Book

    Maple

    C++

    5 / 59

  • . Project

    Book

    Maple

    C++

    special function: f(z)

    continued fraction: b0(z) +K∞m=1

    am(z)

    bm(z)

    f(z) = b0(z) +a1(z)

    b1(z) +a2(z)

    b2(z) +a3(z)

    b3(z) + · · ·

    = b0(z) +a1(z)

    b1(z) +

    a2(z)

    b2(z) + · · ·

    6 / 59

  • . Project

    Book

    Maple

    C++

    I SF: limit-periodic representationI CF: larger convergence domain

    Example:

    Atan(z) =∞∑m=0

    (−1)m+1

    2m+ 1z2m+1,

    |z| < 1

    =z

    1 +

    ∞Km=2

    (m− 1)2z2

    2m− 1,

    iz 6∈ (−∞,−1) ∪ (1,+∞)

    7 / 59

  • . Project

    Book

    Maple

    C++

    tail: tn(z) = K∞m=n+1

    am(z)

    bm(z)

    Example:√1 + 4x− 1

    2=

    ∞Km=1

    x

    1, x > −

    14, tn(x) = f(x)

    √2 − 1 =

    11 +

    21 +

    11 +

    21 +

    . . . , t2n →√2 − 1

    t2n+1 →√2

    1 =∞Km=1

    m(m+ 2)1

    , tn →∞8 / 59

  • . Project

    Book

    Maple

    C++

    approximant:

    fn(z; 0) = b0(z) +n

    Km=1

    am(z)

    bm(z)

    modified approximant:

    fn(z;wn) = b0(z) +n−1

    Km=1

    am(z)

    bm(z) +

    an(z)

    bn(z) +wn

    9 / 59

  • Project

    . BookPart IPart IIPart IIIWeb

    Maple

    C++

    1 3

    Handbook of Continued

    Fractions for Special Functions

    Special functions are pervasive in all fields of science and

    industry. The most well-known application areas are in physics,

    engineering, chemistry, computer science and statistics.

    Because of their importance, several books and websites and a

    large collection of papers have been devoted to these functions.

    Of the standard work on the subject, namely the Handbook

    of Mathematical Functions with Formulas, Graphs and

    Mathematical Tables edited by Milton Abramowitz and Irene

    Stegun, the American National Institute of Standards claims to

    have sold over 700 000 copies!

    But so far no project has been devoted to the systematic study

    of continued fraction representations for these functions.

    This handbook is the result of such an endeavour. We emphasise

    that only 10% of the continued fractions contained in this book,

    can also be found in the Abramowitz and Stegun project or at

    special functions websites!

    ISBN 978-1-4020-6948-2

    Handbook ofContinued Fractions for Special Functions

    11

    Cuyt | Petersen | VerdonkW

    aadeland | Jones

    A. CuytV. Brevik PetersenB. Verdonk H. Waadeland W. B. Jones

    10 / 59

  • Project

    Book. Part IPart IIPart IIIWeb

    Maple

    C++

    Part I: Basic theory

    I BasicsI Continued fraction representation of functionsI Convergence criteriaI Padé approximantsI Moment theory and orthogonal polynomials

    11 / 59

  • Project

    BookPart I. Part IIPart IIIWeb

    Maple

    C++

    Part II: Numerics

    I Continued fraction constructionI Truncation error boundsI Continued fraction evaluation

    12 / 59

  • Project

    BookPart IPart II. Part IIIWeb

    Maple

    C++

    Part III: Special functions

    I Elementary functionsI Incomplete gamma and relatedI Error function and relatedI Exponential integralsI Hypergeometric 2F1(a,n; c; z), n ∈ ZI Confluent hypergeometric 1F1(n;b; z), n ∈ ZI Parabolic cylinder functionsI Legendre functionsI Bessel functions of integer and fractional orderI Coulomb wave functions

    13 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Formulas

    Ln(1 + z) =z

    1 +

    Km=2

    (amz1

    ), |Arg(1 + z)| < π, (11.2.2) – – –– – –– – – AS

    a2k =k

    2(2k − 1), a2k+1 =

    k

    2(2k + 1)

    =2z

    2 + z +

    Km=2

    (−(m− 1)2z2

    (2m− 1)(2 + z)

    ), (11.2.3) – – –– – –– – –

    |Arg(1− z2/(2 + z)2

    )| < π

    Ln(

    1 + z1− z

    )=

    2z1 +

    Km=1

    (amz

    2

    1

    ), |Arg(1− z2)| < π, (11.2.4) – – –– – –– – – AS

    am =−m2

    (2m− 1)(2m + 1).

    14 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Tables

    Table 11.2.3: Relative error of 20th partial sum and 20th approximants.

    x Ln(1 + x) (11.2.1) (11.2.2) (11.2.3) (6.8.8)−0.9 −2.302585e+00 1.5e−02 2.8e−06 5.8e−12 1.5e−06

    −0.4 −5.108256e−01 2.5e−10 1.8e−18 2.2e−36 2.4e−19

    0.1 9.531018e−02 4.4e−23 5.3e−33 1.9e−65 1.3e−34

    0.5 4.054651e−01 1.8e−08 1.9e−20 2.3e−40 2.0e−21

    1.1 7.419373e−01 2.4e−01 2.8e−15 5.3e−30 5.5e−16

    5 1.791759e+00 1.0e+13 4.2e−08 1.3e−15 2.0e−08

    10 2.397895e+00 1.8e+19 5.3e−06 2.1e−11 3.3e−06

    100 4.615121e+00 1.0e+40 1.8e−02 3.6e−04 2.5e−02

    15 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Modification:

    since in (11.2.2), limm→∞ amz = z/4 andlimm→∞ am+1 −

    14

    am −14

    = −1,

    we find

    w(z) =−1 +

    √1 + z

    2and {

    w(1)2k (z) = w(z) +

    kz2(2k+1) −

    z4

    w(1)2k+1(z) = w(z) +

    (k+1)z2(2k+1) −

    z4

    16 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Table 11.2.4: Relative error of 20th (modified) approximants.

    x Ln(1 + x) (11.2.2) (11.2.2) (11.2.2)−0.9 −2.302585e+00 2.8e−06 1.9e−07 2.9e−10

    −0.4 −5.108256e−01 1.8e−18 9.3e−20 4.3e−22

    0.1 9.531018e−02 5.3e−33 2.7e−34 3.2e−37

    0.5 4.054651e−01 1.9e−20 9.5e−22 5.5e−24

    1.1 7.419373e−01 2.8e−15 1.5e−16 1.8e−18

    5 1.791759e+00 4.2e−08 2.6e−09 1.1e−10

    10 2.397895e+00 5.3e−06 3.7e−07 2.8e−08

    100 4.615121e+00 1.8e−02 2.9e−03 9.2e−04

    17 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Graphs

    Figure 11.2.1: Complex region where f8(z; 0) of (11.2.2) guarantees ksignificant digits for Ln(1 + z) (from light to dark k = 6, 7, 8, 9).

    18 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Figure 11.2.2: Number of significant digits guaranteed by the nth classicalapproximant of (11.2.2) (from light to dark n = 5, 6, 7) and the 5th modifiedapproximant evaluated with w(1)5 (z) (darkest).

    19 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Web interface

    2F1(1/2, 1; 3/2; z) =1

    2√zLn(1 +√z

    1 −√z

    )I series representationI continued fraction representations:

    I C-fraction (15.3.7)I M-fraction (15.3.12)I Nörlund fraction (15.3.17)

    20 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    z 2F1 (1/2, 1; 3/2; z) =∞

    Km=1

    (cmz1

    ), z ∈ C \ [1,+∞) (15.3.7a) – – –– – –– – –

    with

    c1 = 1, cm =−(m− 1)2

    4(m− 1)2 − 1, m ≥ 2. (15.3.7b)

    2F1(1/2, 1; 3/2; z) =1/2

    1/2 + z/2 −z

    3/2 + 3z/2 −4z

    5/2 + 5z/2 − . . .(15.3.12) – – –– – –– – –

    2F1(1/2, 1; 3/2; z) =1

    1− z +z(1− z)

    3/2 − 5/2z +

    Km=2

    (m(m− 1/2)z(1− z)

    (m + 1/2)− (2m + 1/2)z

    ),

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Table 15.3.1: Relative error of the 5th partial sum and 5th (modified)approximants. More details can be found in the Examples 15.3.1, 15.3.2and 15.3.3.

    x 2F1(1/2, 1; 3/2;x) (15.3.7) (15.3.12) (15.3.17)0.1 1.035488e+00 1.9e−08 1.4e−05 6.1e−06

    0.2 1.076022e+00 7.9e−07 4.4e−04 3.4e−04

    0.3 1.123054e+00 8.0e−06 3.1e−03 4.9e−03

    0.4 1.178736e+00 4.7e−05 1.2e−02 4.3e−02

    x 2F1(1/2, 1; 3/2;x) (15.3.7) (15.3.7) (15.3.7)0.1 1.035488e+00 1.9e−08 2.0e−10 1.6e−12

    0.2 1.076022e+00 7.9e−07 8.7e−09 1.5e−10

    0.3 1.123054e+00 8.0e−06 9.4e−08 2.7e−09

    0.4 1.178736e+00 4.7e−05 5.9e−07 2.5e−08

    . . .

    22 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Table 15.3.2: Relative error of the 20th partial sum and 20th (modified)approximants. More details can be found in the Examples 15.3.1, 15.3.2and 15.3.3.

    x 2F1(1/2, 1; 3/2;x) (15.3.7) (15.3.12) (15.3.17)0.1 1.035488e+00 4.0e−32 1.5e−20 1.5e−20

    0.2 1.076022e+00 1.3e−25 1.5e−14 1.7e−13

    0.3 1.123054e+00 1.4e−21 4.8e−11 7.6e−09

    0.4 1.178736e+00 1.8e−18 1.4e−08 5.0e−05

    x 2F1(1/2, 1; 3/2;x) (15.3.7) (15.3.7) (15.3.7)0.1 1.035488e+00 4.0e−32 2.6e−35 6.5e−38

    0.2 1.076022e+00 1.3e−25 8.8e−29 4.8e−31

    0.3 1.123054e+00 1.4e−21 1.1e−24 9.6e−27

    0.4 1.178736e+00 1.8e−18 1.4e−21 1.9e−23

    . . .

    23 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    Exponential integrals and

    related functions

    Hypergeometric functions

    2F1(a,b;c;z)

    2F1(a,n;c;z)

    2F1(a,1;c;z)

    2F1(a,b;c;z) /

    2F1(a,b+1;c+1;z)

    2F1(a,b;c;z) /

    2F1(a+1,b+1;c+1;z)

    2F1(1/2,1;3/2;z)

    2F1(2a,1;a+1;1/2)

    Confluent hypergeometric

    functions

    Bessel functions

    Hypergeometric functions » 2F1(1/2,1;3/2;z) » tabulate

    Representation

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    24 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    Exponential integrals and

    related functions

    Hypergeometric functions

    2F1(a,b;c;z)

    2F1(a,n;c;z)

    2F1(a,1;c;z)

    2F1(a,b;c;z) /

    2F1(a,b+1;c+1;z)

    2F1(a,b;c;z) /

    2F1(a+1,b+1;c+1;z)

    2F1(1/2,1;3/2;z)

    2F1(2a,1;a+1;1/2)

    Confluent hypergeometric

    functions

    Bessel functions

    Hypergeometric functions » 2F1(1/2,1;3/2;z) » tabulate

    Representation

    Input

    parameters none

    base 1010

    approximant (1 ≤ approximant ≤ 999)

    z

    output in tables relative error absolute error

    Output

    10th approximant (relative error)

    z 2F1(1/2,1;3/2;z) (HY.1.4) (HY.3.7) (HY.3.7) (HY.3.7) (HY.3.12) (HY.3.12) (HY.3.12) (HY.3.17) (HY.3.17) (HY.3.17)

    0.1 1.035488e+00 4.6e−13 2.4e−16 6.4e−19 3.0e−21 1.5e−10 4.5e−13 8.5e−15 7.5e−11 3.9e−12 5.4e−14

    0.15 1.055046e+00 4.1e−11 1.8e−14 5.0e−17 3.6e−19 8.3e−09 2.8e−11 8.4e−13 7.6e−09 4.0e−10 8.6e−12

    0.2 1.076022e+00 1.0e−09 4.3e−13 1.2e−15 1.2e−17 1.4e−07 5.4e−10 2.3e−11 2.4e−07 1.3e−08 4.0e−10

    0.25 1.098612e+00 1.2e−08 5.4e−12 1.6e−14 2.1e−16 1.3e−06 5.5e−09 3.1e−10 4.2e−06 2.5e−07 9.8e−09

    0.3 1.123054e+00 9.5e−08 4.6e−11 1.4e−13 2.3e−15 7.9e−06 3.8e−08 2.7e−09 5.1e−05 3.3e−06 1.7e−07

    0.35 1.149640e+00 5.4e−07 3.0e−10 9.1e−13 1.9e−14 3.6e−05 1.9e−07 1.7e−08 4.9e−04 3.6e−05 2.4e−06

    0.4 1.178736e+00 2.5e−06 1.6e−09 5.1e−12 1.3e−13 1.3e−04 8.3e−07 9.1e−08 4.0e−03 3.8e−04 3.4e−05

    0.45 1.210806e+00 9.4e−06 7.5e−09 2.5e−11 7.4e−13 4.1e−04 3.0e−06 4.0e−07 3.1e−02 4.6e−03 6.7e−04

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    10

    .1,.15,.2,.25,.3,.35,.4,.45

    25 / 59

  • Project

    BookPart IPart IIPart III. Web

    Maple

    C++

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    Exponential integrals and

    related functions

    Hypergeometric functions

    2F1(a,b;c;z)

    2F1(a,n;c;z)

    2F1(a,1;c;z)

    2F1(a,b;c;z) /

    2F1(a,b+1;c+1;z)

    2F1(a,b;c;z) /

    2F1(a+1,b+1;c+1;z)

    2F1(1/2,1;3/2;z)

    2F1(2a,1;a+1;1/2)

    Confluent hypergeometric

    functions

    Bessel functions

    Hypergeometric functions » 2F1(1/2,1;3/2;z) » tabulate

    Representation

    Input

    parameters none

    base 1010

    approximant (1 ≤ approximant ≤ 999)

    z

    output in tables relative error absolute error

    Output

    z = 1/4 (relative error)

    n 2F1(1/2,1;3/2;z) (HY.1.4) (HY.3.7) (HY.3.7) (HY.3.7) (HY.3.12) (HY.3.12) (HY.3.12) (HY.3.17) (HY.3.17) (HY.3.17)

    5 1.098612e+00 2.2e−05 2.8e−06 3.1e−08 7.3e−10 1.3e−03 2.1e−05 2.0e−06 1.4e−03 1.7e−04 1.2e−05

    10 1.098612e+00 1.2e−08 5.4e−12 1.6e−14 2.1e−16 1.3e−06 5.5e−09 3.1e−10 4.2e−06 2.5e−07 9.8e−09

    15 1.098612e+00 8.4e−12 1.0e−17 1.3e−20 1.2e−22 1.3e−09 2.5e−12 9.7e−14 1.4e−08 5.5e−10 1.5e−11

    20 1.098612e+00 6.3e−15 2.0e−23 1.4e−26 1.0e−28 1.3e−12 1.4e−15 4.2e−17 5.1e−11 1.5e−12 3.0e−14

    25 1.098612e+00 5.0e−18 3.8e−29 1.8e−32 1.0e−34 1.2e−15 8.7e−19 2.1e−20 1.9e−13 4.3e−15 7.2e−17

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    5,10,15,20,25

    .25

    26 / 59

  • Project

    Book

    Maple. LibraryWeb

    C++

    Maple library

    symbolic:

    f(z) = c0 + c1z+ c2z2 + . . .

    f(z) = b0(z) +a1(z)

    b1(z) +a2(z)

    b2(z) +a3(z)

    b3(z) + · · ·

    27 / 59

  • Project

    Book

    MapleLibrary. Web

    C++

    Web interface

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    erf

    dawson

    erfc

    Fresnel C

    Fresnel S

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    Error function and related integrals » erfc » approximate

    Representation

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    28 / 59

  • Project

    Book

    MapleLibrary. Web

    C++

    CFHB live  | Error function and related integrals  » erfc http://www.cfhblive.ua.ac.be/evaluate/index.php

    1 of 1 09/12/2008 03:11 PM

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    erf

    dawson

    erfc

    Fresnel C

    Fresnel S

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    Error function and related integrals » erfc » approximate

    Representation

    Input

    rhs J-fraction

    parameters none

    base 1010

    digits (5 ≤ digits ≤ 999)

    approximant (1 ≤ approximant ≤ 999)

    z

    tail estimatenone standard improved

    user defined (simregular form)

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    42

    13

    6.5

    29 / 59

  • Project

    Book

    MapleLibrary. Web

    C++

    CFHB live  | Error function and related integrals  » erfc http://www.cfhblive.ua.ac.be/evaluate/index.php

    1 of 1 09/12/2008 03:12 PM

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    erf

    dawson

    erfc

    Fresnel C

    Fresnel S

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    Error function and related integrals » erfc » approximate

    Representation

    Input

    rhs J-fraction

    parameters none

    base 1010

    digits (5 ≤ digits ≤ 999)

    approximant (1 ≤ approximant ≤ 999)

    z

    tail estimatenone standard improved

    user defined (simregular form)

    Output

    approximant 3.84214832712064746987580452585280852276469e-20

    absolute error 1.792e-46

    relative error 4.663e-27

    tail estimate 0

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    42

    13

    6.5

    30 / 59

  • Project

    Book

    MapleLibrary. Web

    C++

    CFHB live  | Error function and related integrals  » erfc http://www.cfhblive.ua.ac.be/evaluate/index.php

    1 of 1 09/12/2008 03:13 PM

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    erf

    dawson

    erfc

    Fresnel C

    Fresnel S

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    Error function and related integrals » erfc » approximate

    Representation

    Input

    rhs J-fraction

    parameters none

    base 1010

    digits (5 ≤ digits ≤ 999)

    approximant (1 ≤ approximant ≤ 999)

    z

    tail estimatenone standard improved

    user defined (simregular form)

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    42

    13

    6.5

    31 / 59

  • Project

    Book

    MapleLibrary. Web

    C++

    CFHB live  | Error function and related integrals  » erfc http://www.cfhblive.ua.ac.be/evaluate/index.php

    1 of 1 09/12/2008 03:14 PM

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    erf

    dawson

    erfc

    Fresnel C

    Fresnel S

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    Error function and related integrals » erfc » approximate

    Representation

    Input

    rhs J-fraction

    parameters none

    base 1010

    digits (5 ≤ digits ≤ 999)

    approximant (1 ≤ approximant ≤ 999)

    z

    tail estimatenone standard improved

    user defined (simregular form)

    Output

    approximant 3.84214832712064746987580500914386200233213e-20

    absolute error 4.654e-45

    relative error 1.211e-25

    tail estimate -6.67500000000000000000000000000000000000000e+01

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    42

    13

    6.5

    32 / 59

  • Project

    Book

    Maple

    . C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombineWeb

    C++ library

    numeric:

    f̃(x) = ±d0.d1 . . .dt−1 × βe

    ∣∣∣∣f(x) − f̃(x)f(x)∣∣∣∣ 6 αβ−t+1 ⇒

    f̃(x) − αβ−t+1βe+1 6 f(x) 6 f̃(x) + αβ−t+1βe+1

    f(x) ≈ F(x) ≈ F(x) = f̃(x)

    33 / 59

  • Project

    Book

    Maple

    . C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombineWeb

    truncation error:

    f(x) ≈ F(x)

    |f(x) − F(x)|

    |f(x)|6 ?

    round-off error:F(x) −→ F(x)

    +,−,×,÷ ⊕,,⊗,�

    |F(x) − F(x)||f(x)|

    6 ?

    34 / 59

  • Project

    Book

    Maple

    . C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombineWeb

    Example:

    √π

    2erf(x) =

    ∞∑m=0

    (−1)m

    m! (2m+ 1)x2m+1, 0 6 x 6 1

    |c2m+1|↘ 0

    = x

    (1 + x2

    c3

    c1

    (1 + x2

    c5

    c3(1 + . . .)

    ))c2m+1

    c2m−1=

    2m− 1m(2m+ 1)

    , 1 6 m 6 231 − 1

    β = 10, t = 40,α = 1, x = 0.8↙ ↘∣∣∣∣f(x) − F(x)f(x)

    ∣∣∣∣ 6 1210−39∣∣∣∣F(x) − F(x)f(x)

    ∣∣∣∣ 6 1210−3935 / 59

  • Project

    Book

    Maple

    . C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombineWeb

    Example:

    exp(x2)√π erfc(x) =

    2x2x2+1

    1 +

    ∞Km=1

    am(x)

    1, x > 0

    =

    2x2x2+1

    1 +

    ∞Km=1

    −2m(2m−1)(2x2+1+4m)(2x2+1+4(m−1))

    1

    0 > am(x)↘ −1/4

    β = 10, t = 40,α = 1, x = 6.5↙ ↘∣∣∣∣f(x) − F(x)f(x)

    ∣∣∣∣ 6 1210−39∣∣∣∣F(x) − F(x)f(x)

    ∣∣∣∣ 6 1210−3936 / 59

  • Project

    Book

    Maple

    C++. Type S.IType S.IISeriesType F.IType F.IIFractionsCombineWeb

    Type S.I

    monotonely decreasing am > 0

    f(x) =

    ∞∑m=0

    amxm

    Example:

    exp(x) =∞∑m=0

    xm

    m!, x ∈ R

    37 / 59

  • Project

    Book

    Maple

    C++Type S.I. Type S.IISeriesType F.IType F.IIFractionsCombineWeb

    Type S.II

    alternating am with |am| monotonely decreasing

    Example:

    erf(x) =2√π

    ∞∑m=0

    (−1)mx2m+1

    (2m+ 1)m!, x ∈ R

    38 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.II. SeriesType F.IType F.IIFractionsCombineWeb

    F(x) =

    n∑m=0

    cmxm:

    0 6 cmxm ↘ 0 :

    ∣∣∣∣∣∞∑

    m=n+1

    cmxm

    ∣∣∣∣∣ 6 cnxn1 − R , cmxcm−1 6 R < 10 6 c0, |cmxm|↘ 0 :

    ∣∣∣∣∣∞∑

    m=n+1

    cmxm

    ∣∣∣∣∣ 6 |cn+1xn+1|, n odd

    |f(x)| > |F(x)|⇒∣∣∣∣f(x) − F(x)f(x)

    ∣∣∣∣ 6{

    cn|xn|/(1−R)|F(x)|

    |cn+1xn+1|

    |F(x)|

    39 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.II. SeriesType F.IType F.IIFractionsCombineWeb

    Example:

    √π

    2erf(x) =

    ∞∑m=0

    (−1)m

    m! (2m+ 1)x2m+1

    |F(x)| > |x− x3/3| > 0.62

    |c1x| = 0.80, |c3x3| = 0.17↘ |c61x61| 6 7.58× 10−41

    n = 29(2n+ 1 = 59),∣∣∣∣f(x) − F(x)f(x)

    ∣∣∣∣ 6 1.27× 10−40

    40 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.II. SeriesType F.IType F.IIFractionsCombineWeb

    F(x) = c0

    (1 + c1c0x

    (1 + c2c1x

    (1 + . . . + cncn−1x

    ). . .))

    :

    r0 = c0, r̃0 = r0(1 + ρ0), |ρ0| 6�(r0)u

    1−�(r0)u

    rm =cm

    cm−1x, r̃m = rm(1 + ρm), |ρm| 6

    �(rm)u1−�(rm)u

    ∣∣∣∣F(x) − F(x)f(x)∣∣∣∣ 6 �(F)u1 − �(F)u F+(|x|)|F(x)|

    F+(x) =

    n∑m=0

    |cm|xm,

    F+(|x|)

    |F(x)|> 1

    �(F) = 1 + �(r0) + n(2 +

    nmaxm=1

    �(rm)

    ), u =

    β−s+1

    2

    41 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.II. SeriesType F.IType F.IIFractionsCombineWeb

    Example:

    √π

    2erf(x) =

    ∞∑m=0

    c2m+1x2m+1

    r0 = x, �(r0) 6 1, rm =x2(2m− 1)m(2m+ 1)

    , �(rm) 6 6

    n = 29, 175 6 �(F) 6 234,F+(|x|)

    |F(x)|6 2

    �(F)β−s+1

    1 − �(F)β−s+1/26

    1210−39 ⇒ s > 43

    42 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeries. Type F.IType F.IIFractionsCombineWeb

    Type F.I

    monotone behaviour of am(x)

    f(x) =∞Km=1

    am(x)

    1

    =a1(x)

    1 +a2(x)

    1 +a3(x)

    1 + · · ·

    43 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeries. Type F.IType F.IIFractionsCombineWeb

    Example:

    erfc(x) =∞Km=1

    am(x)

    1, x > 0

    =

    2x exp(−x2)√π(2x2+1)

    1 +

    ∞Km=1

    −2m(2m−1)(2x2+1+4m)(2x2+1+4(m−1))

    1

    am(x)↘ −1/4, tn(x)↘ −1/2

    44 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.I. Type F.IIFractionsCombineWeb

    Type F.II

    interval bound for am(x) from m > µ on

    f(x) =∞Km=1

    am(x)

    1

    crude tµ interval → finer tn interval

    45 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.I. Type F.IIFractionsCombineWeb

    Example:

    f(x) =2F1(a,k; c; x)

    2F1(a,k+ 1; c+ 1; x)= 1 +

    ∞Km=1

    amx

    1,

    x < 1

    a2m+1 =−(a+m)(c− k+m)

    (c+ 2m)(c+ 2m+ 1), m > 0

    a2m =−(k+m)(c− a+m)

    (c+ 2m− 1)(c+ 2m), m > 1

    46 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.II. FractionsCombineWeb

    F(x) = fn(x;wn),bm(z) = 1:

    Ln 6 tn ≈ wn 6 Rn

    |f(x) − F(x)|

    |f(x)|6Rn − Ln

    1 + Ln

    n−1∏m=1

    Mm

    Mm = max{∣∣∣∣ Lm1 + Lm

    ∣∣∣∣ , ∣∣∣∣ Rm1 + Rm∣∣∣∣} , m = 1, . . . ,n− 1

    47 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.II. FractionsCombineWeb

    Example:

    exp(x2)√π erfc(x) =

    ∞Km=1

    am(x)

    1

    Ln =∞K

    m=n+1

    −1/4

    1= −

    12

    Rn =∞K

    m=n+1

    an+1(x)

    1=

    −1 +√

    1 + 4an+1(x)2

    tn =∞K

    m=n+1

    am(x)

    1, n > 1

    n = 13

    M1 = 2.62× 10−4 ↗M12 = 3.43× 10−2

    2(Rn − Ln) 6 2.64× 10−16,12∏m=1

    Mm 6 1.27× 10−25

    48 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.II. FractionsCombineWeb

    F(x) = fn(z;wn),bm(z) = 1:

    ãm = am(1 + δm), max(|δ1|, . . . , |δn|) 612∆β−s+1

    |F(x) − F(x)||f(x)|

    612(4 + ∆)

    Mn − 1M− 1

    β−s+1

    M = max{M1, . . . ,Mn}, s > t

    49 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.II. FractionsCombineWeb

    Example:

    exp(x2)√π erfc(x) =

    ∞Km=1

    am(x)

    1

    ∆ =24

    1 − 12β−s+1,

    n = 13,

    M 6 3.84× 10−2

    12

    (4 +

    241 − 12β−s+1

    )Mn − 1M− 1

    β−s+1 612β−39 ⇒ s > 42

    50 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.IIFractions. CombineWeb

    Combinations

    ×,÷ of previous types:

    relative error of the form∣∣∣∣∣∏hi=1(1 + δi)∏h+ki=h+1(1 + δi)

    ∣∣∣∣∣is bounded by 1 + � if for 1 6 i 6 h+ k

    |δi| 6di�

    1 + �,

    h+k∑i=1

    di = 1

    51 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.IIFractions. CombineWeb

    Example:

    J5/2(x) = J1/2(x)J3/2(x)

    J1/2(x)

    J5/2(x)

    J3/2(x)

    J1/2(x) =

    √2πx

    sin(x)

    Jν+1(x)

    Jν(x)=x/(2ν+ 2)

    1 +

    ∞Km=2

    (ix)2/(4(ν+m− 1)(ν+m))1

    ,

    x ∈ R, ν > 0

    am(x)↗ 0

    52 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.IIFractions. CombineWeb

    special function series continued fractionγ(a, x) a > 0, x 6= 0Γ(a, x) a ∈ R, x > 0erf(x) |x| 6 1 identity via erfc(x)erfc(x) identity via erf(x) |x| > 1

    dawson(x) |x| 6 1 |x| > 1Fresnel S(x) x ∈ RFresnel C(x) x ∈ REn(x), n > 0 n ∈ N, x > 02F1(a,n; c; x) a ∈ R,n ∈ Z,

    c ∈ R \ Z−0 , x < 11F1(n; c; x) n ∈ Z,

    c ∈ R \ Z−0 , x ∈ RIn(x) n = 0, x ∈ R n ∈ N, x ∈ RJn(x) n = 0, x ∈ R n ∈ N, x ∈ R

    In+1/2(x) n = 0, x ∈ R n ∈ N, x ∈ RJn+1/2(x) n = 0, x ∈ R n ∈ N, x ∈ R

    53 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombine. Web

    Web interface

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    erf

    dawson

    erfc

    Fresnel C

    Fresnel S

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    Error function and related integrals » erfc » evaluate

    Representation

    Input

    parameters none

    base 10^k10^k k= (base 2^k: 1 ≤ k ≤ 24; base 10^k: 1 ≤ k ≤ 7)

    digits (5 ≤ digits ≤ 999)

    verbose yes no

    x

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    1

    40

    6.5

    54 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombine. Web

    CFHB live  | Error function and related integrals  » erfc http://www.cfhblive.ua.ac.be/evaluate/index.php

    1 of 1 09/12/2008 04:38 PM

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    erf

    dawson

    erfc

    Fresnel C

    Fresnel S

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    Error function and related integrals » erfc » evaluate

    Representation

    Input

    parameters none

    base 10^k10^k k= (base 2^k: 1 ≤ k ≤ 24; base 10^k: 1 ≤ k ≤ 7)

    digits (5 ≤ digits ≤ 999)

    verbose yes no

    x

    Output

    value 3.842148327120647469875804543768776621449e-20

    absolute error bound 6.655e-61 (CF)

    relative error bound 1.732e-41 (CF)

    tail estimate -3.691114343068670e-02

    working precision 42 (CF)

    approximant 13

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    1

    40

    6.5

    55 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombine. Web

    CFHB live  | Error function and related integrals  » erfc http://www.cfhblive.ua.ac.be/evaluate/index.php

    1 of 1 09/12/2008 03:16 PM

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    erf

    dawson

    erfc

    Fresnel C

    Fresnel S

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    Error function and related integrals » erfc » approximate

    Representation

    Input

    rhs J-fraction

    parameters none

    base 1010

    digits (5 ≤ digits ≤ 999)

    approximant (1 ≤ approximant ≤ 999)

    z

    tail estimatenone standard improved

    user defined (simregular form)

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    42

    13

    6.5

    -3.691114343068670e-02

    56 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombine. Web

    CFHB live  | Error function and related integrals  » erfc http://www.cfhblive.ua.ac.be/evaluate/index.php

    1 of 1 09/12/2008 03:17 PM

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    erf

    dawson

    erfc

    Fresnel C

    Fresnel S

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    Error function and related integrals » erfc » approximate

    Representation

    Input

    rhs J-fraction

    parameters none

    base 1010

    digits (5 ≤ digits ≤ 999)

    approximant (1 ≤ approximant ≤ 999)

    z

    tail estimatenone standard improved

    user defined (simregular form)

    Output

    approximant 3.84214832712064746987580454376877662144924e-20

    absolute error 4.000e-61

    relative error 1.041e-41

    tail estimate -3.691114343068670e-02

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    42

    13

    6.5

    -3.691114343068670e-02

    57 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombine. Web

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    J(nu, z)

    J(n, z)

    J(nu+1, z) / J(nu, z)

    j(n, z)

    j(n+1, z) / j(n, z)

    I(nu, z)

    I(n, z)

    I(nu+1, z) / I(nu, z)

    i(n, z)

    i(n+1, z) / i(n, z)

    Bessel functions » I(n, z) » evaluate

    Representation

    Input

    parameters n

    base 10^k10^k k= (base 2^k: 1 ≤ k ≤ 24; base 10^k: 1 ≤ k ≤ 7)

    digits (5 ≤ digits ≤ 999)

    verbose yes no

    x

    n

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    1

    50

    4.5

    4

    58 / 59

  • Project

    Book

    Maple

    C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombine. Web

    CFHB live  | Bessel functions  » I(n, z) http://www.cfhblive.ua.ac.be/evaluate/index.php

    1 of 1 12/11/2008 05:55 PM

    Function categories

    Elementary functions

    Gamma function and related

    functions

    Error function and related

    integrals

    Exponential integrals and

    related functions

    Hypergeometric functions

    Confluent hypergeometric

    functions

    Bessel functions

    J(nu, z)

    J(n, z)

    J(nu+1, z) / J(nu, z)

    j(n, z)

    j(n+1, z) / j(n, z)

    I(nu, z)

    I(n, z)

    I(nu+1, z) / I(nu, z)

    i(n, z)

    i(n+1, z) / i(n, z)

    Bessel functions » I(n, z) » evaluate

    Representation

    Input

    parameters n

    base 10^k10^k k= (base 2^k: 1 ≤ k ≤ 24; base 10^k: 1 ≤ k ≤ 7)

    digits (5 ≤ digits ≤ 999)

    verbose yes no

    x

    n

    Output

    value 2.7347222766930378559470450618354311463035025612657

    absolute error bound 1.106e-51, 1.017e-53, 2.128e-53, 6.851e-53 (CF), 1.036e-53 (SE)

    relative error bound 1.256e-51, 1.471e-53, 3.818e-53, 1.486e-52 (CF), 5.931e-55 (SE)

    tail estimate7.733062944939854e-03, 7.163861708630548e-03,

    7.163861708630548e-03, 7.163861708630548e-03

    working precision 57, 59, 58, 57 (CF), 56 (SE)

    approximant 25, 25, 24, 23 (CF), 33 (SE)

    Continue

    Special functions :continued fraction and series representations

    Handbook

    A. CuytW. B. JonesV. PetersenB. VerdonkH. Waadeland

    Software

    F. BackeljauwS. BecuweM. ColmanA. CuytT. Docx

    © Copyright 2008 Universiteit Antwerpen [email protected]

    1

    50

    4.5

    4

    59 / 59

    ProjectBookPart IPart IIPart IIIWeb

    MapleLibraryWeb

    C++Type S.IType S.IISeriesType F.IType F.IIFractionsCombineWeb