The trapezoidal rule approximates an integral by replacing the curve over an interval with a straight line between two sampled points and computing the area of the resulting trapezoid. In composite form, the endpoint values are each weighted by one half because interior points belong to two neighboring trapezoids, while endpoints belong to only one.
Conditions: Applied to numerical integration over an interval [a,b].; Uses function values at the interval endpoints.; For composite use, adjacent subinterval endpoints are shared, producing half weights at the outer endpoints.
The trapezoidal rule approximates an integral by replacing the curve over an interval with a straight line between two sampled points and computing the area of the resulting trapezoid. In composite form, the endpoint values are each weighted by one half because interior points belong to two neighboring trapezoids, while endpoints belong to only one.
Conditions: Applied to numerical integration over an interval [a,b].; Uses function values at the interval endpoints.; For composite use, adjacent subinterval endpoints are shared, producing half weights at the outer endpoints.
The three rectangle rules differ only in the choice of sample point used to determine the rectangle height on equal-width subintervals. The left rule uses the left endpoint, the right rule uses the right endpoint, and the midpoint rule uses the center of each subinterval.
Conditions: The subintervals have the same width.; The method approximates area under a curve by sums of rectangles.
The three rectangle rules differ only in the choice of sample point used to determine the rectangle height on equal-width subintervals. The left rule uses the left endpoint, the right rule uses the right endpoint, and the midpoint rule uses the center of each subinterval.
Conditions: The subintervals have the same width.; The method approximates area under a curve by sums of rectangles.
Halving each interval is recommended because it allows previous function values to be reused in the next computation, reducing redundant evaluations of the function, which often dominate the runtime.
Conditions: Refinement is by successive bisection of existing subintervals.; Benefit comes from reusing previously computed function values.
Halving each interval is recommended because it allows previous function values to be reused in the next computation, reducing redundant evaluations of the function, which often dominate the runtime.
Conditions: Refinement is by successive bisection of existing subintervals.; Benefit comes from reusing previously computed function values.