quad.integrateFns.integrate
Compute the definite integral of f(x).
Syntax
quad.integrateFns.integrate(f, a, b, options?)
Description
Compute the definite integral of f(x). This is the unified integration API that automatically selects the most appropriate QUADPACK routine based on the integration bounds and options provided. **Auto-detection logic:** 1. If bounds include ±Infinity: - If omega specified: quad_fourier (Fourier transform) - Otherwise: quad_inf (infinite interval) 2. If omega specified: quad_osc (oscillatory) 3. If c specified: quad_cauchy (Cauchy principal value) 4. If alfa or beta specified: quad_singular (algebraic singularities) 5. If points specified: quad_break (user break points) 6. If rule specified: quad_rule (explicit GK rule) 7. Otherwise: quad (general adaptive)
Parameters
| Name | Description |
|---|---|
| f | - The integrand function f(x) |
| a | - Lower limit of integration (use -Infinity for lower infinite) |
| b | - Upper limit of integration (use Infinity for upper infinite) |
| options(optional) | - Integration options |
Returns
Promise<QuadResult>