Chapter 7 - Looping in Maple

7.7 Integral - Accuracy Estimates

The area under the curve is obviously the integral of the function. For the Skewed Mexican Hat function, for which we have the analytical form, we can calculate the "exact" area under the curve via performing the necessary integral.

Maple can do this analytical work for us. The Maple command is "int". The syntax is

         int( f(x), x );

which performs the "indefinite" integral of the function f(x) with respect to x. The definite integral, in a specific range, is accomplished by the same command in which we provide the range of the integral in the usual Maple notation.

          int( f(x), x, x=x_min..x_max );

So, for the Skewed Mexican Hat function, called f(x) in the previous sections, we can get the exact integral of the function by adding the following piece to the Maple worksheet.

The results are:

We clearly see that the trapezoidal rule provides the most accurate results of the three approximate forms.


 
Section 7.6 Chapter 7 Section 7.8       TOC

Any questions or suggestions should be directed to
Michel Vallières at vallieres@physics.drexel.edu