(1.1)
Let t’=t-z
(1.2)
Note that this from of the integral converges well only for z<0. Assume this to be the case and write
(1.3)
Let t = 2|z|t’ so that dt =2|z| dt’
(1.5)
The general term is
(1.6)
Dwight p. 134
(567.8 with a=-1) (1.7)
Apply this twice
(1.8)
Change m to 2n and x to t
(1.9)
For the integration range 0 to ∞ the leading term is zero for n > 0. Thus
(1.10)
So that
(1.11)
Putting the integral in terms of In-1 by subsituting In-1 for the integral
(1.12)
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
(1.13)
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 9[1], p 390]
(592.) Must be only true for x > 0
Alternatively the bracket can be written as
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
IMPLICIT REAL*8 (A-H,O-Z)
5 PRINT*,' ENTER X '
READ(*,*)X
FUN=BRACK(X)
PRINT*,' FUN = ',FUN
GOTO 5
END
C$INCLUDE BRACKET
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 41 1.2993374907798600D-014
M, ALT 43 7.7599322366019430D-015
M, ALT 45 4.8499576478762150D-015
M, ALT 47 3.1659445756969730D-015
M, ALT 49 2.1546011695715510D-015
M, ALT 51 1.5261758284465160D-015 note these terms just barely converge
M, ALT 53 1.1234349848286850D-015
M, ALT 55 8.5817950229969010D-016
FUN = 0.9866531092311659
ENTER X
100
M, ALT 1 5.0000000000000000D-005
M, ALT 3 7.5000000000000010D-009
M, ALT 5 1.8750000000000000D-012
M, ALT 7 6.5625000000000020D-016
FUN = 0.9999500074981257
ENTER X
Equation (1.4) in these terms is
(1.14)
For 15 digit accuracy z must be less than 5.91. The code is AIGZM.FOR with test calls in TAIGSM.FOR
The bracket desired for fitting is Brack(z)/(2|z|√π)
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