Numeric integration routines
fricas
)sh NumericalQuadrature
NumericalQuadrature(F: FloatingPointSystem) is a package constructor
Abbreviation for NumericalQuadrature is NUMQUAD
This constructor is exposed in this frame.
------------------------------- Operations --------------------------------
aromberg : ((F -> F), F, F, F, F, Integer, Integer, Integer) -> Record(value: F,error: F,totalpts: Integer,success: Boolean)
asimpson : ((F -> F), F, F, F, F, Integer, Integer, Integer) -> Record(value: F,error: F,totalpts: Integer,success: Boolean)
atrapezoidal : ((F -> F), F, F, F, F, Integer, Integer, Integer) -> Record(value: F,error: F,totalpts: Integer,success: Boolean)
romberg : ((F -> F), F, F, F, F, Integer, Integer) -> Record(value: F,error: F,totalpts: Integer,success: Boolean)
rombergo : ((F -> F), F, F, F, F, Integer, Integer) -> Record(value: F,error: F,totalpts: Integer,success: Boolean)
simpson : ((F -> F), F, F, F, F, Integer, Integer) -> Record(value: F,error: F,totalpts: Integer,success: Boolean)
simpsono : ((F -> F), F, F, F, F, Integer, Integer) -> Record(value: F,error: F,totalpts: Integer,success: Boolean)
trapezoidal : ((F -> F), F, F, F, F, Integer, Integer) -> Record(value: F,error: F,totalpts: Integer,success: Boolean)
trapezoidalo : ((F -> F), F, F, F, F, Integer, Integer) -> Record(value: F,error: F,totalpts: Integer,success: Boolean)
Example
fricas
f(x) == sin(x)
Type: Void
fricas
-- aromberg(fn, a, b, epsrel, epsabs, nmin, nmax, nint)
-- uses the adaptive romberg method to numerically integrate function
-- \spad{fn} over the closed interval from \spad{a} to \spad{b},
-- with relative accuracy \spad{epsrel} and absolute accuracy
-- \spad{epsabs}, with the refinement levels for convergence checking
-- vary from \spad{nmin} to \spad{nmax}, and where \spad{nint}
-- is the number of independent intervals to apply the integrator.
-- The value returned is a record containing the value of the integral,
-- the estimate of the error in the computation, the total number of
-- function evaluations, and either a boolean value which is true if
-- the integral was computed within the user specified error criterion.
aromberg(f, -%pi, %pi, 0.0001, 0.001, 2, 5, 20)
fricas
Compiling function f with type Float -> Float
Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)