NumericalIntegration
last edited 12 years ago by test1

Edit detail for NumericalIntegration revision 2 of 2

1 2
Editor: test1
Time: 2013年05月23日 17:43:46 GMT+0
Note:

changed:
- romberg(x+->exp1()^x,0.0,1.0,0.1,0.1,6,10)
 romberg(x+->exp(x),0.0,1.0,0.1,0.1,6,10)
changed:
- simpson(x+->exp1()^x,0.0,1.0,0.1,0.1,6,10)
 simpson(x+->exp(x),0.0,1.0,0.1,0.1,6,10)
changed:
- trapezoidal(x+->exp1()^x,0.0,1.0,0.1,0.1,6,10)
 trapezoidal(x+->exp(x),0.0,1.0,0.1,0.1,6,10)
changed:
- exp1()$Float
 exp(1)$Float

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.

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