What Is the Midpoint Method in Math and Economics?

The midpoint method is a calculation technique that uses the average of two values as its reference point instead of either endpoint alone. It shows up in several fields, most commonly in economics (for measuring price elasticity of demand) and in calculus (for approximating the area under a curve). The core idea is the same across all uses: working from the middle of an interval produces more accurate or more consistent results than working from either end.

The Midpoint Method in Economics

In economics, the midpoint method solves a specific and frustrating problem with calculating price elasticity of demand. Price elasticity measures how sensitive buyers are to a price change. The basic formula divides the percentage change in quantity demanded by the percentage change in price. But here’s the catch: if you calculate that percentage using the starting price as your base, you get a different answer depending on which direction the price moved. A price going from $5 to $6 gives a different elasticity than a price going from $6 to $5, even though the two points are identical. This inconsistency makes the basic formula unreliable for comparisons.

The midpoint method fixes this by using the average of the two prices (and the average of the two quantities) as the base for each percentage calculation. The formulas look like this:

  • Percent change in quantity = (Q2 – Q1) / ((Q2 + Q1) / 2) × 100
  • Percent change in price = (P2 – P1) / ((P2 + P1) / 2) × 100
  • Price elasticity of demand = percent change in quantity / percent change in price

Because the denominator is always the average of both points, you get the same elasticity value regardless of whether you frame the change as an increase or a decrease.

A Quick Example

Say a pizza shop raises the price of its lunch special from $5 to $6, and weekly sales drop from 2,000 to 1,400. First, find the changes: quantity fell by 600, and price rose by $1. Next, find the averages: the average quantity is (2,000 + 1,400) / 2 = 1,700, and the average price is ($5 + $6) / 2 = $5.50. The percent change in quantity is 600 / 1,700 × 100 = 35.3%. The percent change in price is 1 / 5.50 × 100 = 18.2%. Dividing gives an elasticity of about 1.94, meaning demand is fairly elastic: buyers are quite sensitive to the price change. You’d get the same 1.94 if you reversed the direction and calculated the change from $6 down to $5.

The Midpoint Rule in Calculus

In calculus, the midpoint method (usually called the midpoint rule) is a way to approximate the area under a curve when you can’t solve the integral exactly. The idea is to divide the area into a series of rectangles, but instead of setting each rectangle’s height at the left or right edge of its slice, you set the height at the midpoint of each slice. This tends to split the overestimate on one side with the underestimate on the other, producing a better approximation.

The formula for n equally spaced rectangles across an interval from a to b is:

Area ≈ h × [f(x₀) + f(x₁) + … + f(xₙ₋₁)]

where h = (b – a) / n is the width of each rectangle, and each xᵢ is the midpoint of its subinterval: xᵢ = (a + h/2) + i × h.

If you’re comparing accuracy, the midpoint rule is roughly twice as accurate as the trapezoidal rule for the same number of subdivisions. Both methods have errors that shrink proportionally to h², but the midpoint rule’s error constant is half as large. For a single interval, the trapezoidal rule’s error involves a factor of 1/12, while the midpoint rule’s error involves 1/24. So despite its simplicity, the midpoint rule punches above its weight.

Coding It Up

The midpoint rule translates cleanly into code. In Python, the entire function fits in a few lines:

def midpoint(f, a, b, n):
    h = float(b – a) / n
    result = 0
    for i in range(n):
        result += f((a + h/2.0) + i * h)
    result *= h
    return result

You pass in the function, the interval boundaries, and the number of rectangles. The loop evaluates the function at each subinterval’s midpoint, sums the heights, and multiplies by the rectangle width. Increasing n narrows the rectangles and improves the approximation.

The Midpoint Method for Differential Equations

In computational math, the midpoint method is a technique for numerically solving ordinary differential equations. It improves on Euler’s method, which estimates the next value of a function by following the slope at the current point. The problem with Euler’s method is that the slope at the start of a step may not represent the slope across the whole step, so errors accumulate quickly.

The midpoint method addresses this in three stages. First, it calculates the slope at the current point. Second, it uses that slope to take a half-step forward, reaching the middle of the interval, and calculates a new slope there. Third, it goes back to the starting point and takes the full step using the slope from the midpoint. The slope in the middle of the interval is generally a better representative of the average slope across the whole step.

This approach is a specific form of a second-order Runge-Kutta method. “Second order” means its local error shrinks with the cube of the step size, making it significantly more accurate than Euler’s method (which is first order) without adding much computational cost. Each step requires two function evaluations instead of one, but the payoff in accuracy is substantial.

The Midpoint Formula in Geometry

The simplest version of “midpoint” is the one from coordinate geometry. To find the exact center of a line segment between two points, you average their coordinates:

Midpoint = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)

For a segment from (2, 4) to (8, 10), the midpoint is (5, 7). In three dimensions, the same logic applies, just with a z-coordinate averaged the same way. This formula is the foundation underlying all the other midpoint methods. Whether you’re averaging two prices in economics or finding the center of a subinterval in calculus, you’re applying this same principle: the middle of two values is their average.