Integral Evaluation Using the Monte Carlo Method

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

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.

Contributed by: Housam Binousand Brian G. Higgins  (November 2011)
Open content licensed under CC BY-NC-SA


Snapshots


Details

detailSectionParagraph


Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send