Calculus & Numerical Methods
Midpoint Rule Integration
Definite integral via the midpoint rule.
Formula
Formula
∫ab f dx ≈ h Σ f(midpoints)
Variables
| Symbol | Definition | Type & range | Units | Role |
|---|---|---|---|---|
| f | integrand | expression / text | x | input |
| a, b | limits | real number (ℝ) | — | input |
| n | intervals | integer (ℤ) | — | input |
Try it yourself
Interactive calculator
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