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

Edit detail for NumericalIntegration revision 1 of 2

1 2
Editor: 127.0.0.1
Time: 2007/11/08 06:22:01 GMT-8
Note:

changed:
-
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.

\begin{axiom}
   romberg(x+->exp1()^x,0.0,1.0,0.1,0.1,6,10)
\end{axiom}

\begin{axiom}
   simpson(x+->exp1()^x,0.0,1.0,0.1,0.1,6,10)
\end{axiom}

\begin{axiom}
   trapezoidal(x+->exp1()^x,0.0,1.0,0.1,0.1,6,10)
\end{axiom}

  Note that for some reason
\begin{axiom}
   %pi::Float
\end{axiom}
  works, while 
\begin{axiom}
   %e::Float
\end{axiom}
  fails. You have to use
\begin{axiom}
   exp1()$Float
\end{axiom}
  instead.

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)

\label{eq1}\begin{array}{@{}l}
\displaystyle
\left[{value ={1.7182818284590452354}}, \:{error ={0.1 E - 19}}, \: \right.
\
\
\displaystyle
\left.{totalpts ={129}}, \:{success =  \mbox{\rm true} }\right] (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)

\label{eq2}\begin{array}{@{}l}
\displaystyle
\left[{value ={1.718281828494606636}}, \: \right.
\
\
\displaystyle
\left.{error ={0.66676075883179510874 E - 9}}, \:{totalpts ={1
29}}, \: \right.
\
\
\displaystyle
\left.{success =  \mbox{\rm true} }\right] 
(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)

\label{eq3}\begin{array}{@{}l}
\displaystyle
\left[{value ={1.7182905680834782946}}, \: \right.
\
\
\displaystyle
\left.{error ={0.000032773458268719941097}}, \:{totalpts ={12
9}}, \: \right.
\
\
\displaystyle
\left.{success =  \mbox{\rm true} }\right] 
(3)
Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)

Note that for some reason

axiom
%pi::Float

\label{eq4}3.1415926535897932385(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

\label{eq5}2.7182818284590452354(5)
Type: Float

instead.