Calculus & Numerical Methods

Midpoint Rule Integration

Definite integral via the midpoint rule.

Formula

Formula
ab f dx ≈ h Σ f(midpoints)

Variables

SymbolDefinitionType & rangeUnitsRole
f integrand expression / text x input
a, b limits real number (ℝ) input
n intervals integer (ℤ) input

Try it yourself

Interactive calculator
math expression (e.g. x*x, sin(x))
Result

Worked examples

Example 1
Givenf(x) = x*x, a = 0, b = 1, intervals n = 1000
Result0.33333325
Example 2
Givenf(x) = cos(x), a = 0, b = 1, intervals n = 1000
Result0.8414710199