Ron Mak @ Apropos Logic

ron@apropos-logic.com
Publications and books by Ronald Mak

Java Number Cruncher

Program 7-1

Numerical Integration

This applet demonstrates two numerical integration algorithms. It computes the area under a function's curve in the interval [2, 10] by using an increasing number of intervals.

To run the demo:

  1. First define the function to integrate:
    1. Click the mouse in the graph panel to set from 2 up to 10 data points.
    2. Click the Plot integrand button to plot the function through the points.
  2. Choose a numerical integration algorithm:
    • Trapezoidal
    • Simpson's Parabolic
  3. Click the Step button repeatedly to compute the area under the curve with an increasing number of intervals.
  4. At any time, choose the other integration algorithm for the same function, or click the Reset button to start over.