The package NumericalQuadrature
implements several operations for numerical integration. Here I provide just some examples. Documentation is to be found in the corresponding .spad
or .pamphlet
file.
axiom
romberg(x+->exp1()^x,0.0,1.0,0.1,0.1,6,10)
Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
axiom
simpson(x+->exp1()^x,0.0,1.0,0.1,0.1,6,10)
Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
axiom
trapezoidal(x+->exp1()^x,0.0,1.0,0.1,0.1,6,10)
Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)
Note that for some reason
axiom
%pi::Float
Type: Float
works, while
axiom
%e::Float
Cannot convert from type Expression(Integer) to Float for value
%e
fails. You have to use
axiom
exp1()$Float
Type: Float
instead.