Last modified: October 26, 2024

This article is written in: πŸ‡ΊπŸ‡Έ

Midpoint Rule

The Midpoint Rule is a robust numerical method for approximating definite integrals. It seeks to estimate the area under a curve by partitioning it into a collection of rectangles and then summing the areas of these rectangles. This method is particularly useful when an antiderivative of the function is difficult or impossible to find analytically. By breaking the interval of integration into smaller segments, the Midpoint Rule allows for a piecewise approximation that can closely match the behavior of the actual function.

Unique to this method, the height of each rectangle is determined by the function's value at the midpoint of the corresponding subinterval. This approach often leads to a more accurate estimate of the area than other methods like the Trapezoidal Rule. By sampling the function at the midpoint, the Midpoint Rule effectively captures the average behavior of the function over each subinterval, reducing the potential for overestimation or underestimation that can occur when using endpoints or other sampling points.

Mathematical Formulation

For a function f(x) defined over an interval [a,b], the Midpoint Rule provides an approximation for the integral by evaluating the function at specific points within each subinterval. The basic formula for a single subinterval is:

(bβˆ’a)f(a+b2)

This formula calculates the area of a single rectangle whose width is the length of the interval (bβˆ’a) and whose height is the function value at the midpoint a+b2. To achieve a better approximation, the interval [a,b] is divided into n subintervals of equal width. The width of each subinterval, denoted by h, is given by:

h=bβˆ’an

Within each subinterval, defined by xi and xi+1, the function f(x) is evaluated at the midpoint xi+xi+12. This gives rise to the coordinates of the rectangle:

The area of each rectangle is then computed by multiplying the height f(xi+xi+12) by the width h. The integral approximation is obtained by summing these areas across all subintervals:

I=nβˆ’1βˆ‘i=0f(xi+xi+12)h

This summation provides an estimate of the total area under the curve f(x) over the interval [a,b]. The graphical representation of this method helps visualize how the Midpoint Rule approximates the integral by stacking these rectangles side by side.

Midpoint Rule Visualization

Algorithm Steps

  1. Begin by dividing the interval [a,b] into n equal subintervals. The choice of n determines the number of rectangles used in the approximation and affects the accuracy of the result.
  2. For each subinterval, calculate the midpoint xi+xi+12. Evaluate the function f(x) at this midpoint to determine the height of the corresponding rectangle.
  3. For each subinterval, multiply the function value at the midpoint by the width h of the subinterval. This gives the area of the rectangle for that subinterval.
  4. Sum the areas of all rectangles obtained from each subinterval. This total sum provides the approximate value of the definite integral over [a,b].

Example

Consider the function f(x)=x2.

I. Choose Interval and Subdivisions:

Let a=0 and b=2, and partition this interval into n=2 equal subintervals. This results in subintervals [0,1] and [1,2], each with a width h=1.

II. Evaluate at Midpoints:

III. Apply the Midpoint Rule Formula:

IV. Sum the Areas:

The total integral approximation is 0.25+2.25=2.5.

The exact value of the integral ∫20x2dx=83β‰ˆ2.6667. The Midpoint Rule provides an approximation of 2.5, which is reasonably close to the exact value, especially considering the simplicity of the method and the small number of subintervals used.

Advantages

Limitations

Table of Contents

    Midpoint Rule
    1. Mathematical Formulation
    2. Algorithm Steps
    3. Example
    4. Advantages
    5. Limitations