Example 4.  Use Monte Carlo simulation to approximate the integral  [Graphics:Images/MonteCarloPiMod_gr_108.gif]

Solution 4.

Set up the function and the rectangular box enclosing the area.

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


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

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

Explore what happens with  [Graphics:../Images/MonteCarloPiMod_gr_112.gif]  points.

 

 

 

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

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

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

 

 

 

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

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

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

 

 

 

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

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

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

 

 

We are done.  

Aside.  The analytic value of the integral can be found.

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



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

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005