Back to Numerical Methods repository
Numerical Methods2D

Numerical Integration - Theory & Concepts - Trapezoidal Rule

Numerical methods for evaluating definite integrals.

Open the complete lesson

Composite Trapezoidal Rule

Approximating the integral of f(x)f(x) from a=0a=0 to b=0.8b=0.8 using multiple segments.

00.8xf(x)
1 Segment20 Segments

Integration Results

Step Size (h)
0.4000
Exact Value
1.640533
Approximate Integral (Area)
1.068800
Formula
Ih2[f(x0)+2i=1n1f(xi)+f(xn)]I \approx \frac{h}{2} \left[ f(x_0) + 2 \sum_{i=1}^{n-1} f(x_i) + f(x_n) \right]
True Percent Relative Error:
34.8504%
As n increases, the error approaches zero.