home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
calculat
/
sm30a.zip
/
NINTE.(X)
< prev
next >
Wrap
Text File
|
1993-10-16
|
496b
|
13 lines
# The numeric integration library "NInte.fun"
# ninte(f,x,a,b) gives a numeric approximation to the definite
# integral of f from a to b. ninte() is different from num(inte()),
# num(inte(f,x,a,b)) first evaluates
# the symbolic definite integral and then converts to a numerical value.
# e.g. ninte(x^2,x,0,1)
# See also: nsolve, inte.
ninte(y_,x_,a_,b_) := block(numeric:=on,
ninte:=(b-a)/50,
(sum(y,x,a+ninte,b-ninte,ninte)+(subs(y,x=a)+subs(y,x=b))/2)*ninte,
local(ninte))