This namespace holds an implementation of an "improper" integral combinator (for infinite endpoints) usable with any quadrature method in the library.
The implementation was inspired by evaluate-improper-integral
in numerics/quadrature/quadrature.scm
file in the scmutils package.
To evaluate an improper integral with an infinite endpoint, the improper
combinator applies an internal change of variables.
This has the effect of mapping the endpoints from Loading... to ${1 \over b}, {1 \over a}$. Here's the identity we implement:
Loading...This is implemented by substitute/infinitize
.
The variable change only works as written when both endpoints are of the same sign; so, internally, improper
only applies the variable change to the segment of Loading... from ##-Inf => (- :infinite-breakpoint)
and :infinite-breakpoint -> ##Inf
, where :infinite-breakpoint
is an argument the user can specify in the returned integrator's options map.
Any segment of Loading... not in those regions is evaluated normally.
NOTE: The ideas in this namespace could be implemented for other variable substitutions (see
substitute.cljc
) that only need to apply to certain integration intervals. The code below automatically cuts the range Loading... to accomodate this for the particular variable change we've baked in, but there is a more general abstraction lurking.If you find it, please submit an issue!
The current implementation does not pass convergence information back up the line! Ideally we would merge results by:
:converged?
entries with and