The Trapezoidal Rule Calculator estimates a definite integral by replacing a curved region with a collection of trapezoids. It is a numerical integration method, so the result is an approximation unless the function happens to make the approximation exact for the chosen setup.
Trapezoidal Rule Formula
For n equal subintervals on [a,b], the width is h=(bβa)/n. The estimate is Tβ = h[Β½f(a) + f(xβ) + β¦ + f(xβββ) + Β½f(b)]. The endpoints receive half weight because each belongs to only one trapezoid.
Using the Calculator
Enter the function, interval, and number of subintervals requested by the tool. Increasing n makes the trapezoids narrower and often improves the approximation for a smooth function, although the exact error depends on the function's curvature.
Example
For f(x)=xΒ² on [0,2] with n=2, h=1. The sampled values are 0, 1, and 4. The estimate is 1[0/2 + 1 + 4/2] = 3. The exact integral is 8/3, so the rule gives a close approximation.
Understanding Accuracy
The trapezoidal rule can overestimate or underestimate depending on the shape of the function. It should not be presented as an exact integral unless there is a reason that the approximation coincides with the exact value.
Practical Tip
Compare results with a larger n when accuracy matters. If the estimate changes substantially, the interval may need finer subdivision or a more suitable numerical integration method.