Você está na página 1de 1

Calculation of definite integrals

SCILAB offers a function, called intg, that calculates the definite integral of a function. The general call to
function intg is

[I,err]=intg(a,b,f [,ea [,er])

where a,b = limits of integration, f = represents a function, list or string, ea = absolute error required on
the result (default value, ea = 0), er = relative error required on the result (default value, er = 1.d-8), I =
integral value, and err = estimated absolute error on the result. If f is function its definition must be as
follows: y = f(t). If f is a list the list must be as follows: list(f,x1,x2,...), where f is a function with calling
sequence: f(t,x1,x2,...). Finally, if f is a string it refers to the name of a Fortran subroutine. An application
of function intg follows:


-->[I,err] = intg(0,1,f)

err =