Trapezoidal Rule Calculator

Compute numerical integrations with detailed step-by-step arithmetic and graphs.

Parameter Setup
Use standard operators (*, /, +, -, ^). Independent variable is $x$.
Number of subintervals (divisions). $n \ge 1$ for Trapezoidal Rule.
$i$ $x_i$ $y_i$
Ensure $x$ coordinates are equally spaced and sorted.

Calculate Step-by-Step

Enter a mathematical function or coordinate table on the left, then click Calculate to view coordinates, graphs, derivations, and errors.

0.000000
Approximate Value
0.000000
True / Reference Value
0.000000
Absolute Error

Problem Statement

0.0 ms
Trapezoidal Rule Formula

The definite integral is approximated by modeling the interval as a series of trapezoids:

$$I = \frac{h}{2} \left[ y_0 + y_n + 2\sum_{i=1}^{n-1} y_i \right]$$
Step-by-Step Derivation
1
Calculate Interval Step Size ($h$)

The width of each subinterval is determined by splitting the range $[a, b]$ into $n$ equal portions:

2
Partition Coordinates Table

Divide $[a, b]$ using step size $h$ and evaluate the function $y = f(x)$ at each boundary point:

$i$ $x_i = a + ih$ $y_i = f(x_i)$ Type
3
Substitute Into Formula

Add together the weighted boundary and interior coordinates:

4
Final Approximation

Evaluate the expression to find the final integral value:

Geometric Visualization

The shaded area represents the trapezoidal polygons integrated under the curve. Move the cursor over points to check numerical coordinates, or zoom/pan using the toolbar.

Recent Calculations
Click any item to load parameters