Module

for

The Midpoint Rule for Numerical Integration

   

Theorem  (Midpoint Rule)  Consider [Graphics:Images/MidpointRuleMod_gr_1.gif] over [Graphics:Images/MidpointRuleMod_gr_2.gif], where [Graphics:Images/MidpointRuleMod_gr_3.gif]. The midpoint rule is  

    
[Graphics:Images/MidpointRuleMod_gr_4.gif].  

This is an numerical approximation to the integral of [Graphics:Images/MidpointRuleMod_gr_5.gif] over [Graphics:Images/MidpointRuleMod_gr_6.gif] and we have the expression  

    
[Graphics:Images/MidpointRuleMod_gr_7.gif].  

The remainder term for the midpoint rule is  [Graphics:Images/MidpointRuleMod_gr_8.gif],  where [Graphics:Images/MidpointRuleMod_gr_9.gif] lies somewhere between [Graphics:Images/MidpointRuleMod_gr_10.gif], and have the equality  

    [Graphics:Images/MidpointRuleMod_gr_11.gif].
Proof  The Midpoint Rule  The Midpoint Rule  

 

Composite Midpoint Rule

    An intuitive method of finding the area under a curve y = f(x)  is by approximating that area with a series of rectangles that lie above the intervals  [Graphics:Images/MidpointRuleMod_gr_12.gif].  When several rectangles are used, we call it the composite midpoint rule.  

 

Theorem  (Composite Midpoint Rule)  Consider [Graphics:Images/MidpointRuleMod_gr_13.gif] over [Graphics:Images/MidpointRuleMod_gr_14.gif].  Suppose that the interval [Graphics:Images/MidpointRuleMod_gr_15.gif] is subdivided into  m  subintervals  [Graphics:Images/MidpointRuleMod_gr_16.gif]  of equal width  [Graphics:Images/MidpointRuleMod_gr_17.gif]  by using the equally spaced nodes  [Graphics:Images/MidpointRuleMod_gr_18.gif]  for  [Graphics:Images/MidpointRuleMod_gr_19.gif].   The composite midpoint rule for m subintervals is  

    
[Graphics:Images/MidpointRuleMod_gr_20.gif].  

This is an numerical approximation to the integral of [Graphics:Images/MidpointRuleMod_gr_21.gif] over [Graphics:Images/MidpointRuleMod_gr_22.gif] and we write  

    
[Graphics:Images/MidpointRuleMod_gr_23.gif].  

 

Remainder term for the Composite Midpoit Rule

Corollary  (Midpoint Rule: Remainder term)  Suppose that [Graphics:Images/MidpointRuleMod_gr_24.gif] is subdivided into  m  subintervals  [Graphics:Images/MidpointRuleMod_gr_25.gif]  of width  [Graphics:Images/MidpointRuleMod_gr_26.gif].   The composite midpoint rule  

    
[Graphics:Images/MidpointRuleMod_gr_27.gif]  

is an numerical approximation to the integral, and  

    
[Graphics:Images/MidpointRuleMod_gr_28.gif].  

Furthermore, if [Graphics:Images/MidpointRuleMod_gr_29.gif],  then there exists a value  c  with  a < c < b  so that the error term  [Graphics:Images/MidpointRuleMod_gr_30.gif]  has the form

    [Graphics:Images/MidpointRuleMod_gr_31.gif].  

This is expressed using the "big [Graphics:Images/MidpointRuleMod_gr_32.gif]" notation  [Graphics:Images/MidpointRuleMod_gr_33.gif].  

Remark.  When the step size is reduced by a factor of [Graphics:Images/MidpointRuleMod_gr_34.gif] the error term  [Graphics:Images/MidpointRuleMod_gr_35.gif] should be reduced by approximately [Graphics:Images/MidpointRuleMod_gr_36.gif].  

Proof  The Midpoint Rule  The Midpoint Rule  

 

Animations (Midpoint Rule  Midpoint Rule).  

 

Computer Programs  The Midpoint Rule  The Midpoint Rule  

 

Algorithm Composite Midpoint Rule.  To approximate the integral  

    [Graphics:Images/MidpointRuleMod_gr_37.gif][Graphics:Images/MidpointRuleMod_gr_38.gif][Graphics:Images/MidpointRuleMod_gr_39.gif],  

by sampling [Graphics:Images/MidpointRuleMod_gr_40.gif] at the [Graphics:Images/MidpointRuleMod_gr_41.gif] equally spaced points  [Graphics:Images/MidpointRuleMod_gr_42.gif]  for  [Graphics:Images/MidpointRuleMod_gr_43.gif],  where  [Graphics:Images/MidpointRuleMod_gr_44.gif].  

 

Mathematica Subroutine (Midpoint Rule).

[Graphics:Images/MidpointRuleMod_gr_45.gif]

Or you can use the traditional program.

 

Mathematica Subroutine (Midpoint Rule).

[Graphics:Images/MidpointRuleMod_gr_46.gif]

Example 1.  Numerically approximate the integral  [Graphics:Images/MidpointRuleMod_gr_47.gif]  by using the midpoint rule with  m = 1, 2, 4, 8, and 16  subintervals.
Solution 1.

 

Example 2.  Numerically approximate the integral  [Graphics:Images/MidpointRuleMod_gr_67.gif]  by using the midpoint rule with  m = 50, 100, 200, 400  and 800  subintervals.
Solution 2.

 

Example 3.  Find the analytic value of the integral  [Graphics:Images/MidpointRuleMod_gr_84.gif]  (i.e. find the "true value").   
Solution 3.

 

Example 4.  Use the "true value" in example 3 and find the error for the midpoint rule approximations in example 2.  
Solution 4.

 

Example 5.  When the step size is reduced by a factor of [Graphics:Images/MidpointRuleMod_gr_101.gif] the error term  [Graphics:Images/MidpointRuleMod_gr_102.gif] should be reduced by approximately  [Graphics:Images/MidpointRuleMod_gr_103.gif].  Explore this phenomenon.
Solution 5.

 

Example 6.  Numerically approximate the integral [Graphics:Images/MidpointRuleMod_gr_112.gif] by using the midpoint rule with  m = 1, 2, 4, 8, and 16  subintervals.
Solution 6.

 

Example 7.  Numerically approximate the integral [Graphics:Images/MidpointRuleMod_gr_131.gif] by using the midpoint rule with  m = 50, 100, 200, 400  and 800  subintervals.
Solution 7.

 

Example 8.  Find the analytic value of the integral  [Graphics:Images/MidpointRuleMod_gr_148.gif]  (i.e. find the "true value").  
Solution 8.

 

Example 9.  Use the "true value" in example 8 and find the error for the midpoint rule approximations in exercise 7.  
Solution 9.

 

Example 10.  When the step size is reduced by a factor of [Graphics:Images/MidpointRuleMod_gr_165.gif] the error term  [Graphics:Images/MidpointRuleMod_gr_166.gif] should be reduced by approximately  [Graphics:Images/MidpointRuleMod_gr_167.gif].  Explore this phenomenon.
Solution 10.

 

Various Scenarios and Animations for the Midpoint Rule.

Example 11.  Let  [Graphics:Images/MidpointRuleMod_gr_176.gif]  over  [Graphics:Images/MidpointRuleMod_gr_177.gif].  Use the Midpoint Rule to approximate the value of the integral.
Solution 11.

 

Animations (Midpoint Rule  Midpoint Rule).  

 

Research Experience for Undergraduates

Midpoint Rule  Midpoint Rule  Internet hyperlinks to web sites and a bibliography of articles.  

 

Download this Mathematica Notebook The Midpoint Rule for Numerical Integration

 

Return to Numerical Methods - Numerical Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004