Liking cljdoc? Tell your friends :D
All platforms.

sicmutils.numerical.quadrature.infinite


improperclj/s

(improper integrator)

Accepts:

  • An integrator (function of f, a, b and opts)
  • a and b, the endpoints of an integration interval, and
  • (optionally) opts, a dict of integrator-configuring options

And returns a new integrator that's able to handle infinite endpoints. (If you don't specify ##-Inf or ##Inf, the returned integrator will fall through to the original integrator implementation.)

All opts will be passed through to the supplied integrator.

Optional arguments relevant to improper:

:infinite-breakpoint: If either a or b is equal to ##Inf or ##-Inf, this function will internally perform a change of variables on the regions from:

(:infinite-breakpoint opts) => ##Inf

or

##-Inf => (- (:infinite-breakpoint opts))

using $u(t) = {1 \over t}$, as described in the infinitize method of substitute.cljc. This has the effect of mapping the infinite endpoint to an open interval endpoint of 0.

Where should you choose the breakpoint? According to Press in Numerical Recipes, section 4.4: "At a sufficiently large positive value so that the function funk is at least beginning to approach its asymptotic decrease to zero value at infinity."

References:

Accepts:

- An `integrator` (function of `f`, `a`, `b` and `opts`)
- `a` and `b`, the endpoints of an integration interval, and
- (optionally) `opts`, a dict of integrator-configuring options

And returns a new integrator that's able to handle infinite endpoints. (If you
don't specify `##-Inf` or `##Inf`, the returned integrator will fall through
to the original `integrator` implementation.)

All `opts` will be passed through to the supplied `integrator`.

## Optional arguments relevant to `improper`:

`:infinite-breakpoint`: If either `a` or `b` is equal to `##Inf` or `##-Inf`,
this function will internally perform a change of variables on the regions
from:

`(:infinite-breakpoint opts) => ##Inf`

or

`##-Inf => (- (:infinite-breakpoint opts))`

using $u(t) = {1 \over t}$, as described in the `infinitize` method of
`substitute.cljc`. This has the effect of mapping the infinite endpoint to an
open interval endpoint of 0.

Where should you choose the breakpoint? According to Press in Numerical
Recipes, section 4.4: "At a sufficiently large positive value so that the
function funk is at least beginning to approach its asymptotic decrease to
zero value at infinity."

References:

- Press, Numerical Recipes (p138), Section 4.4: http://phys.uri.edu/nigh/NumRec/bookfpdf/f4-4.pdf
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close