Вы находитесь на странице: 1из 2

www.numerical-methods.

com

Mid-point Integration Rule


The mid-point integration rule is one of the simplest methods of numerical integration or quadrature1; finding an approximation to an integral

The derivation of the method is based on approximating the function to be integrated by a piecewise constant function 2 and integrating that function. The domain is divided into subdomains where and .

In the mid-point integration rule the function by its value at the central point

is approximated in each interval . The method of

approximation is illustrated in the following graph. The summation of the area of the rectangles approximates the integral.

For the subdomain , the width is and the height is area of the rectangle approximates the integral over that subdomain: . Hence the total integral can be approximated as follows

, hence the

1 2

Numerical Integration or Quadrature Piecewise Polynomial Interpolation

www.numerical-methods.com

If the subdomains all have equal width

then

The error in the midpoint rule is found to be approximately proportional to the square of , or in the limit as , using O-notation3. Example In order to demonstrate the method, let us use the mid-point integration rule to find

The exact solution4 to the integral is =1.718282 . The numerical solution to the integral will first be found using five subdomains ( ), and we will then go on to double the number of subdomains in order to illustrate the pattern in the numerical error. An Excel spreadsheet5 is available in order to automate the method. n=5 The domain [0,1] is divided into five subdomains of equal width [0,0.2], [0.2,0.4], [0.4,0.6], [0.6,0.8] and [0.8,1.0]. The mid-points are therefore 0.1, 0.3, 0.5, 0.7 and 0.9. The mi-points and function values are listed in the following table. The mid-point integration rule is equivalent to the summation of the function values in the second column of the table and multiplying the result by the subdomain width: 2.013752707 + 2.459603111) = 1.715421 .

0.1 0.3 0.5 0.7 0.9

1.105170918 1.349858808 1.648721271 2.013752707 2.459603111

Hence the numerical error is |1.718282-1.715421|=0.003161 (to six decimal places). n=10, 20 Using the spreadsheet with 10 subdomains the result from the method is 1.717566 and the numerical error is 0.000716. Using the spreadsheet with 20 subdomains the result from the method is 1.718103 and the numerical error is 0.000179.

Big O Notation in Mathematics Integration 5 Mid-point Integration Rule Excel spreadsheet


3 4

Вам также может понравиться