AiGauss(z) as z- Integrals testing this are in ..\..\integration\EPTrapRext.zip z 1 2 AiGauss z exp t dt (1) Let t’=t-z exp t ' z dt ' exp z 1 0 1 AiGauss z 2 1 0 exp z 2 exp 2t ' z t '2 dt ' 2 exp 2t ' z t ' dt ' (2) 2 0 Note that this form of the integral converges well only for z<0. Assume this to be the case and write 1 2 AiGauss z exp z exp 2t ' z t '2 dt ' (3) 0 Let t = 2|z|t’ so that dt =2|z| dt’ 2 1 t 2 1 AiGauss z exp z exp t dt z 0 (4) 2 z 2 Z 0 The term in {} is the bracket of brack.docx. This is the function brack in ..\..\integration\EPTrapRext.zip Expanding the integrand n t2 1 t 2 exp t exp dt exp t 2 dt (5) 0 4 z 2 0 n0 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 (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) (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 (8) Change m to 2n and x to t t e dx t 2 n et 2n t 2 n 1et 2n 1 t 2 n 1et dx 2n x (9) e dx For the integration range 0 to the leading term is zero for n > 0. Thus t 2 n 2nt 2 n 1 et 2n 2n 1 t 2n x t e dx 2n 2n 1 t 0 2 n 1 t e dt 2 n 1 t n 0 (10) 0 So that In 1 4z n 2 n t n! 2n exp t dt 0 1 n 2n 2n 1 4z 2 n n! t 2 n 1 exp t dt 0 (11) 1 I n 1 t 2 n 1 exp t dt 2 n 1 4 z n 1! 0 n 1 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 n! 1 2 n 2n 1 2n 1! n 1 I n 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 (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] I1 1 Advancd Calculus, by E.B. Wilson; Ginn & Co., Boston, 1912 2 e x 2! 4! 6! erf x e dt 1 1 2 4 6 0 x 1! 2 x 2! 2 x 3! 2 x true for x > 0 2 x t 2 (592.) Must be only 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 The code is in aigzm.zip 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 M, ALT M, ALT M, ALT M, ALT M, ALT M, ALT M, ALT 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 25 5.6575228042605480D-012 27 2.1215710515977050D-012 29 8.5452167356018690D-013 31 3.6791905389396930D-013 33 1.6862956636806930D-013 35 8.1972705873367010D-014 37 4.2124862740480270D-014 39 2.2817633984426810D-014 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 (4) in these terms is 1 AiGauss z exp z 2 Brack ( z ) z 0 (14) 2z For 15 digit accuracy z must be less than –5.91. The code in aigzm.zip is AIGZM.FOR with test calls in TAIGSM.FOR The bracket desired for fitting is Brack(z)/(2|z|) 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 Information Sampling Write the integral in (4) as t 2 I z exp t exp dt exp t f t , z dt 2z 0 0 (15) 2 t f t , z exp 1 t 2 z Let t 1 exp t y exp x dx 0 t 1 ln 1 y (16) 1 dy exp t y dy 1 y So that dt 1 I z 1/ f t y , z dy 0 (17) Numerically For y=1/α, t=ln(1- α 1/α)/α=∞ Computers do not handle ∞ very well. In order to leave a few digits for the last term the ending point for the integral in (17) is actually ymax = (1-1013)/α. This means that the integration in t extends only to 13*2.3/α. The first and third partials of the integrand in (17) with respect to y are needed t 1 y 1 y 2t (18) 2 2 y 1 y 3t 2 2 y 3 1 y 3 f t y y f t y 2 y 2 3 f t y y 3 f t t (19) t y 2 f t t f 2 t y (20) t y 2 t 2 y 2 2 f t t 2 t 3 f t 3 3 2 t t 2 y y y 3 3 f t y (21) 3 t y Figure 1 The black squares are for 100 data points. The colored squares increase this to 400.