Definition. Definite Integral as a Limit of a
Riemann Sum. Let be
continuous over the interval ,
and let be
a partition, then the definite integral is given by
,
where and
the mesh size of the partition goes to zero in the "limit," i.e .
.
The following two Mathematica subroutines are used to illustrate this
concept, which was introduced in calculus.
The Left Riemann sum uses
in the definition.
Mathematica Subroutine (Left Riemann Sum).
The Right Riemann sum uses
in the definition.
Mathematica Subroutine (Right Riemann Sum).
The midpoint rule uses
in the definition.
Improvements can be made in two directions, the
midpoint rule evaluates the function at , which
is the midpoint of the subinterval
,
i.e.
in the Riemann sum.
Mathematica Subroutine (Midpoint Rule).
The
Trapezoidal Rule is the average of the
left Riemann sum and the right Riemann sum.
Mathematica Subroutine (Trapezoidal Rule).
Example Let over . Use
the left Riemann sum with n = 25, 50, and 100 to approximate the value of the
integral.
|