Trapezoidal Rule Calculator – Numeric Integrals
Trapezoid rule (h/2)[f₀+2f₁+…+fₙ]: ∫₀¹x²dx with n=2 gives 0.375 vs exact 1/3 — error 12.5%, cut to 3% at n=4.
- Table of ordinates.
Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.
How the Trapezoidal Rule Calculator Works
The trapezoidal rule joins sample points with straight lines and sums the resulting trapezoids. For ∫₀¹ x² dx with n = 2 (h = 0.5, nodes 0, 0.5, 1): (0.5/2)[0 + 2(0.25) + 1] = 0.25 × 1.5 = 0.375, versus the exact 1/3 ≈ 0.33333 — a 12.5% overestimate because chords arch above a convex curve. Refining to n = 4 gives (0.25/2)[0 + 2(0.0625) + 2(0.25) + 2(0.5625) + 1] = 0.34375, error 3.1%: error scales as h², so doubling n quarters it. The calculator prints the node table (x, f(x), weight), the weighted sum, and the estimate, alongside the midpoint/Simpson values for comparison — Simpson takes the same nodes and fixes most of the curvature error. Concave functions flip the bias and underestimate instead.
- 1
Enter f(x) and bounds
Any integrand over [a, b]
- 2
Choose n
More intervals mean smaller h and less error
- 3
Build the node table
Each xₖ, f(xₖ) and weight 2 (interior) or 1 (ends)
- 4
Sum and scale
Multiply by h/2 for the estimate
Use Cases
Tabulated Data
Integrate sensor logs known only at sampled times
Quick Estimates
Sanity-check definite integrals before exact work
Calculus Teaching
Show convex functions overestimate: 0.375 vs 1/3
Tips
- 1
Error scales with h² — double the nodes, quarter the error
- 2
Convex curves overestimate; concave curves underestimate
- 3
Interior nodes weight 2; endpoints weight 1
Common Mistakes
Weighting endpoints by 2 instead of 1
Multiplying by h instead of h/2
Expecting exactness on curves — only linear functions integrate exactly
Comparing against Simpson without noting n must differ (Simpson needs even n)
FAQs
What is ∫₀¹ x² dx by trapezoids with n=2?
What happens at n=4?
When does the rule overestimate?
Why weight interior nodes by 2?
Should I just use Simpson instead?
Related tools
Pick another tool to continue your calculation.
Advanced Log Calculator – Antilog & Change of Base
Calculate logarithm with any base with advanced options.
Log Calculator – ln, log₁₀ & Any Base with Steps
Calculate natural log, log10, and log with any base.
Logarithm Calculator - Calculate Logarithms of Any Base
Calculate logarithms with any base online using our free logarithm calculator. Compute natural logarithms, base-10 logarithms, and custom base logarithms easily. Perfect for algebra and calculus students.
Binary Calculator – Add, Subtract, Multiply Base 2
Calculate in binary, decimal, and hexadecimal.
Slope Calculator – Gradient from Two Points
m = (y₂ − y₁) ÷ (x₂ − x₁): the line through (2, 3) and (6, 11) has slope 2 and angle ≈ 63.4°. Parallel and perpendicular checks included.
Sum Calculator – Add Numbers & Arithmetic Series
Calculate the sum of a number series or arithmetic sequence.