Skip to content

Add specialty integration methods (Phase 4)#6

Merged
gvonness-apolitical merged 1 commit intomainfrom
phase-4-specialty-methods
Feb 26, 2026
Merged

Add specialty integration methods (Phase 4)#6
gvonness-apolitical merged 1 commit intomainfrom
phase-4-specialty-methods

Conversation

@gvonness-apolitical
Copy link
Contributor

Summary

  • tanh-sinh: Double-exponential quadrature for endpoint singularities (algebraic, logarithmic). Self-adaptive via level doubling with configurable tolerances.
  • Cauchy principal value: Subtraction technique PV ∫f(x)/(x-c)dx = ∫[f(x)-f(c)]/(x-c)dx + f(c)·ln(...), using adaptive integration with automatic breakpoints at the pole.
  • Oscillatory: Filon-Clenshaw-Curtis method for ∫f(x)sin(ωx)dx and ∫f(x)cos(ωx)dx. Chebyshev expansion of f at Clenshaw-Curtis nodes, modified Chebyshev moments computed via Gauss-Legendre quadrature. Falls back to adaptive integration for small ω.
  • Weighted: Unified API for product integration ∫f(x)·w(x)dx dispatching to appropriate Gaussian rules (Jacobi, Laguerre, Hermite, Chebyshev). LogWeight w(x)=-ln(x) handled via Laguerre α=1 substitution.

All modules follow the established builder pattern with convenience free functions.

Test plan

  • 172 unit tests pass (includes 37 new tests across all 4 modules)
  • 35 doc-tests pass
  • cargo clippy clean (no new warnings)
  • cargo fmt applied

…hase 4)

Four new integration modules for handling difficult integrands:

- tanh_sinh: Double-exponential quadrature for endpoint singularities
  (algebraic, logarithmic). Self-adaptive via level doubling.
- cauchy_pv: Cauchy principal value integration via subtraction technique,
  using adaptive integration with automatic breakpoints.
- oscillatory: Filon-Clenshaw-Curtis method for highly oscillatory
  integrands with sin/cos kernels. Chebyshev expansion with GL-computed
  modified moments.
- weighted: Unified API for product integration dispatching to the
  appropriate Gaussian rule (Jacobi, Laguerre, Hermite, Chebyshev,
  LogWeight via Laguerre substitution).
@gvonness-apolitical gvonness-apolitical merged commit 07f0d6e into main Feb 26, 2026
0 of 6 checks passed
@gvonness-apolitical gvonness-apolitical deleted the phase-4-specialty-methods branch February 26, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant