    

advertisement
291217049
1/21/2004
1/2
Richardson’s Extrapolation
BLI Integration.
Form three integral estimates using every point, every second
point, and every third point out of the xi and fi vectors
returned by BLI. Ignore the possibility of using the 1/N4
Abli.zip
End point trap rule.docx Equation 9 is
f  xi   f  xi 1 
h2
h4 G1 x  c1
G
x


  f '  end   f '  beg   
 f '''(endN) 2 f '''(beg ) 
beg f  x  dx  h
2
12
720
i 1
4c1
 O  h 6  f v (end )  f v (beg ) 
G  x   G 2  x   2 Eqn 1
N
9
c1
Approximate the fifth derivative by
G
x

G
3
x





N2
f V  x   5  4  f '''  x 
N
end
And assume that the coefficient of 1/720 remains the same.
Multiply the top of equation 18 by 4 and subtract the second
Then the integral to xj can be written as
Eqn 2
3G  x   4G1 x   G 2  x  ;  G  x    4G1 x   G 2  x   / 3
the top by 9 and subtract the third
 f  x j 1   f  x j    x j  x j 1Multiply


g  x j   g  x j 1    x j  x j 1  
 f '  x j   f '  x j 1 


2
12 G  x   9G1 x   G3  x   / 8 Eqn 3


4
6
Multiply the middle one by 9 and the bottom by 4
x j  x j 1 
x j  x j 1 



f '''  x j   f '''  x j 1  
f ''' and
x j  subtract
f '''  x j 1 
720
36
G  x   9G 2  x   4G3( x)  / 5 Eqn 4
(1)
2






This leads to
Figure 1 Intermediate values found by BLI
Derivatives at J-1 aredetermined by the curve through
J-3to J+1. Derivatives at J are determined by the curve
through J-2 to J+2.
The four values of f(xj) most relevant for the integral from xj-1
to xj are shown in figure 1. A Lagrange polynomial through
the appropriate five points gives third derivatives at xj-1 and
xj. ..\Derivatives\Lagrange.docx
The goal is to spread N points from x0 to xN such that
the error term in the integral is minimal.
N

j 2
x
 x j 1 
12
j
362


f '''  x j   f '''  x j 1  (2)
2
This is accomplished by finding values of (2) for each
interval,then adding new points in the middle of the intervals
with the largest values of (2)
..\interpolation\Bli.doc Ibli.for
DO I=1,NP
G(I)=(4*G1(I)-G2(I))/3
GC=(9*G1(I)-G3(I))/8
GCC=(9*G1(I)-4*G3(I))/5
ERRG(I)=SQRT((G(I)-GC))**2+(G(I)-GCC)**2+(GCCGC)**2)/3)
ENDDO
Assignment
Use the BLI in to evaluate a few test integrals
between 0 and 1. Compare with analytic evaluations when
possible. ..\References.htm. Plot G(x),ERRG(x),
G(x)+ERRG(x), and G(x)-ERRG(x)
1. ftest = x4
2.
1
ftest  x   ln  
 x  Integral should be
0.886226925455
ftest  x  
3.
ln x
1  x Integral 0 to 1 should be
1.64493406685
4.
ftest  x   exp   x 2  error integral.
291217049
1/21/2004
5. Fresnel integral. Let fun=sin((/2)x*x) . Integrate
from 0 to 22 [Abramowitz and Stegun give
0.567822] This is a maximum of the integral. This is
a Fresnel integral which arises in diffraction
problems. It is also a chirp which arises when two
stars collide.
6.
1
1  2  0.866025403785 x  x 2
Integral to 1 should be 1.0471975512
ftest  x  
2/2
Download