Liking cljdoc? Tell your friends :D

sicmutils.numerical.quadrature.simpson


integralclj/s

(integral f a b)
(integral f a b opts)

Returns an estimate of the integral of f over the closed interval $[a, b]$ using Simpson's rule with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts opts, a dict of optional arguments. All of these get passed on to us/seq-limit to configure convergence checking.

See simpson-sequence for more information about Simpson's rule, caveats that might apply when using this integration method and information on the optional args in opts that customize this function's behavior.

Returns an estimate of the integral of `f` over the closed interval $[a, b]$
using Simpson's rule with $1, 2, 4 ... 2^n$ windows for each estimate.

Optionally accepts `opts`, a dict of optional arguments. All of these get
passed on to `us/seq-limit` to configure convergence checking.

See `simpson-sequence` for more information about Simpson's rule, caveats that
might apply when using this integration method and information on the optional
args in `opts` that customize this function's behavior.
sourceraw docstring

simpson-sequenceclj/s

(simpson-sequence f a b)
(simpson-sequence f a b {:keys [n] :or {n 1}})

Returns a (lazy) sequence of successively refined estimates of the integral of f over the closed interval $[a, b]$ using Simpson's rule.

Simpson's rule is equivalent to the trapezoid method subject to one refinement of Richardson extrapolation. The trapezoid method fits a line to each integration slice. Simpson's rule fits a quadratic to each slice.

Returns estimates with $n, 2n, 4n, ...$ slices, geometrically increasing by a factor of 2 with each estimate.

Optional arguments:

If supplied, :n (default 1) specifies the initial number of slices to use.

Returns a (lazy) sequence of successively refined estimates of the integral of
`f` over the closed interval $[a, b]$ using Simpson's rule.

Simpson's rule is equivalent to the trapezoid method subject to one refinement
of Richardson extrapolation. The trapezoid method fits a line to each
integration slice. Simpson's rule fits a quadratic to each slice.

Returns estimates with $n, 2n, 4n, ...$ slices, geometrically increasing by a
factor of 2 with each estimate.

## Optional arguments:

If supplied, `:n` (default 1) specifies the initial number of slices to use.
sourceraw docstring

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

× close