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

Solution 3.

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

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


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

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

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

 

 

 

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

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

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

 

 

 

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

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

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

 

 

 

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

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

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

 

 

We are done.  

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

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



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

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005