Trapezoid Integral
Approximate ∫ₐᵇ f(x)dx by composite trapezoid rule.
∫ ≈ —
Numerical integration by the trapezoidal rule
The trapezoidal rule approximates ∫f(x)dx by replacing the area under f with a chain of trapezoids. Dividing [a,b] into n subintervals of width h = (b−a)/n gives ∫ ≈ h/2 · (f(x₀) + 2·Σf(xᵢ) + f(xₙ)). The error is O(h²) — halving when you double n. Simpson's 1/3 rule fits parabolas instead and reaches O(h⁴) for the same cost per point; Romberg integration applies Richardson extrapolation on top of trapezoidal results and accelerates convergence further. Example: ∫₀¹ x² dx = 1/3. With n=4 trapezoids you get ≈ 0.3438; with n=100, 0.33335; with n=10000, essentially the exact value.
Applications and context
Trapezoidal integration is everywhere: volume and area under curves in CAD, energy consumed (integral of power over time), rainfall analysis from hydrograph curves, consumer/producer surplus in economics, signal-processing RMS and regression diagnostics. Whenever you have tabulated data without an analytic formula — sensor logs, financial flows — it's usually the first integrator you reach for.
FAQ
How do I choose n? Start small, double n, compare results: if they agree to your tolerance, stop. This adaptive refinement is the basis of Romberg.
Trapezoidal vs Simpson — when is Simpson worth it? Whenever f is smooth, Simpson gives orders of magnitude more accuracy for the same number of evaluations. For noisy or piecewise data, trapezoidal is more robust.
What about non-uniform spacing? The trapezoidal rule generalizes: each trapezoid uses its own width (xᵢ₊₁−xᵢ)·(f(xᵢ)+f(xᵢ₊₁))/2. Perfect for irregular sensor samples.
Related Tools
Newton-Raphson Method
Find roots of f(x)=0 by Newton-Raphson with numerical derivative.
Numeric Function Integral
Computes a definite integral over an interval using composite Simpson 1 3 rule.
Bisection Method
Find a root of f(x)=0 in [a,b] by bisection (requires sign change).
Wind Chill Temperature Calculator
Computes wind chill temperature in Celsius using the North American formula from air temperature and wind speed in km/h.
Power by Admiralty Coefficient
Estimate a ship's propulsive power by the Admiralty formula, P = (∆^(2/3)·V³)/C, from the displacement (∆, t), the speed (V, knots) and the Admiralty coefficient (C), characteristic of similar hulls. It is a classic, fast method to predict the required power in the preliminary design stage, based on similarity with existing ships. The V³ dependence shows the high cost of speed. Enter the displacement, the speed and the coefficient C.
CIR Bond Price (Cox-Ingersoll-Ross)
Computes the price of a zero-coupon bond with the Cox-Ingersoll-Ross model, the successor to Vasicek that fixes its biggest flaw: CIR prevents negative interest rates, because the volatility shrinks as the rate approaches zero. It also has mean reversion and yields an affine closed form for the bond price. It's one of the most used short-rate models in practice. Enter the reversion speed, the long-run mean, the volatility, the current rate and the maturity.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.