The new package loaded by apnint.mac (nint.mac should be loaded first) makes available
two functions for arbitrary precision quadrature in 1 dimension, apnint and apquad.
For routine 1d numerical integration (quadrature), you can simply use the syntax:
nint (expr,x,x1,x2)where expr can be either real or complex. The new function nint will first try the Maxima function integrate (if feasible), and if not successful, will use the Maxima quadpack functions. You can force Maxima to just use the quadpack functions with the syntax:
quad (expr,x,x1,x2),again with expr being either real or complex.
mdefint (expr,x,x1,x2)for a symbolic answer, and
ndefint (expr,x,x1,x2)for a numerical answer calculated from the symbolic integrate answer using bigfloat methods with 32 digit precision.
The 2d syntax is similar to Mathematica's:
nint(f,[x,x1,x2],[y,y1,y2])is an approximate numerical value of
integrate( integrate (f,y,y1,y2), x,x1,x2).
A number of optional arguments can be used to control or request the
quadpack method to be used.
apnint(expr,x,x1,x2,rp,wp),in which rp is the requested precision of the answer, and wp is the working precision. The function apnint first tries using integrate, if feasible, and if not successful, uses one of two numerical methods we discuss in Ch.9.
The function apquad has the same syntax:
apquad(expr,x,x1,x2,rp,wp),and avoids integrate, forcing use of one of two possible numerical methods.
In both of these arbitrary precision cases, if the domain is non-finite, then x1 should be finite and x2 should be the symbol inf.
Chapter 8 Topics