Integral Evaluation Using the Monte Carlo Method

Consider a selection of four functions: , , , and . The area under these curves over the unit interval is , respectively. The Monte Carlo (MC) method can be used to approximate this integral and can be generalized easily to approximate the integral of any other function. The area is approximately the fraction of points in the light blue shaded area. The expected relative error decreases with the number of points, , as . The theoretical relative error is the straight red line plotted to the right on a log-log scale. The blue dot in the relative error diagram is the percent relative error obtained from the MC method. As expected, this dot lies close to the red line.

SNAPSHOTS

  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.