login  home  contents  what's new  discussion  bug reports help  links  subscribe  changes  refresh  edit

# Edit detail for NumericalQuadrature revision 2 of 3

 1 2 3 Editor: Bill Page Time: 2015/06/02 20:56:34 GMT+0 Note:

added:
Example

-- aromberg(fn, a, b, epsrel, epsabs, nmin, nmax, nint)
-- uses the adaptive romberg method to numerically integrate function
-- with relative accuracy \spad{epsrel} and absolute accuracy
-- \spad{epsabs}, with the refinement levels for convergence checking
-- 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.



fricas
)sh NumericalQuadrature
This constructor is exposed in this frame.
------------------------------- Operations --------------------------------
aromberg : ((Float -> Float),Float,Float,Float,Float,Integer,Integer,Integer) -> Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
asimpson : ((Float -> Float),Float,Float,Float,Float,Integer,Integer,Integer) -> Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
atrapezoidal : ((Float -> Float),Float,Float,Float,Float,Integer,Integer,Integer) -> Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
romberg : ((Float -> Float),Float,Float,Float,Float,Integer,Integer) -> Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
rombergo : ((Float -> Float),Float,Float,Float,Float,Integer,Integer) -> Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
simpson : ((Float -> Float),Float,Float,Float,Float,Integer,Integer) -> Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
simpsono : ((Float -> Float),Float,Float,Float,Float,Integer,Integer) -> Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
trapezoidal : ((Float -> Float),Float,Float,Float,Float,Integer,Integer) -> Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
trapezoidalo : ((Float -> Float),Float,Float,Float,Float,Integer,Integer) -> Record(value: Float,error: Float,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
aromberg(f, -%pi, %pi, 0.0001, 0.001, 2, 5, 20)
Compiling function f with type Float -> Float