and
. This gives the trapezoid rule
approximation
Theorem (Weighted Mean Value Theorem)
If
is integrable on
and
does not change sign on
then there exist a constant
in
such that
Note: The reason for the name of the theorem
is that the formula can be written as
Proof: We will restrict in this proof to the case where
is piecewise continuous
and
though the theorem is more general. The proof of this theorem is very similar to that of the
mean value theorem.
Suppose that no such
exists. Let
Since
is continuous, this means that either for all
in
or for
all
in
Without loss of generality, let's assume we are
in the first case. Also without loss of generality assume
on
.
Then if we multiply the two inequalities we get
At this point if we had the strict inequality, we would be done. Just integrate from
to
and the resulting formula would be
To get the strict inequality for the integral, we use the continuity of
the assumption
that
and our assumption that
is piecewise continuous. This
allows us to conclude that
at some point
in
where
is continuous.
(If not, then
except at a finite number of points, and then the integral would have
to be zero). At that point
we know that
. Let
By continuity of
at
, there is an interval
where
. Integrating from
to
and splitting the interval
into pieces we get
The case where
is not hard to check, but since we will not need it,
we will skip it
Note:
does not change sign on
and is integrable
Remark: The formula is exact if
(i.e. polynomial of degree 1 or less).
This exactness on polynomials of degree less than or equal to 1, is
(what we define to be) an order of accuracy of 1.
Quadrature rules are of the
order, if they are
exact with an
-degree polynomial. Schematically, the situation in the Trapezoidal rule
is shown in Figure 44