In this example we present a mathlet which illuminates the definite integral in terms of areas. Click on the screen shot to open the mathlet in a separate window.
The code for the applet is too long to display on this page. Download the fla file below and examine the well-commented code.
- Flash CS3 file integral_app.fla
Two objects are masked in this mathlet: the green-shaded area which becomes "unmasked" as the user slides the slider (very much as in Example 1 of this tutorial), and the graph of a f(x) which may very well go beyond the graphing board. Particularly that not much in the applet is hard-wired and you can easily extend the applet to allow the user's input for x and y ranges as well as for f(x). To do the latter however, you need a mathematical formulas parser. You can find such parser, MathParser, in our package of custom classes bkde.as3.*. You can download the package from any of the ActionScript 3 development articles in Custom Clases for Mathematics section of this website.