generative-art-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numerics.Integrate

Description

Compute definite integrals.

Synopsis

Documentation

integrateMidpoint Source #

Arguments

:: Fractional a 
=> (a -> a)

\(f\)

-> a

\(a\)

-> a

\(b\)

-> Int

Number of interval subdivisions

-> a

\(\int_a^b\mathrm dt\, f(t)\)

Numerical integration with the midpoint method. This is one of the simplest integration algorithms.

https://en.wikipedia.org/wiki/Midpoint_method

integrateSimpson13 Source #

Arguments

:: Fractional a 
=> (a -> a)

\(f\)

-> a

\(a\)

-> a

\(b\)

-> Int

Number of interval subdivisions

-> a

\(\int_a^b\mathrm dt\, f(t)\)

Numerical integration with Simpson’s ⅓ rule, which approximates curves with quadratic polynomials. It’s not that complicated but still does very well on not-so-crazy functions.

https://en.wikipedia.org/wiki/Simpson%27s_rule

Useful as a parameter to recurseUntilPrecision.