Numerical Aspects of Special Functions Nico M. Temme In - - PowerPoint PPT Presentation

numerical aspects of special functions
SMART_READER_LITE
LIVE PREVIEW

Numerical Aspects of Special Functions Nico M. Temme In - - PowerPoint PPT Presentation

Numerical Aspects of Special Functions Nico M. Temme In collaboration with Amparo Gil and Javier Segura, Santander, Spain. Nico.Temme@cwi.nl Centrum voor Wiskunde en Informatica (CWI), Amsterdam Numerics of Special Functions, Castro Urdiales,


slide-1
SLIDE 1

Numerical Aspects of Special Functions

Nico M. Temme

In collaboration with Amparo Gil and Javier Segura, Santander, Spain.

Nico.Temme@cwi.nl

Centrum voor Wiskunde en Informatica (CWI), Amsterdam

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.1/45

slide-2
SLIDE 2

Contents

The complete revision of Abramowitz & Stegun (1964)

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.2/45

slide-3
SLIDE 3

Contents

The complete revision of Abramowitz & Stegun (1964) Software for computing special functions

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.2/45

slide-4
SLIDE 4

Contents

The complete revision of Abramowitz & Stegun (1964) Software for computing special functions A book on numerics of special functions

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.2/45

slide-5
SLIDE 5

Contents

The complete revision of Abramowitz & Stegun (1964) Software for computing special functions A book on numerics of special functions Recursion relations to compute special functions

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.2/45

slide-6
SLIDE 6

Contents

The complete revision of Abramowitz & Stegun (1964) Software for computing special functions A book on numerics of special functions Recursion relations to compute special functions Parabolic cylinder functions

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.2/45

slide-7
SLIDE 7

Contents

The complete revision of Abramowitz & Stegun (1964) Software for computing special functions A book on numerics of special functions Recursion relations to compute special functions Parabolic cylinder functions Using special functions

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.2/45

slide-8
SLIDE 8

Contents

The complete revision of Abramowitz & Stegun (1964) Software for computing special functions A book on numerics of special functions Recursion relations to compute special functions Parabolic cylinder functions Using special functions Can we rely on Maple or Mathematica ?

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.2/45

slide-9
SLIDE 9

The complete revision of A & S (1964)

Dan Lozier’s progress report in OPSF (July 15, 2006): Looking Ahead to the DLMF The Digital Library of Mathematical Functions has been a much bigger job than any of the project participants expected.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.3/45

slide-10
SLIDE 10

The complete revision of A & S (1964)

Dan Lozier’s progress report in OPSF (July 15, 2006): Looking Ahead to the DLMF The Digital Library of Mathematical Functions has been a much bigger job than any of the project participants expected. I am pleased to report that all of the chapters are in the final stages of editing and validating.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.3/45

slide-11
SLIDE 11

The complete revision of A & S (1964)

Dan Lozier’s progress report in OPSF (July 15, 2006): Looking Ahead to the DLMF The Digital Library of Mathematical Functions has been a much bigger job than any of the project participants expected. I am pleased to report that all of the chapters are in the final stages of editing and validating. The process of selecting a publisher for the print edition has been mapped out according to NIST and US Government procurement rules.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.3/45

slide-12
SLIDE 12

The complete revision of A & S (1964)

Dan Lozier’s progress report in OPSF (July 15, 2006): Looking Ahead to the DLMF The Digital Library of Mathematical Functions has been a much bigger job than any of the project participants expected. I am pleased to report that all of the chapters are in the final stages of editing and validating. The process of selecting a publisher for the print edition has been mapped out according to NIST and US Government procurement rules. The procurement will be competitive among qualified mathematics publishers.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.3/45

slide-13
SLIDE 13

The complete revision of A & S (1964)

In addition to the print edition, the DLMF will be distributed free from a public Web site at NIST. The Web address is http://dlmf.nist.gov. A sample chapter

  • n Airy functions has existed on this Web site since the

beginning of the project.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.4/45

slide-14
SLIDE 14

The complete revision of A & S (1964)

In addition to the print edition, the DLMF will be distributed free from a public Web site at NIST. The Web address is http://dlmf.nist.gov. A sample chapter

  • n Airy functions has existed on this Web site since the

beginning of the project. A tremendous amount of work has been done on the Web site since then to improve its "look and feel".

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.4/45

slide-15
SLIDE 15

The complete revision of A & S (1964)

In addition to the print edition, the DLMF will be distributed free from a public Web site at NIST. The Web address is http://dlmf.nist.gov. A sample chapter

  • n Airy functions has existed on this Web site since the

beginning of the project. A tremendous amount of work has been done on the Web site since then to improve its "look and feel". A new sample chapter on the gamma function is being

  • prepared. It will be on the Web site by the end of the

summer.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.4/45

slide-16
SLIDE 16

The complete revision of A & S (1964)

In addition to the print edition, the DLMF will be distributed free from a public Web site at NIST. The Web address is http://dlmf.nist.gov. A sample chapter

  • n Airy functions has existed on this Web site since the

beginning of the project. A tremendous amount of work has been done on the Web site since then to improve its "look and feel". A new sample chapter on the gamma function is being

  • prepared. It will be on the Web site by the end of the

summer. More than 50 individuals are contributing to the project as paid authors and validators. The staff at NIST consists of another dozen or so people.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.4/45

slide-17
SLIDE 17

Software for computing special functions

A complete survey of the available software: Lozier & Olver (1994); last update: December 2000. http://math.nist.gov/mcsd/Reports/2001/nesf/paper.pdf

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.5/45

slide-18
SLIDE 18

Software for computing special functions

A complete survey of the available software: Lozier & Olver (1994); last update: December 2000. http://math.nist.gov/mcsd/Reports/2001/nesf/paper.pdf Interactive systems based on computer algebra: Matlab, Maple, Mathematica.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.5/45

slide-19
SLIDE 19

Software for computing special functions

A complete survey of the available software: Lozier & Olver (1994); last update: December 2000. http://math.nist.gov/mcsd/Reports/2001/nesf/paper.pdf Interactive systems based on computer algebra: Matlab, Maple, Mathematica. Mathematical libraries: CALGO, SLATEC, CERN, IMSL, NAG.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.5/45

slide-20
SLIDE 20

Software for computing special functions

A complete survey of the available software: Lozier & Olver (1994); last update: December 2000. http://math.nist.gov/mcsd/Reports/2001/nesf/paper.pdf Interactive systems based on computer algebra: Matlab, Maple, Mathematica. Mathematical libraries: CALGO, SLATEC, CERN, IMSL, NAG. Books with software: Baker, Moshier, Numerical Recipes, Thompson, Wong & Guo, Zhang & Jin.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.5/45

slide-21
SLIDE 21

A book on numerics of special functions

The topics mentioned in this lecture, and several other topics, will be discussed extensively, with examples of software, in a new book with the title Numerical Methods for Special Functions. Written together with my co-authors Amparo Gil and Javier Segura (Santander, Spain). We have just submitted the first version for review. To be published by SIAM.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.6/45

slide-22
SLIDE 22

A book on numerics of special functions

As the basic methods for computing special functions we consider Power series: convergent, asymptotic Chebyshev series Recurrence relations and continued fractions Quadrature methods

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.7/45

slide-23
SLIDE 23

A book on numerics of special functions

Other important methods and aspects are Continued fractions Computation of the zeros of special functions Padé approximations Sequence transformations Best rational approximations

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.8/45

slide-24
SLIDE 24

A book on numerics of special functions

Other topics are The Euler summation formula Numerical solution of ODEs: Taylor expansion method Uniform asymptotic expansions Asymptotic inversion of distribution functions Symmetric elliptic integrals Numerical inversion of Laplace transforms Approximations of Stirling Numbers Oscillatory integrals

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.9/45

slide-25
SLIDE 25

A book on numerics of special functions

In the software section we discuss mainly the G-S-T Fortran codes published earlier. Routines can be downloaded from http://personales.unican.es/segurajj/book/software.html Airy and Scorer functions of complex arguments and their derivatives. Legendre functions of integer and half-odd degrees; toroidal harmonics. Modified Bessel functions of integer and half integer

  • rders.

Modified Bessel functions of purely imaginary orders. Parabolic cylinder functions. Zeros of the Bessel function

✂✁ ✄✆☎ ✝

.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.10/45

slide-26
SLIDE 26

Recursion relations

To compute Bessel functions Legendre functions Confluent hypergeometric functions (Kummer, Whittaker, Coulomb) Parabolic cylinder functions Gauss hypergeometric functions Incomplete gamma and beta functions Orthogonal polynomials recursion relations are important and frequently used.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.11/45

slide-27
SLIDE 27

Recursion relations

The recursion relations are of the form

✂✁ ✄ ☎ ✆✞✝ ✁ ✂✁ ✆ ✟ ✁ ✂✁ ✠ ☎ ✡ ☛✌☞ ✍ ✡ ✎ ☞ ✏ ☞ ✑ ☞✒ ✒ ✒

When there are two linearly independent solutions

✓✕✔

and

✖ ✔

, such that

✗ ✘ ✙ ✁ ✚ ✛ ✜ ✁ ✢ ✁ ✡ ☛✌☞

the computation of the minimal solution

✜ ✁ ☞ ✍ ✡ ✏ ☞ ✑ ☞ ✣ ☞✒ ✒ ✒

from

✓✥✤

and

✓✥✦

(forward recursion) is usually very unstable. The solution

✖ ✔

is called a dominant solution.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.12/45

slide-28
SLIDE 28

Recursion relations

For example, the functions

✜ ✁ ✄ ☎ ✝ ✡
✂ ✎ ✂ ☎ ✂ ✄ ✄ ✄ ✂ ☎ ✁ ✠ ☎ ✄ ✍ ✂ ✎ ✝ ☎ ☞ ✜✝✆ ✄✆☎ ✝ ✡
☞ ✜ ☎ ✄✆☎ ✝ ✡
✂ ✎ ☞

satisfy the recursion relation

✂✁ ✄ ☎ ✂ ✎ ✆ ☎ ✍ ✂✁ ✆ ☎ ✍
✠ ☎ ✡ ☛✌☞ ✍ ✡ ✎ ☞ ✏ ☞ ✑ ☞✒ ✒ ✒

Computing

✓ ✔ ✞ ✟ ✠

with Maple, standard 10 Digits, we see that

✜ ☎✡ ✄✆☎ ✝ ✡ ✂ ☛ ✒ ✑ ✣ ☛ ☛ ✎ ☛☞ ☛ ☛ ✌ ✎ ☛ ✠ ✍ ☞

a negative number.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.13/45

slide-29
SLIDE 29

Recursion relations

The function

✢ ✁ ✄✆☎ ✝ ✡
✂ ✜ ✁ ✄✆☎ ✝ ✡ ✎ ✆ ☎ ✆ ✄ ✄ ✄ ✆ ☎ ✁ ✠ ☎ ✄ ✍ ✂ ✎ ✝ ☎ ☞

is for

a dominant solution of the recursion. It can be computed in a stable way with starting values

✢ ✆ ✄✆☎ ✝ ✡ ☛✌☞ ✢ ☎ ✄ ☎ ✝ ✡ ✎ ✒

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.14/45

slide-30
SLIDE 30

Recursion relations

The recursion for the functions

✓ ✔ ✞

follows from the simpler (inhomogeneous) recursion

✄ ☎ ✡
✂ ☎ ✁ ✍ ☎ ✒

Use this in backward direction with false starting value

✓✁ ✦ ✞ ✟ ✠ ✂ ✂

. Then

✜ ☎✡ ✄ ✎ ✝ ✡ ✎ ✒ ☛ ✏✄ ☛ ☎ ☎ ☛ ✎ ✑✆ ✌ ✎ ☛ ✠ ☎ ✆ ✒ ✒ ✒ ☞

which is correct in all shown digits. Backward recursion for a minimal solution with false starting values is the basis for the Miller algorithm.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.15/45

slide-31
SLIDE 31

Parabolic cylinder functions

PCFs are solutions of the differential equation

✁ ✂ ✎ ✣ ☎ ✂ ✆✞✝
☛ ✒

Special cases: Hermite polynomials

✏ ✠ ✁ ✄ ✂
✁ ☎ ✄ ✆ ✝ ✁ ✄✆☎ ✞ ✏ ✝

when

✝ ✡ ✂ ✍ ✂ ☎ ✂

,

✍ ✡ ☛✌☞ ✎ ☞ ✏ ☞✒ ✒ ✒ ✒

complementary error function

✟ ✞ ✏
☎ ✄ ✆✡✠ ☛ ☞✍✌ ✄✆☎ ✞ ✏ ✝

when

✝ ✡ ☎ ✂

. PCFs are special cases of Kummer functions (confluent hypergeometric functions).

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.16/45

slide-32
SLIDE 32

Parabolic cylinder functions

Two linearly independent solutions of the differential equations are denoted by

✝ ☞ ☎ ✝

and

✁ ✄ ✝ ☞ ☎ ✝

. Another notation is

✂☎✄ ✄✆☎ ✝ ✡
✂ ✝ ✂ ☎ ✂ ☞ ☎ ✝

. Scaling is very important to prevent underflow and overflow (and to extend the domains for computation). When

✝ ✆ ☛

the computation is not too difficult. When

✝ ✝ ☛

and

☎ ✆ ☎ ✂ ✝ ✂ ✝

, oscillations occur. Large parameters

and

, with

☎ ✆ ☎ ✂ ✞ ✂ ✝

, are especially difficult to handle.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.17/45

slide-33
SLIDE 33

Parabolic cylinder functions

The regions in the

✄ ✝ ☞ ☎ ✝
  • plane where different methods of

computation for PCFs are considered. Only for

☎ ✆ ☛

; for negative

connection formulas are used.

5 10 15 20

x

  • 80
  • 60
  • 40
  • 20

20 40

a

2 3 5 6

f f f f f

6 4 1

f f12

11

f

A B 4 1 3 5 6 3 2 3

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.18/45

slide-34
SLIDE 34

Parabolic cylinder functions

Maclaurin series In region 1 (small

and

) we use Maclaurin series

✄ ✝ ☞ ☎ ✝ ✡ ✎ ✆✞✝ ☎ ✂ ✏ ☎ ✆ ✄ ✝ ✂ ✆ ✎ ✞ ✏ ✝ ☎ ✆ ✣ ☎ ✆ ✒ ✒ ✒ ☞
✄ ✝ ☞ ☎ ✝ ✡ ☎ ✆ ✝ ☎ ✡ ✑ ☎ ✆ ✄ ✝ ✂ ✆ ✑ ✞ ✏ ✝ ☎
☎ ✆ ✒ ✒ ✒ ✒

Recursion relations for the coefficients are used.

and

are solutions of the differential equation, but do not constitute a numerically satisfactory pair of solutions for large values of

.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.19/45

slide-35
SLIDE 35

Parabolic cylinder functions

and

are used in

✝ ☞ ☎ ✝ ✡
✝ ☞ ☛ ✝
✄ ✝ ☞ ☎ ✝ ✆
✄ ✝ ☞ ☛ ✝
✄ ✝ ☞ ☎ ✝ ☞ ✁ ✄ ✝ ☞ ☎ ✝ ✡ ✁ ✄ ✝ ☞ ☛ ✝
✄ ✝ ☞ ☎ ✝ ✆ ✁ ✁ ✄ ✝ ☞ ☛ ✝
✄ ✝ ☞ ☎ ✝ ☞

with

✝ ☞ ☛ ✝ ✡ ✟ ✏
✄ ✁ ✂ ✄ ✄ ✡ ✆ ✆ ☎ ✂ ✝ ✝ ☞
✄ ✝ ☞ ☛ ✝ ✡ ✂ ✟ ✏
✠ ✁ ✂ ✄ ✄ ☎ ✆ ✆ ☎ ✂ ✝ ✝ ☞ ✁ ✄ ✝ ☞ ☛ ✝ ✡ ✏
✄ ✁ ✂ ☎ ✘ ✆ ✟ ✄ ✡ ✆ ✂ ☎ ✂ ✝ ✝ ✄ ✄ ✡ ✆ ✂ ☎ ✂ ✝ ✝ ☞ ✁ ✁ ✄ ✝ ☞ ☛ ✝ ✡ ✏
✄ ✝ ✂ ☎ ✘ ✆ ✟ ✄ ☎ ✆ ✂ ☎ ✂ ✝ ✝ ✄ ✄ ☎ ✆ ✂ ☎ ✂ ✝ ✝ ✒

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.20/45

slide-36
SLIDE 36

Parabolic cylinder functions

In other regions we use Quadrature Recursions with computed starting values Poincaré asymptotic expansions (in powers of

☎ ✠ ☎

) Uniform asymptotic expansions in terms of elementary functions Uniform asymptotic expansions in terms of Airy functions

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.21/45

slide-37
SLIDE 37

Parabolic cylinder functions

Quadrature For quadrature we transform some standard integrals into integrals that can easily be evaluated by using the trapezoidal rule. It is well known that integrals of the type

✛ ✠ ✛
☎ ✜ ✄✄✂ ✝ ☎ ✂ ☞ ✄✝✆ ✝

with

analytic inside a strip

✞ ✟ ✂ ✞ ✝ ✝

, for some

✝ ✠ ☛

, are excellent starting points for the trapezoidal rule.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.22/45

slide-38
SLIDE 38

Parabolic cylinder functions

In many cases we transform finite integrals, say of the form

☎ ✠ ☎ ✜ ✄✄✂ ✝ ☎ ✂ ☞

into an integral of the form

✄✝✆ ✝

by using the error function:

✂ ✡ ✠ ☛ ☞✁ ✡ ✏ ✟ ✂ ✆
✄ ☎ ☎ ☎ ☞

and the integral becomes

☎ ✠ ☎ ✜ ✄✄✂ ✝ ☎ ✂ ✡ ✏ ✟ ✛ ✠ ✛
✂ ☎ ✜ ✄ ✠ ☛ ☞ ✄
✝ ☎

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.23/45

slide-39
SLIDE 39

Using special functions

Special functions play an important role in The solution of problems in mathematical physics, engineering, statistics, and so on. As kernels in integral transforms. . . . . . .

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.24/45

slide-40
SLIDE 40

Using special functions

The non-central chi-squared distributions The definition are for positive

☎ ☞
  • :
✁✄✂ ✄ ☎ ☞
✁ ✛ ✁ ☎ ✆ ☎ ✁ ✍ ☎ ✁ ✄
✍ ☞
☞ ✆ ✂ ✄ ☎ ☞
✁ ✛ ✁ ☎ ✆ ☎ ✁ ✍ ☎ ✆ ✄
✍ ☞

where

and

are the incomplete gamma functions:

✁ ✄ ✝ ☞ ☎ ✝ ✡ ✎ ✄ ✄ ✝ ✝ ✁ ✆ ✂ ✄ ✠ ☎
✁ ☎ ✂ ☞ ✆ ✄ ✝ ☞ ☎ ✝ ✡ ✎ ✄ ✄ ✝ ✝ ✛ ✁ ✂ ✄ ✠ ☎
✁ ☎ ✂ ✒ ✁✝✂ ✄✆☎ ☞
✆ ✆ ✂ ✄✆☎ ☞
✡ ✎ ✒

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.25/45

slide-41
SLIDE 41

Using special functions

The non-central chi-squared distributions Recursion relations are:

✁ ✂ ✄ ☎ ✄ ☎ ☞
✡ ✁ ✂ ✄✆☎ ☞
✁ ☎ ✂
✁ ✁ ✂ ✄ ✏ ☎
☞ ✆ ✂ ✄ ☎ ✄✆☎ ☞
✡ ✆ ✂ ✄✆☎ ☞
✁ ☎ ✂
✁ ✁ ✂ ✄ ✏ ☎

where

✁ ✂ ✄✄✂ ✝

is the modified Bessel function. Stability aspects are very important here. From these recursions homogeneous four-term recursions can be derived for

✁ ✂ ✄ ☎ ☞

and

✆ ✂ ✄✆☎ ☞

.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.26/45

slide-42
SLIDE 42

Using special functions

The non-central chi-squared distributions Integral representations are:

✁✄✂ ✄✆☎ ☞
✂ ☎ ✁ ☎ ✁ ✂ ✠ ☎ ✂
✁ ✁ ✂ ✠ ☎ ✄ ✏ ☎ ✂ ✝ ☎ ✂ ☞ ✆ ✂ ✄ ☎ ☞
✁ ✛
☎ ✁ ☎ ✁ ✂ ✠ ☎ ✂
✁ ✁ ✂ ✠ ☎ ✄ ✏ ☎ ✂ ✝ ☎ ✂ ✒

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.27/45

slide-43
SLIDE 43

Using special functions

The non-central chi-squared distributions By using an integral representation of the Bessel function:

✁✄✂ ✄✆☎ ☞
✁ ✠
✄ ✂ ✛ ✁ ✠ ✂ ✛
✄ ✂ ✄
✄ ✎ ✂
✄ ✠ ✎ ☞ ✆ ✂ ✄ ☎ ☞
✁ ✠
✄ ✂ ✛ ✁ ✠ ✂ ✛
✄ ✂ ✄
✄ ✎ ✂
☛ ✝ ✄ ✝ ✎ ☞

which in fact are inverse Laplace transforms. They are useful for deriving uniform asymptotic expansions.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.28/45

slide-44
SLIDE 44

Using special functions

The non-central chi-squared distributions In problems in radar communications very large values of

☎ ☞
  • are used, say, about 10,000.

Asymptotic analysis shows a transition when

  • passes the

value

☎ ✆
  • . There is a fast transition from 0 to 1.

The main approximant is in that case the complementary error function. See T(1993) and T(1996).

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.29/45

slide-45
SLIDE 45

Using special functions

A series of Bessel functions Consider the series in terms of modified Bessel functions

  • ✄✆☎
✡ ✂
  • ✁✂
✄ ☎✝✆ ✞ ✛ ✁ ☎ ✠ ✛ ✁ ✁ ✁ ✄✠✟ ✝ ✁ ✁ ✄✠✟ ✝ ✁ ✁ ✄✠✟ ✡ ✝ ✌ ☛ ☎ ✍ ✄ ☞ ✆ ✟ ✞ ✏ ✝ ✒

The function

  • ✄✆☎

is the solution of an elliptic boundary value problem inside a circle.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.30/45

slide-46
SLIDE 46

Using special functions

A series of Bessel functions The equation reads

☎ ✂ ✆ ✁ ✂
✂ ✁
✎ ☞ ☎ ✂ ✆
✝ ✎ ☞

with boundary condition

✌ ☛ ☎ ☞ ☞ ☎ ✘ ✆ ☞ ✝ ✡ ☛
  • n the boundary of the circle
✡ ✡ ✎

. We use polar coordinates

☎ ✡ ✡ ✌ ☛ ☎ ☞ ☞
✡ ☎ ✘ ✆ ☞ ✒

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.31/45

slide-47
SLIDE 47

Using special functions

A series of Bessel functions This is a so-called singular perturbation problem,

  • is a

small parameter. The solution has a boundary layer at the upper part of the circle. We recall the solution, we write

✟ ✡ ☎ ✂✁

,

  • ✄✆☎
✡ ✂
  • ✁✂
✄ ☎✝✆ ✞ ✛ ✁ ☎ ✠ ✛ ✁ ✁ ✁ ✄✠✟ ✝ ✁ ✁ ✄✠✟ ✝ ✁ ✁ ✄✠✟ ✡ ✝ ✌ ☛ ☎ ✍ ✄ ☞ ✆ ✟ ✞ ✏ ✝ ✒

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.32/45

slide-48
SLIDE 48

Using special functions

A series of Bessel functions

1.0 −1.0 1.0 −1.0

x y θ r

Boundary layer inside the circle along the upper boundary

✡ ✡ ✎ ☞

and near the points

☞ ☛ ✝

.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.33/45

slide-49
SLIDE 49

Using special functions

A series of Bessel functions It is difficult to compute

  • when
✡ ✞ ✎

with

, in particular in the neighborhoods of the points

✄ ☎ ☞
✡ ✄
☞ ☛ ✝

. It is not difficult to compute the modified Bessel functions. But when

is large, they become exponentially large, and the convergence of the Fourier series starts with high

✍ ✂

values. In particular in the boundary layer large quantities are canceling before convergence starts.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.34/45

slide-50
SLIDE 50

Using special functions

A series of Bessel functions A perturbation analysis starts with the expansion

  • ✄✆☎
✞ ✛ ✁ ☎ ✆
✄ ☎ ☞

in which the terms satisfy

✄✆☎ ☞
✂ ✎ ☞

and

✄✆☎ ☞
✠ ☎ ✄✆☎ ☞
☞ ✍ ✡ ✎ ☞ ✏ ☞✒ ✒ ✒ ☞

and all

should vanish at the lower part of the unit circle.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.35/45

slide-51
SLIDE 51

Using special functions

A series of Bessel functions Integrating the first few relations for the

  • gives
✄✆☎ ☞
✡ ✂
✁ ☞
✄ ☎ ☞
✁ ✁ ✡ ☞
✄✆☎ ☞
✁ ✏ ✁ ✂ ✄ ✑
✎ ✏
✂ ✆ ✁ ☎ ☞

where

✁ ✡ ✎ ✂ ☎ ✂

. Observe that these

become singular at the points

☞ ☛ ✝

and that they do not satisfy the boundary condition

✡ ☛
  • n the upper part of the unit circle.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.36/45

slide-52
SLIDE 52

Using special functions

A series of Bessel functions Simple model problems in singular perturbations with known exact solutions are of interest because Numerical codes for more general problems can be tested on these problems. They may give new challenges in (uniform) asymptotic analysis of integrals or series. They may provide asymptotic approximations that are difficult to obtain from perturbation analysis. The series expansions of

☎ ☞

is a challenge for numerical computations.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.37/45

slide-53
SLIDE 53

Can we rely on Maple and Mathematica ?

Consider

✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✄ ✁ ☎ ✄ ☎ ☎ ✂ ✒

Maple 9.5, Digits = 10, for

✁ ✡ ✎ ☛

, gives

✎ ☛ ✝ ✡ ✂ ✒ ✎ ✄ ✑ ☛ ☞ ✎ ☎ ✣ ✄ ✎ ✆ ✒ ☞ ✑ ☛ ☞ ✑ ✣ ✏ ✄ ✆ ✑

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.38/45

slide-54
SLIDE 54

Can we rely on Maple and Mathematica ?

Consider

✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✄ ✁ ☎ ✄ ☎ ☎ ✂ ✒

Maple 9.5, Digits = 10, for

✁ ✡ ✎ ☛

, gives

✎ ☛ ✝ ✡ ✂ ✒ ✎ ✄ ✑ ☛ ☞ ✎ ☎ ✣ ✄ ✎ ✆ ✒ ☞ ✑ ☛ ☞ ✑ ✣ ✏ ✄ ✆ ✑

With Digits = 40, the answer is

✎ ☛ ✝ ✡ ✂ ✒ ✎ ✄ ✑ ☛ ☞ ✎ ☎ ✣ ✄ ☛ ☞ ✑ ✏ ☛ ☎ ✆ ☎ ☎ ✣ ✣ ✎ ✄ ✄ ✆ ☛ ☎ ☎ ✑ ☛ ☞ ✑ ✣ ☛ ✄ ☛ ✆ ☛ ☛ ✎ ☛ ✆ ✆ ☛ ✒ ☞ ✑ ☛ ☞ ✑ ✣ ✏ ✄ ✆ ✏ ☞ ☞ ☛ ☎ ☛ ☎ ✄ ☛ ☎ ☛✆ ☞ ☛ ✏✄ ✆ ✏✄ ✏ ☞ ☛ ✣ ✣ ✄ ☛ ✣ ☛ ☛ ✏ ☛

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.38/45

slide-55
SLIDE 55

Can we rely on Maple and Mathematica ?

Consider

✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✄ ✁ ☎ ✄ ☎ ☎ ✂ ✒

Maple 9.5, Digits = 10, for

✁ ✡ ✎ ☛

, gives

✎ ☛ ✝ ✡ ✂ ✒ ✎ ✄ ✑ ☛ ☞ ✎ ☎ ✣ ✄ ✎ ✆ ✒ ☞ ✑ ☛ ☞ ✑ ✣ ✏ ✄ ✆ ✑

With Digits = 40, the answer is

✎ ☛ ✝ ✡ ✂ ✒ ✎ ✄ ✑ ☛ ☞ ✎ ☎ ✣ ✄ ☛ ☞ ✑ ✏ ☛ ☎ ✆ ☎ ☎ ✣ ✣ ✎ ✄ ✄ ✆ ☛ ☎ ☎ ✑ ☛ ☞ ✑ ✣ ☛ ✄ ☛ ✆ ☛ ☛ ✎ ☛ ✆ ✆ ☛ ✒ ☞ ✑ ☛ ☞ ✑ ✣ ✏ ✄ ✆ ✏ ☞ ☞ ☛ ☎ ☛ ☎ ✄ ☛ ☎ ☛✆ ☞ ☛ ✏✄ ✆ ✏✄ ✏ ☞ ☛ ✣ ✣ ✄ ☛ ✣ ☛ ☛ ✏ ☛

So, the first answer seems to be correct in all shown digits.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.38/45

slide-56
SLIDE 56

Can we rely on Maple and Mathematica ?

Take another integral, which is almost the same:

✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✄ ✁ ☎ ✄ ☎ ☎ ✂ ✡
✄ ✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✁ ☎ ✂ ✒

Maple 9.5, Digits=10, for

✁ ✡ ✎ ☛

, gives

✁ ✄ ✎ ☛ ✝ ✡ ✂ ☛ ✒ ✎ ✏ ☞ ☛ ☎ ☛ ✣ ☞ ✏ ☛ ✌ ✎ ☛ ✠ ☎

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.39/45

slide-57
SLIDE 57

Can we rely on Maple and Mathematica ?

Take another integral, which is almost the same:

✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✄ ✁ ☎ ✄ ☎ ☎ ✂ ✡
✄ ✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✁ ☎ ✂ ✒

Maple 9.5, Digits=10, for

✁ ✡ ✎ ☛

, gives

✁ ✄ ✎ ☛ ✝ ✡ ✂ ☛ ✒ ✎ ✏ ☞ ☛ ☎ ☛ ✣ ☞ ✏ ☛ ✌ ✎ ☛ ✠ ☎

With Digits = 40, the answer is

✁ ✄ ✎ ☛ ✝ ✡ ✒ ✎ ☎ ✌ ✎ ☛ ✠ ✆ ✡ ✒

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.39/45

slide-58
SLIDE 58

Can we rely on Maple and Mathematica ?

Take another integral, which is almost the same:

✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✄ ✁ ☎ ✄ ☎ ☎ ✂ ✡
✄ ✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✁ ☎ ✂ ✒

Maple 9.5, Digits=10, for

✁ ✡ ✎ ☛

, gives

✁ ✄ ✎ ☛ ✝ ✡ ✂ ☛ ✒ ✎ ✏ ☞ ☛ ☎ ☛ ✣ ☞ ✏ ☛ ✌ ✎ ☛ ✠ ☎

With Digits = 40, the answer is

✁ ✄ ✎ ☛ ✝ ✡ ✒ ✎ ☎ ✌ ✎ ☛ ✠ ✆ ✡ ✒

The correct answer is

✁ ✄ ✁ ✝ ✡ ✟
✂ ☎

and for

✁ ✡ ✎ ☛

we have

✁ ✄ ✎ ☛ ✝ ✡ ☛ ✒ ☎ ☞ ✆ ✑ ☎ ☎ ✏ ✆ ✄ ✆ ✌ ✎ ☛ ✠ ✆ ✡ ✒

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.39/45

slide-59
SLIDE 59

Can we rely on Maple and Mathematica ?

The message is: one should have some feeling about the computed result. Otherwise a completely incorrect answer can be accepted. Mathematica is more reliable here, and says: "NIntegrate failed to converge to prescribed accuracy after 7 recursive bisections in

near

✂ ✡ ✏ ✒ ✆ ✑ ✄ ✣ ☎ ✎ ☞ ✑ ✄ ✣ ☎ ✎ ☞ ✑ ✄ ☛

".

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.40/45

slide-60
SLIDE 60

Can we rely on Maple and Mathematica ?

By the way, Maple 7 could do the following integral

✝ ✄ ✁ ✝ ✡ ✛ ✠ ✛
✁ ☎ ✄ ✂ ✂ ✂ ✄ ✁ ☎ ☎ ✂ ☞

and the funny answer was, after some simplification,

✝ ✄ ✁ ✝ ✡ ✟
✂ ☎✁ ✎ ✆ ☎ ✘ ✂ ✆✄ ✙ ✄✄✂ ✝ ✠ ☛ ☞
☎ ☞

where

✠ ☛ ☞ ✂

is the error function. In Maple 9.5 the answer is

✝ ✄ ✁ ✝ ✡ ✟
✂ ☎ ✄ ✎ ✆
☛ ☞ ✁ ✝ ✒

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.41/45

slide-61
SLIDE 61

Can we rely on Maple and Mathematica ?

Consider

☎ ✝ ✡ ✛ ✆
✂ ✁ ☎ ✂ ✂ ✂ ✎ ✂
☎ ✠ ☛ ✒

Numerical quadrature gives

✏ ✝ ✡ ✂ ☛ ✒ ✆ ✑ ✣ ✑ ✣ ✆ ✂ ☛ ✒ ☛ ☛✆ ✏ ✏
  • .

Mathematica 4.1 gives for

☎ ✡ ✏

in terms of the Meijer G-function:

✏ ✝ ✡ ✟ ✁ ✂✁ ☎ ✂✁ ✡ ☛ ☞ ☎ ✂ ☛ ☞ ☛✌☞ ☎ ✂ ✂ ✏ ✂ ✏

Mathematica evaluates:

✏ ✝ ✡ ✂ ☛ ✒ ☞ ✣ ☛ ☛ ✣ ☞ ✂ ☛ ✒ ☞ ✑ ✏ ✏✄ ☛
  • .

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.42/45

slide-62
SLIDE 62

Can we rely on Maple and Mathematica ?

Ask Mathematica to evaluate

☎ ✝

:

☎ ✝ ✡
✄ ✠ ✄ ✄ ✄ ☛ ☞
✂ ☎ ✝ ✒

This gives

✏ ✝ ✡ ✂ ☛ ✒ ✎ ☎ ✎ ✎ ✣ ✂ ☛ ✒ ✑☞ ☞ ✑ ☞ ☞
  • .

So, we have three numerical results:

✡ ✂ ☛ ✒ ✆ ✑ ✣ ✑ ✣ ✆ ✂ ☛ ✒ ☛ ☛ ✆ ✏ ✏
✡ ✂ ☛ ✒ ☞ ✣ ☛ ☛ ✣ ☞ ✂ ☛ ✒ ☞ ✑ ✏ ✏ ✄ ☛
✡ ✂ ☛ ✒ ✎ ☎ ✎ ✎ ✣ ✂ ☛ ✒ ✑ ☞ ☞ ✑☞ ☞

Observe that

✡ ✄
✝ ✞ ✏

.

is correct.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.43/45

slide-63
SLIDE 63

Can we rely on Maple and Mathematica ?

Maple 9.5:

☎ ✝ ✡
✄ ✠ ✄
✄ ✎ ☞
✂ ☎ ✝ ✡
✄ ✠ ✄ ✄ ✄ ☛✌☞
✂ ☎ ✝ ☞

same as Mathematica. This is a wrong answer. Next, Maple 9.5, with

☎ ✡ ✏

,

✏ ✝ ✡
✂ ✠ ✂
✄ ✎ ☞ ✏
✏ ✝ ✆ ✏ ✟
✂ ✠ ✂ ☞

giving

✏ ✝ ✡ ✂ ✒ ✆ ✑ ✣ ✑ ✣ ✆ ✑ ✄ ☛ ✏ ✂ ✒ ☛ ☛✆ ✏ ✎ ✆ ☞ ✎ ☛ ✏
  • , which is the

correct answer.

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.44/45

slide-64
SLIDE 64

Finally, ...

Thank You

Numerics of Special Functions, Castro Urdiales, SPAIN, September 1-3 2006. – p.45/45