Area and Integrals
As shown in the EPIC screen below, there are several methods included
for estimating the area under a function, the value of the integral
of a function, the area between two functions, and the value of
the integral of the difference of two functions. The EPIC screen
below shows the estimation of the area between F(x) = x cosx
and G(x) = x sinx from -4 to 3 using Simpson's rule. As with all methods available here, you can specify the number of subintervals to be used, the interval on which the approximation is done, whether or not to pause after doing the approximation on each subinterval, whether or not to fill the region in (paint), and whether to approximate area or the value of the integral.
The next screen shows the use of Simpson's rule on the integral of
F(x) = x sin 2x, for x > 0
and F(0) = 1, on the interval [0,6]. Just 4 subintervals were used, resulting in two parabolas. On the interval [0,3], the parabola passing through the points (0,F(0)), (1.5, F(1.5)) and (3,F(3)) is clearly visible. Similarly, for the interval [3,6]. While this is not a good approximation of the integral, it does show how Simpson's rule obtains the parabolas used in its estimations.
Area and integrals can also be estimated using Left, Right or Midpoint Riemann sums.
The next three EPIC screens show the left, right and midpoint Riemann sum approximations to the area under F(x) = x sin 2x using 8 subintervals. Although we have not done so, it is possible to superimpose these graphs. (We have set "Auto erase" in the menu to ON so that each estimate is shown on a cleared screen.)
The last two EPIC screens show the result of approximating F(x) by the Trapezoidal rule, and by Gauss quadrature, using a Gauss method of order 3. Notice that this last approximation is extremely good, especially compared to the other methods shown here! On each of the eight subintervals, Gauss of order 3 approximates the function with a cubic at points chosen to exactly compute the area under polynomials of degree 2(3)-1 = 5. On such small subintervals, such approximation is very accurate.
For Gauss Quadrature, the area under the eight approximating polynomials (one in each subinterval, and of degree 2*3-1=5 in this case) is drawn in green, and the function is re-drawn afterwards. These approximating quintics are so accurate that almost no difference is observed between them and the function. Look carefully near the largest peak, and near the leftmost and rightmost valleys.