1 Introduction

Index - - Contents - - Previous chapter - Next chapter - - Previous page - Next page

1.2 Quadrature

Determining areas and volumes of bodies given in analytical form, also called quadrature, is an important problem in science.

Assume that the area I under the curve y = f(x) for x in A = (0,1.5) is to be computed, see the figure below. Matematically I can be expressed as the integral

                   ( 
               I = /   f(x)dx
                   )A

              2  |------------|
                 |  ___       |
              y  | /   \______| y = f(x)
                 |/           |
                 |            | I = the area under the 
                 |            |     curve y=f(x)
              0  |____________|
                 0       x    1.5
 
Probabilistically we may estimate I in the following way. Sample N random points in (0,1.5) x (0,2) and record how many, n, that are falling under the curve. Then we may estimate I as
                I ˜ (n/N)*H
where H is the area of the sampling box, in this case 3 (= 1.5 x 2). This probabilistic is sometimes called Hit-or-miss Monte Carlo.

Alternatively, if we knew the average fo of f in the interval (0,1.5) we could compute the area as

                 I = fo*1.5
In order to use this approach we must estimate fo. This could be done by using random numbers xi in (0,1.5), compute yi=f(xi) and estimate
            fo ˜ (1/N)(y1+... +yN)
This technique is called Crude Monte Carlo.

In the example above the argument x of the function f is in Rn, where n=1. However, the method is easy to extend to arbitrary n and A may be a complicated many-dimensional region.