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

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)
LatexWiki Image(1)
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)
LatexWiki Image(2)
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)
LatexWiki Image(3)
Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)

Note that for some reason

axiom
%pi::Float
LatexWiki Image(4)
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
LatexWiki Image(5)
Type: Float

instead.




subject:
  ( 7 subscribers )  
Please rate this page: