    

advertisement
AiGauss(z) as z-
z
 exp  t  dt (1.1)
1
AiGauss  z  
2


Let t’=t-z
AiGauss  z  

 exp   t ' z 
0
1


exp   z
1

2
 dt ' 
1

exp   z
0
2
  exp  2t ' z  t '  dt '
2


2
  exp  2t ' z  t '  dt '
(1.2)
2
0
Note that this from of the integral converges well only for z<0. Assume this to be the
case and write

1
AiGauss  z  
exp   z 2   exp  2t ' z  t '2  dt ' (1.3)

0
Let t = 2|z|t’ so that dt =2|z| dt’
2


1
 t  
AiGauss  z  
exp   z 2   exp  t     dt z  0 (1.4)

2z 
 2 z  
0

Expanding the integrand
n



 t2 
1  t 2 
exp

t
exp

dt

exp

t
 2  dt (1.5)
0    4 z 2  0   
n0 n !  4 z 
For n = 0

I 0   exp  t dt  1
0
General term
The general term is
In 
 1
 4z 
n
2 n

t
n!
2n
exp  t dt
(1.6)
0
Dwight p. 134
m x
m x
m 1  x
 x e dx   x e  m  x e dx
(567.8 with a=-1) (1.7)
Apply this twice
m x
m x
m 1  x
m 2  x
 x e dx   x e  m  x e   m  1  x e dx  (1.8)
Change m to 2n and x to t
t
e dx  t 2 n et  2n t 2 n 1et   2n  1  t 2 n 1et dx 
2n  x
(1.9)
2 n 1  t


  t  2nt  e   2n  2n  1  t
e dx 
For the integration range 0 to  the leading term is zero for n > 0. Thus
2 n 1
2n

t
0
t

e dx  2n  2n  1  t
2n  x
2 n 1  t
e dt
n  0 (1.10)
0
So that
In 
 1
 4z
I n 1 

n
2 n

 t exp  t dt 
2n
n! 0
 1
n 1
 4z  
2 n 1

t
n 1 !

 1
n
2n  2n  1 
 4z

2 n
n!
t
2 n 1
exp  t dt
0
(1.11)
exp  t dt
2 n 1
0
Putting the integral in terms of In-1 by subsituting In-1 for the integral
In 
 1

n
2n  n  1  4 z 2 
n 1
 4 z 2  n! 1
n
 2n  1
 2n  1!
n 1
I n 1
(1.12)
I n 1
2z2
this series has asymptotic convergence, for large |z| it decreases at first, but eventually the
n dominates and the sum oscillates between + and – large numbers. Writing the terms
out
I0  1
1
2z2
3
3 (1.13)
I 2   2 I1 
2z
2  2z4
5
15
I3   2 I 2   3 6
2z
2 z
For z = 1, the terms are I1=-.5, I2 = .75, I3 = 1.875
ENTER X
M, ALT
1
0.500000000000000
M, ALT
3
0.750000000000000
M, ALT
5
1.875000000000000
These are the same as the terms in Dwight 592. Dwight says that the error is less than the
last term used [ref 91, p 390]
2
x

2
e x 
2!
4!
6!
t 2
erf  x  
e
dt

1

1





 (592.) Must be only
2
4
6
 0
x   1! 2 x  2! 2 x  3! 2 x 

true for x > 0
I1  
1
Advancd Calculus, by E.B. Wilson; Ginn & Co., Boston, 1912
Alternatively the bracket can be written as
1
1 3 1 3  5
   1 2  2 4  3 6 
2x
2 x
2 x
For x = 10 and a last term of 10
10x9x8x7x6/(20)10=2.953125x10-9
For x = 10 and a last term of 20
20x19x18x17x16x15x14x13x12x11/2020= 6.393838623046875x10-15
The asymptotic expansion reaches 10-15 accuracy only for x > 6
Tbrack TBRACK.FOR
IMPLICIT REAL*8 (A-H,O-Z)
PRINT*,' ENTER X '
READ(*,*)X
FUN=BRACK(X)
PRINT*,' FUN = ',FUN
GOTO 5
END
C$INCLUDE BRACKET
5
Bracket bracket.for
FUNCTION BRACK(X)
IMPLICIT REAL*8 (A-H,O-Z)
BRACK=1
XP=1
X2=X*X
ANUM=1
IS=-1
M=1
DEN=2*X2
ALT=1
5
CONTINUE
ALT=ALT*M/DEN
PRINT*,' M, ALT ',M,ALT
M=M+2
BRACK=BRACK+IS*ALT
IS=-IS
IF(ALT.GT.1D-15)GOTO 5
RETURN
END
C:\temp>tbrack
ENTER X
6
M, ALT
1
0.0138888888888889
M, ALT
3
0.0005787037037037
M, ALT
5 4.0187757201646090D-005
M, ALT
7 3.9071430612711480D-006
M, ALT
9 4.8839288265889340D-007
M, ALT
11 7.4615579295108720D-008
M, ALT
13 1.3472257372727960D-008
M, ALT
15 2.8067202859849930D-009
M, ALT
17 6.6269784530201210D-010
M, ALT
19 1.7487859806580880D-010
M, ALT
21 5.1006257769194220D-011
M, ALT
23 1.6293665676270380D-011
M, ALT
25 5.6575228042605480D-012
M, ALT
27 2.1215710515977050D-012
M, ALT
29 8.5452167356018690D-013
M, ALT
31 3.6791905389396930D-013
M, ALT
33 1.6862956636806930D-013
M, ALT
35 8.1972705873367010D-014
M, ALT
37 4.2124862740480270D-014
M, ALT
39 2.2817633984426810D-014
M, ALT
M, ALT
M, ALT
M, ALT
M, ALT
M, ALT
M, ALT
M, ALT
FUN =
ENTER X
100
M, ALT
M, ALT
M, ALT
M, ALT
FUN =
ENTER X
41 1.2993374907798600D-014
43 7.7599322366019430D-015
45 4.8499576478762150D-015
47 3.1659445756969730D-015
49 2.1546011695715510D-015
51 1.5261758284465160D-015
53 1.1234349848286850D-015
55 8.5817950229969010D-016
0.9866531092311659
 note these terms just barely converge
1 5.0000000000000000D-005
3 7.5000000000000010D-009
5 1.8750000000000000D-012
7 6.5625000000000020D-016
0.9999500074981257
The complete value of Aigauss
Equation (1.4) in these terms is
1
AiGauss  z  
exp   z 2  Brack ( z ) z  0 (1.14)
2z 
For 15 digit accuracy z must be less than –5.91. The code is AIGZM.FOR with test calls
in TAIGSM.FOR
Consider the second function
 t2 
t 

exp   2   f  x  
2z 

 4z 
For x =0, the function is 1, for x=4 the function is exp(-16)
IMPLICIT REAL*8 (A-H,O-Z)
H=6D0/1000
OPEN(1,FILE='FUNC.OUT')
DO I=1,1000
X=(I-.5D0)*H
ARG=X*X
FUNC=EXP(-ARG)
WRITE(1,'(2G15.6)')X,FUNC
ENDDO
END
Download