1 Definition and basic idea

The midpoint rule is a numerical method for approximating a definite integral by replacing the curve of a function with a collection of rectangles. Instead of using the function value at the left or right end of each subinterval, it uses the value at the midpoint. This choice often balances overestimates and underestimates more effectively than endpoint sampling.

1.1 Definite integrals and approximation

A definite integral represents accumulated quantity, such as area under a curve, total distance traveled, or total change. In many cases, the exact antiderivative is difficult or impossible to obtain in elementary form, so approximation methods are used. The midpoint rule estimates the integral by dividing the interval into smaller pieces and summing approximate contributions from each piece.

1.2 Midpoints of subintervals

If an interval is split into equal subintervals, each subinterval has a center point called its midpoint. The midpoint rule evaluates the function at these centers. Using central values often captures the typical behavior of the function on each subinterval more accurately than using an endpoint, especially when the function changes smoothly.

1.3 Geometric interpretation

Geometrically, the method constructs rectangles whose bases are the subintervals and whose heights are determined by the function values at the midpoints. The total area of these rectangles serves as an estimate of the area under the curve. For many smooth functions, this approximation is visually and numerically close to the true integral.

2 Formula for the midpoint rule

The midpoint rule is expressed through a simple product of subinterval width and midpoint function values. It can be applied to a single interval or extended to a partition of many intervals.

2.1 Single-interval midpoint rule

On a single interval from \(a\) to \(b\), the simplest midpoint approximation uses one rectangle. The estimated integral is \[ \int_a^b f(x)\,dx \approx (b-a)\,f\!\left(\frac{a+b}{2}\right). \] This formula treats the function value at the center of the interval as representative of the whole interval.

2.2 Composite midpoint rule

For better accuracy, the interval \([a,b]\) is divided into \(n\) equal parts of width \[ \Delta x = \frac{b-a}{n}. \] If \(x_i^* = a + \left(i-\tfrac12\right)\Delta x\) denotes the midpoint of the \(i\)th subinterval, then \[ \int_a^b f(x)\,dx \approx \Delta x \sum_{i=1}^n f(x_i^*). \] This is called the composite midpoint rule.

2.3 Notation for partitioned intervals

A partition of \([a,b]\) is a set of points \[ a=x_0<x_1<\cdots<x_n=b. \] When the subintervals are equal, each has the same width \(\Delta x\). The midpoint of \([x_{i-1},x_i]\) is \[ m_i=\frac{x_{i-1}+x_i}{2}. \] Using these midpoints simplifies the sum and gives a consistent sampling pattern across the interval.

3 Derivation

The midpoint rule can be derived from the definition of the definite integral as a limit of Riemann sums. It also follows from approximating a function by a constant value over each subinterval.

3.1 From Riemann sums

A Riemann sum approximates an integral by choosing a sample point in each subinterval and summing the products of function values and subinterval widths. The midpoint rule is a particular Riemann sum in which the sample point is the center of each subinterval. As the partition becomes finer, the approximation improves for suitably regular functions.

3.2 Rectangle approximation at midpoints

On a small subinterval, a smooth function does not usually vary much. The midpoint value often reflects the typical height over that interval more fairly than an endpoint value. This makes the midpoint rectangle a natural local approximation, especially when the function is rising on one side and falling on the other.

3.3 Relationship to average values

The midpoint rule is related to the idea of an average value over an interval. For a sufficiently smooth function, the value at the midpoint can be a good surrogate for the average height on the subinterval. This connection helps explain why the method performs well for functions that are not highly irregular.

4 Worked examples

Examples show how the midpoint rule is used in practice and how the choice of subintervals affects accuracy.

4.1 Single-interval approximation

To approximate \[ \int_0^2 x^2\,dx, \] the single-interval midpoint rule uses the midpoint \(x=1\): \[ (2-0)\,f(1)=2(1^2)=2. \] The exact value is \(\frac{8}{3}\), so the one-rectangle estimate is close but not exact. This illustrates both the simplicity and the limitations of the method.

4.2 Composite approximation

For \[ \int_0^2 x^2\,dx, \] using \(n=2\) subintervals gives \(\Delta x=1\). The midpoints are \(0.5\) and \(1.5\), so \[ 1\bigl(f(0.5)+f(1.5)\bigr)=0.25+2.25=2.5. \] This is closer to the exact answer than the single-interval estimate, showing how refinement improves the result.

4.3 Polynomial and trigonometric examples

The midpoint rule is often applied to polynomials, exponentials, and trigonometric functions. For smooth functions like \(\sin x\) or \(e^x\), the method usually converges rapidly as the number of subintervals increases. The quality of the estimate depends on how quickly the function changes across each subinterval.

5 Error analysis

The midpoint rule is approximate, so it introduces an error that depends on the shape of the function and the size of the subintervals. Error analysis explains why the method works and when it may fail to be accurate enough.

5.1 Sources of approximation error

Error arises because the function is not perfectly constant on each subinterval. The rectangle at the midpoint cannot fully capture curvature, especially if the graph bends strongly upward or downward. Functions with sharp variation, discontinuities, or rapid oscillation generally produce larger errors.

5.2 Error term for smooth functions

For sufficiently smooth functions, the midpoint rule has a standard error term involving the second derivative. On a single interval, the error is proportional to the cube of the interval width. For the composite rule, the total error typically depends on the square of the subinterval width, reflecting the accumulation of local approximation errors.

5.3 Dependence on interval width

Smaller subintervals usually yield better accuracy. As the width \(\Delta x\) decreases, each rectangle better matches the local behavior of the function. The convergence is especially effective when the function has bounded curvature, since the deviation from a flat rectangle becomes easier to control.

5.4 Comparison with other Riemann sum rules

Compared with left- and right-endpoint sums, the midpoint rule often reduces systematic bias. Endpoint methods may consistently overestimate or underestimate depending on whether the function is increasing or decreasing. By sampling in the center, the midpoint rule often balances these effects and gives a smaller overall error for smooth curves.

6 Accuracy and convergence

The midpoint rule is valued not only for its simplicity but also for its predictable improvement under refinement. Its accuracy can be described in terms of how quickly the error decreases as the partition becomes finer.

6.1 Refining the partition

When the interval is divided into more subintervals, each rectangle covers a shorter span. This makes the constant-height approximation more faithful to the actual graph. Repeated refinement usually produces a sequence of estimates that move closer to the true integral.

6.2 Order of accuracy

The midpoint rule is a second-order method for smooth functions. In practical terms, halving the subinterval width often reduces the error by about a factor of four, provided the function behaves regularly. This makes it more accurate than first-order endpoint sums for the same step size.

6.3 Conditions for convergence

Convergence generally requires the function to be integrable and reasonably well behaved on the interval. Continuous functions satisfy these conditions, and functions with limited discontinuities may still be handled effectively in many settings. The method is most reliable when the function does not oscillate wildly within each subinterval.

7 Applications

The midpoint rule appears in many settings where exact integration is inconvenient and a controlled approximation is sufficient. Its simplicity makes it a common introductory tool and a useful computational building block.

7.1 Numerical integration in calculus

In calculus courses, the midpoint rule is introduced as a straightforward way to approximate definite integrals. It helps students understand the meaning of integration, partitions, and Riemann sums. It also provides a practical way to estimate integrals before more advanced techniques are studied.

7.2 Physics and engineering calculations

In physics and engineering, the method can estimate quantities such as work, mass from density, charge from density functions, or accumulated force over time. It is useful whenever data or models are available only at sampled points and an exact antiderivative is unavailable.

7.3 Estimating areas and accumulated quantities

The method applies to many accumulated quantities beyond geometric area. Examples include total resource usage, average flux over a region, or integrated signal strength. Its basic structure makes it adaptable to both analytical formulas and tabulated data.

The midpoint rule belongs to a family of classical quadrature methods. Comparing it with related rules clarifies its strengths, weaknesses, and practical role.

8.1 Left and right Riemann sums

Left and right sums sample the function at the ends of each subinterval. They are easy to compute but can be biased when the function is monotone. The midpoint rule often performs better because it samples the interior rather than one side of each interval.

8.2 Trapezoidal rule

The trapezoidal rule approximates the area under a curve using trapezoids instead of rectangles. It uses endpoint values from adjacent subintervals and can be very effective for smooth functions. In many cases, the midpoint and trapezoidal rules have comparable accuracy, though they estimate the curve in different geometric ways.

8.3 Simpson’s rule

Simpson’s rule uses quadratic interpolation and is generally more accurate than the midpoint rule for smooth functions. It requires more structure in the partition and more function evaluations per segment. The midpoint rule is simpler, while Simpson’s rule trades simplicity for higher accuracy.

8.4 Higher-order quadrature methods

More advanced quadrature methods use weighted combinations of function values at carefully chosen points. These methods can achieve greater accuracy with fewer evaluations, especially when the integrand is smooth. The midpoint rule is often a conceptual starting point for understanding these more sophisticated techniques.

9 Extensions and generalizations

The midpoint rule has several extensions that broaden its use in computation and analysis. These generalizations adapt the same central idea to different settings and dimensions.

9.1 Weighted midpoint methods

In some problems, function values may need to be multiplied by additional weights before summation. Weighted midpoint methods incorporate such factors to handle nonuniform sampling, transformed variables, or specialized integral forms. They preserve the central-sampling idea while adjusting for the structure of the problem.

9.2 Multidimensional midpoint rules

The midpoint idea extends naturally to double and triple integrals. In multiple dimensions, a region is divided into small cells, and the function is evaluated at each cell’s center. The resulting approximation is useful in higher-dimensional numerical integration and in computational physics.

9.3 Adaptive numerical integration

Adaptive methods refine the partition where the function changes rapidly and use larger subintervals where it is smoother. The midpoint rule can serve as a component in such schemes, providing local estimates that guide refinement. This approach improves efficiency by concentrating work where it is most needed.