4 : 1 f(x) Z b a dxf(x) (1) ( Double Exponential method=de ) 1 DE N = n T n h h =(b a)=n T n = b a f(a) +f(b) n f + f(a + j b a n )g n j=1 = b a f(a) +f(b) n f + f(a +j b a )g; n n+1 j=1 T n+1 = b a f(a) +f(b) n+1 f + f(a + j b a )g () n+1 n+1 j=1 1 1998 39
T n+1 = T n + b a n f(a +(j 1) b a ) (3) n+1 n+1 j=1 T 0 =(b a)(f(a) +f(b))= 1. f(x) ffl n = 1 h = b a, T = h(f(a) +f(b))=.. n=n h=h/ s=0 i =1; 3; ;n 1 s = s + f(a + ih) newt = T=+hs if jnewt T j <ffljnewt j goto (3) T = newt 3. newt f(x) =e x [0; 1] ffl =10 6 Fortran external f eps=1.0e-6 b=1.0 a=0.0 n=1 h=b-a t=h*(f(a)+f(b))/.0 do k=1,15 n=*n h=h/.0 40
s=0.0 do i=1,n-1, s=s+f(a+real(i)*h) enddo tn=t/.0+h*s if (abs(tn-t).lt.eps*abs(t)) goto 1 t=tn enddo 1 write(*,*) tn,k end real function f(x) f=exp(x) end 10 1:7188 e 1=1:718818 C #include <stdio.h> #include <math.h> float f(float); main() int i, k, n; float a, b, h, s, t, x, tn, eps; eps = 1.0e-6; b = 1.0; a = 0.0; n = 1; 41
h = b - a; t = h * (f(a) + f(b)) /.0; for(k = 1; k <= 15; k++) n = * n; h = h /.0; s = 0.0; for(i = 1; i <= n - 1; i += ) s = s + f(a + (float)i * h); } tn = t /.0 + h * s; if(fabs(tn - t) < eps * fabs(t)) break; } t = tn; } printf("%1.8f %d n", tn, k); float f(float x) return exp(x); } Fortran90 real(8),external::f real(8)::eps,a,b,h,s,tn,t eps=1.0d-10 b=1.0_8 a=0.0_8 n=1 h=b-a t=h*(f(a)+f(b))/.0_8 do k=1,30 n=*n h=h/.0_8 s=0.0_8 4
do i=1,n-1, s=s+f(a+i*h) enddo tn=t/.0_8+h*s if (abs(tn-t) < eps*abs(t)) exit t=tn enddo print*,tn,k end real(8) function real(8)::x f=exp(x) end f(x) R dx cos(x) ( sin() ' 0:90997407) 0 3 x 1 ;x ;x 3 f 1 ;f ;f 3 f(x) = a(x x ) + b(x x )+c h = x 3 x f 1 = ah bh + c f = c y = x x, g(y) =f(x) f 3 = ah + bh + c (4) a = f 1 + f 3 f h ; b = f 3 f 1 h ; c = f (5) Z h h g(y)dy = h 3 [f 1 +4f + f 3 ] (6) 43
S N S N = h 3 N j=0 [f(x j )+f(x j+ )+4f(x j+1 )] = h N N 3 [f(a)+f(b)+4 f(x j )+ f(x j )] (7) j=1 N 4 N = n (n =1; ; ) n p N = n T n ;S n S n+1 = 4 3 T n+1 1 3 T n (8) h =(b a)= n+1 4 3 T n+1 1 3 T n = 4h 3 [f(a)+f(b) h 3 + [f(a) +f(b) N j=1 N + j=1 f(a + jh)] j=1 f(a +jh)] = h N N 3 [f(a) +f(b)+4 f(x j )+ f(x j )] (9) j=1 S n 1. ffl =10 p, N := ; h := (b a)=; T := hff(a) +f(b) +f((a + b)=)g=; S := hff(a) +f(b)+4f((a + b)=)g=3. Loop N := N;h = h= s =0 j=1 ffl Loop(i =1; 3; 5; ;N 1) s=s+f(a+ih) ffl 44
newt=t/+h s news=(4newt-t)/3 If jnews Sj=jnewSj <fflgoto 3 T = newt; S = news 3. news Fortran external f eps=1.0e-6 n= b=1.0 a=0.0 h=(b-a)/.0 xi=(a+b)/.0 t=h*(f(a)+f(b)+.0*f(xi))/.0 ss=h*(f(a)+f(b)+4.0*f(xi))/3.0 do k=1,0 n=*n h=h/.0 s=0.0 do i=1,n-1, s=s+f(a+real(i)*h) enddo tn=t/.0+h*s sn=(4.0*tn-t)/3.0 if (abs(sn-ss).lt.eps*abs(sn)) goto 3 write(*,*) sn-ss,sn,k t=tn ss=sn enddo 45
3 write(*,*) sn,k end real function f(x) f=exp(x) end C #include <stdio.h> #include <math.h> float f(float); main() int i, k, n; float a, b, h, s, t; float xi, ss, sn, tt, tn, eps; eps = 1.0e-6; n = ; b = 1.0; a = 0.0; h = (b - a) /.0; xi = (a + b) /.0; t = h * (f(a) + f(b) +.0 * f(xi)) /.0; ss = h * (f(a) + f(b) + 4.0 * f(xi)) / 3.0; for(k = 1; k <= 0; k++) n = * n; h = h /.0; s = 0.0; for(i = 1; i <= n - 1; i += ) s = s + f(a + (float)i * h); } tn = t /.0 + h * s; sn = (4.0 * tn - t) / 3.0; 46
if(fabs(sn - ss) < eps * fabs(sn)) break; t = tn; ss = sn; } printf("%1.8f %d n", sn, k); } float f(float x) return exp(x); } Fortran 90 real(8),external::f real(8)::eps,a,b,h,xi,t,ss,tn,sn,s eps=1.0d-10 n= b=1.0_8 a=0.0_8 h=(b-a)/.0_8 xi=(a+b)/.0_8 t=h*(f(a)+f(b)+.0_8*f(xi))/.0_8 ss=h*(f(a)+f(b)+4.0_8*f(xi))/3.0_8 do k=1,0 n=*n h=h/.0_8 s=0.0_8 do i=1,n-1, s=s+f(a+i*h) enddo 47
tn=t/.0_8+h*s sn=(4.0_8*tn-t)/3.0_8 if(abs(sn-ss) < eps*abs(sn)) exit print*,sn-ss,sn,k t=tn ss=sn enddo print*,sn,k end real(8)function f(x) real(8)::x f=exp(x) end s S notation R 0 dx cos(x) =4 0 dx p (1 + 4x )(1 + 3x ) ( 0.3385954 ) ( ) 4 DE Mathematica 3 R 1 dx= p 1 x x = sin ß DE (Double Exponential Formula) 48
4 I n = 0 dxx n e x (n =1; ; ) (1) I n () (1) I 1 ; ;I 15 (3) lim n!1 I n (4) I 1 ; ;I 15 4.1 DE f(x) I = dtg(t) (10) h 1 I h = h g(ih) (11) i= 5 I = R 1 dte t = p ß (11) (h =0:5) (1) x = '(t) (1) (; 1) I = f('(t))' 0 (t) (13) (13) 1 I h = h f('(ih))' 0 (ih) (14) i= I (N ) h N + = h f('(ih))' 0 (ih) : N = N + + N +1 (15) i= N '(t) I = dοf(ο) (16) 49
3 (15) I (N ) h N + ο = '(t) =tanh( ß sinh t) (17) = h f(tanh( ß ß sinh(ih))) cosh(ih) cosh i= N ( ß sinh(ih)) (18) (17) (13) jtj f('(t))' 0 (t) ο A exp[ c exp jtj] (19) 4 (19) DE (Double Exponential Formula) 4. DE h h= 1 I h= = 1 fi h + h f('((j +1)h=))' 0 ((j +1)h=)g (0) j= I h = I I h I h ο exp( C=h) I h= ο exp( C=h) ο ( I h ) DE I h= I h I h ο I h= I h q j Ih= jοji h= I h j ffl p ji h= I h j <c 1 ffl (1) c 1 c 1 =0: DE (13) t = fi (19) Z dtf('(t))' 0 (t) ο A dt exp[ e t ]» A 1 e s ds ο e fi f('(fi))' 0 (fi) () fi fi e fi e fi jf('(fi))' 0 (fi)j <ffl (3) 3 x =(b a)ο= +(b + a)= (1) (16) 4 50
t = fi DE (18) cosh ((ß=) sinh(ih)) ο (1=4) exp[ ß exp jihj] 3 7: 10 7 jihj ο4:73 I = dxf(x); f(x) =(1 x ) ff ;ff > (4) ff -1 ff <0 (13) f('(t)) (19) ' 0 (t) ff -1 f DE 5 DE 1998 5 DE f(x) I = dtg(t) (5) h 1 I h = h g(ih) (6) i= 6 E D = I h I (7) 1=h D(d) =fx CjjImzj <dg d D(d) f(z) (1) c (0 <c<d) Λ(f;c) = dxfjf(x + ic)j + jf(x ic)jg lim Λ(f;c) < 1 c!d 0 5 FORTRAN77 1987) 6 51
() c (0 <c<d) Z c lim x!±1 c dyjf(x + iy)j =0 h>0 je D j» exp( ßd=h) Λ(f:d 0) (8) 1 exp( ßd=h) ( (N +1=)h ± ic; (N +1=)h; ±ci) (±(N +1=)h ci; ±(N +1=)h + ci) R f(z) cot(ßz=h) cot(ßz=h) z = kh (k h=ß z 0 = kh cot(ßz=h) ' h cos (ßz 0 =h)=(ß(z z 0 )) Res[cot(ßz=h)] = h=ß Z 1 N dzf(z) cot( piz i h )=h f(kh) R k= N N!1 I h () Z I h = 1 1 ß(x + ic) ß(x ic) dx[ f(x + ic) cot + f(x ic)cot ] i h h () Z I = 1 1 dxff(x + ic) +f(x ic)g I h I = dx[f(x + ic)g(x + ic) f(x ic)g(x ic)] 1 g(x) =i(1 cot ßz h )= ßx exp h 1 exp ßx h I h I» g(ic) dxfjf(x + ic)j + jf(x ic)jg = g(ic) (f; c) c! d 0 (6) I Λ h = h N k= N f(kh) (9) 5
I Λ h E D je I j=je D jο1 N E I = h f(kh) E I = I Λ h I h (30) jkj>n f(x) x!±1 w(z) D(d) 0 w(z) H(w; d) H(w; d) =ff(z)jf(z) : regular D(d); H sup jf(z)=w(z)j < 1g zd(d) f(z) H(w; d) je I j»hh jkj>n w(kh) Λ(f;c) jfj»hjwj Λ(f; c)» HΛ(w; c) 1.. f(z) H(w; d) ji Λ h Ij»jE Dj + je I j»h[g(d)λ(w; d 0) + h Λ(w; d 0) < 1 jkj>n w(kh)] (31) d<ß= w(z) =w DE (z) = d ß dz tanh(ß sinh z) = cosh(z) cosh ( ß sinh(z)) (3) x!±1 cosh x ' sinh x ' exp[jxj]= w DE (x) ' ß exp[ ß exp[jxj] +jxj] (33) je D j'je I j (8) ßd=h =(ß=) exp(nh) ji Λ h Ij»C0 H exp[ CN= ln N] (34) (; 1) I = f('(t))' 0 (t) (35) 53
(13) 1 I h = h f('(ih))' 0 (ih) (36) i= I (N ) h N + = h f('(ih))' 0 (ih) : N = N + + N +1 (37) i= N '(t) 7 I = dοf(ο) (38) ο = '(t) = tanh( ß ß sinh t) = cosh(ih) cosh ( ß sinh(ih)) (39) (37) I (N ) h N + = h f(tanh( ß ß sinh(ih))) cosh(ih) cosh i= N ( ß sinh(ih)) (40) (39) (35) jtj f('(t))' 0 (t) ο A exp[ c exp jtj] (41) (41) DE (Double Exponential Formula) 7 x =(b a)ο= +(b + a)= R b a f (x)dx (16) 54