integrate

integrate — integration by quadrature

Calling sequence

[x]=integrate(expr,v,x0,x1 [,ea [,er]])  

Parameters

expr : external Scilab
v : string (integration variable)
x0,x1 : real numbers (bounds of integration)
ea,er : real numbers (absolute error bound) Default value: 0
er : real number, (relative error bound) Default value: 1.d-8

Description

computes :

The evaluation hopefully satisfies following claim for accuracy: abs(I-x)<= max(ea,er*abs(I)) where I stands for the exact value of the integral.

Examples



integrate('sin(x)','x',0,%pi)
integrate(['if x==0 then 1,';
           'else sin(x)/x,end'],'x',0,%pi)
 
  

See also

intg, inttrap, intsplin, ode