Example 7.   Let  [Graphics:Images/AdaptiveQuadMod_gr_182.gif]  over  [Graphics:Images/AdaptiveQuadMod_gr_183.gif].  Use the adaptive Simpson's rule to approximate the value of the integral.  

Solution 7.

Call the adaptive subroutine with the command  Adapt[0,2,0.001].

Tracing the steps of adaptive quadrature will reveal that the following sequence of nodes is used.

{{0.,1.,2.},

{0.,0.5,1.,1.5,2.},

{0.,0.25,0.5,0.75,1.,1.5,2.},

{0.,0.25,0.5,0.75,1.,1.25,1.5,1.75,2.},

{0.,0.25,0.5,0.625,0.75,0.875,1.,1.25,1.5,1.75,2.},

{0.,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.,1.25,1.5,1.75,2.},

{0.,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.0625,0.125,0.1875,0.25,0.375,0.5,0.625,0.75,0.875,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.625,0.75,0.875,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.875,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.03125,0.0625,0.09375,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.03125,0.0625,0.09375,0.125,0.15625,0.1875,0.21875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.015625,0.03125,0.046875,0.0625,0.09375,0.125,0.15625,0.1875,0.21875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.0078125,0.015625,0.0234375,0.03125,0.046875,0.0625,0.09375,0.125,0.15625,0.1875,0.21875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.00390625,0.0078125,0.0117188,0.015625,0.0234375,0.03125,0.046875,0.0625,0.09375,0.125,0.15625,0.1875,0.21875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.00195313,0.00390625,0.00585938,0.0078125,0.0117188,0.015625,0.0234375,0.03125,0.046875,0.0625,0.09375,0.125,0.15625,0.1875,0.21875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.000976563,0.00195313,0.00292969,0.00390625,0.00585938,0.0078125,0.0117188,0.015625,0.0234375,0.03125,0.046875,0.0625,0.09375,0.125,0.15625,0.1875,0.21875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.000488281,0.000976563,0.00146484,0.00195313,0.00292969,0.00390625,0.00585938,0.0078125,0.0117188,0.015625,0.0234375,0.03125,0.046875,0.0625,0.09375,0.125,0.15625,0.1875,0.21875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.},

{0.,0.000244141,0.000488281,0.000732422,0.000976563,0.00146484,0.00195313,0.00292969,0.00390625,0.00585938,0.0078125,0.0117188,0.015625,0.0234375,0.03125,0.046875,0.0625,0.09375,0.125,0.15625,0.1875,0.21875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.75,0.8125,0.875,0.9375,1.,1.125,1.25,1.375,1.5,1.75,2.}}

 

 

The corresponding computed numerical approximations for the integral are summarized in the following table.

[Graphics:../Images/AdaptiveQuadMod_gr_184.gif]

    

m sample points

Adapt[0,2,0.001]

3

[Graphics:../Images/AdaptiveQuadMod_gr_185.gif]

5

[Graphics:../Images/AdaptiveQuadMod_gr_186.gif]

7

[Graphics:../Images/AdaptiveQuadMod_gr_187.gif]

9

[Graphics:../Images/AdaptiveQuadMod_gr_188.gif]

11

[Graphics:../Images/AdaptiveQuadMod_gr_189.gif]

13

[Graphics:../Images/AdaptiveQuadMod_gr_190.gif]

15

[Graphics:../Images/AdaptiveQuadMod_gr_191.gif]

17

[Graphics:../Images/AdaptiveQuadMod_gr_192.gif]

19

[Graphics:../Images/AdaptiveQuadMod_gr_193.gif]

21

[Graphics:../Images/AdaptiveQuadMod_gr_194.gif]

23

[Graphics:../Images/AdaptiveQuadMod_gr_195.gif]

25

[Graphics:../Images/AdaptiveQuadMod_gr_196.gif]

27

[Graphics:../Images/AdaptiveQuadMod_gr_197.gif]

29

[Graphics:../Images/AdaptiveQuadMod_gr_198.gif]

31

[Graphics:../Images/AdaptiveQuadMod_gr_199.gif]

33

[Graphics:../Images/AdaptiveQuadMod_gr_200.gif]

35

[Graphics:../Images/AdaptiveQuadMod_gr_201.gif]

37

[Graphics:../Images/AdaptiveQuadMod_gr_202.gif]

39

[Graphics:../Images/AdaptiveQuadMod_gr_203.gif]

41

[Graphics:../Images/AdaptiveQuadMod_gr_204.gif]

[Graphics:../Images/AdaptiveQuadMod_gr_205.gif]

[Graphics:../Images/AdaptiveQuadMod_gr_206.gif]

[Graphics:../Images/AdaptiveQuadMod_gr_207.gif]

Animation 1.  ( Adaptive Simpson's Rule  Adaptive Simpson's Rule ).  Internet hyperlink.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004