Home

Trapezoidal Rule Online Calculator

Trapezoidal rule calculator. Enter f(x), interval and n to compute Tₙ and compare with the exact value—for numerical integration.

Show more ▾
Tₙ = (h/2)[f₀ + 2Σfᵢ + fₙ]
Supports + - * / ^ ( ) and sin cos tan sec cot sqrt exp log abs asin atan pi e; write 2*x, not 2x
Lower limit of integration
Upper limit of integration
Number of equal subintervals, integer

📖 Tutorial | Trapezoidal Rule

1. Definition
Split [a,b] into n equal parts; each trapezoid approximates the area: Tₙ=(h/2)[f₀+2f₁+…+2f_{n−1}+fₙ], h=(b−a)/n.
2. Symbols
SymbolsMeaning
nNumber of subintervals
hWidth of each part
fᵢFunction at nodes
TₙTrapezoidal approximation
3. How it works
  • Nodes are equally spaced by h=(b−a)/n;
  • Sums via the trapezoid formula;
  • Adaptive integration gives the exact value for comparison.
4. Steps
  1. Enter f(x) and limits;
  2. Enter n (integer);
  3. Click Calculate for Tₙ and the exact value.
5. Example
Example: ∫₀¹ x² dx, n=4, h=0.25. T₄=0.34375. Exact: 0.333333.
6. Pitfalls
n is the number of subintervals, not nodes;
The rule is exact for lines; curves add error;
Larger n approaches the exact value.

❓ FAQ | Trapezoidal Rule

Why is it exact for lines?
Under a straight segment the region is a true trapezoid, so Tₙ matches.
Does larger n help?
Yes, up to floating-point limits.
Trapezoid vs. rectangle?
The trapezoidal rule is usually better than left/right rectangles.
Can it give the exact analytic integral?
It also shows the adaptive exact value for comparison.
Which functions?
+−*/^ and common elementary functions.