   Infinite range variable change

advertisement
291183387
4/18/2006
Infinite range variable change
1/2
Midpoint trap rule evaluation of the
integral infinite range

I
 f  r  dr
(1.1)
Interesting integral

r
t

 a
 g  x  dx



(1.2) Note that 0<t<1
 g  x  dx

dt=
g(r)dr

(1.3)
 g  xˆ  dxˆ
So that
I


1
g  x  dx 
0
f  r t 
g  r t 
dt (1.4)
Arctan g(x)=1/(1+x2)
Let
1
(1.5) Compare
1  x2
Error! Reference source not found. which had
1/(1+x)2
r
1
1
1
 1  x 2  tan  r   tan    (1.6)
g  x 
 tan 1  r    / 2
So that
1
t   tan 1  r    / 2  (1.7)

Solve for r to find
  t  1/ 2   tan 1  r 
r  t   tan   t  1/ 2  
So that

I


1
g  x  dx 
0
f  r t 
g  r t 
dt
f  r t 
dt
1
0
1  r 2 t 
1
   1  r 2  t   f  r  t   dt
0
 b
2
x
2



ab  a  b) 
(1.10) Dwight
856.31i
IMPLICIT REAL*8(A-H,O-Z)
PARAMETER (N=5000)
COMMON/PASS/A,B
DATA PI/3.141592653589793D0/
C *** MID-POINT
A=17
B=23
AINT=0
H=1D0/N
DO I=1,N
T=H*(I-.5D0)
R=TAN(PI*(T-.5D0))
F=(1+R**2)*FTEST(R)
AINT=AINT+F
ENDDO
AINT=AINT*H*PI
ANAL=PI/(A*B*(A+B))
PRINT*,' NUMERICAL FULL INTEGRAL ',AINT
PRINT*,' ANALYTIC FULL INTEGRAL ',ANAL
READ(*,'(A)')
END
FUNCTION FTEST(X)
IMPLICIT REAL*8(A-H,O-Z)
COMMON/PASS/A,B
FTEST=1/((A*A+X*X)*(B*B+X*X))
RETURN
END
FULL INTEGRAL 5000 pts
2.008690954980680D-004 mid point
2.008690954980690D-004 analytical
compare this accuracy with #Semi_result
The difference is due to the fact that the integrals
at the end of the region are smooth. The
function can be periodically continued. – more
on this later.
(1.8)

1
x
2
for\midpt.for
Using N points
-

dx
2
(1.9)
291183387
4/18/2006
2/2
d. Evaluate

2 2
 exp(a x ) cos  mx  dx 


 m2 
exp   2 
a
 4a 
Dwight 861.20
Note that c. does not go to zero as t  0 and 1. In
addition its accuracy is somewhat limited owing to
an infinite set of oscillations.
The 1/r2 transform
Figure 1 Full integration range.
Figure 2 Lower interval
The function g(r)=1/(2+r2) has an integral
r
1
1
r  
 x  
0  2  x 2 dx   arctan     2  arctan  a   2 
So that
r t 
 r t       2
1
t   tan 1 
/
 tan 1
(2.1)




 

     2  
Solve for r(t) to find
 t 
 tan    r  t 
(2.2)
 2
So that

1
f  r t 
I   g  x  dx 
dt
0
0 g  r t 

 1 f  r t 
dt
1
2 0
 2  r 2 t 
(2.3)
 1 2 2
  r  t   f  r  t   dt
2 0
FOR\midptal.for

i
Figure 3 Upper interval
Assignment – infinite integrals
a. Evaluate (1.10) for other A and B’s

dx
1* 3* 5

b. Evaluate 
2
2 4
2 * 4 * 6 * a7
  a  x 
Dwight 856.21

sin 2  mx  dx
 m  Dwight
c. Evaluate 
x2

858.652
H.B.Dwight, Tables of Integrals and other Mathematical
Data, Macmillan 1961
Download