MathAction NumericalIntegration



NumericalIntegration
last edited 12 years ago by test1

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.

fricas
(1) -> romberg(x+->exp(x),0.0,1.0,0.1,0.1,6,10)
Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)

fricas
simpson(x+->exp(x),0.0,1.0,0.1,0.1,6,10)
Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)

fricas
trapezoidal(x+->exp(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

fricas
%pi::Float
Type: Float

works, while

fricas
%e::Float
Cannot convert the value from type Expression(Integer) to Float .

fails. You have to use

fricas
exp(1)$Float
Type: Float

instead.




Subject: Be Bold !!
( 15 subscribers )
Please rate this page:

AltStyle によって変換されたページ (->オリジナル) /