Arbitrary Precision Quadrature Functions Added to Ch.8 Maxima by Example



Two functions for arbitrary precision quadrature, apnint, and
apquad, have been added to the Ch.8 files available on the
Maxima by Example webpage. One should first load the nint.mac
package, and then the apnint.mac package files to be able
to use these new arbitrary precision functions. The new
pdf file for Ch. 8 demonstrates how to use these new functions.

The nint package provides a simple interface to 1d and 2d quadrature,
making use of both integrate (if feasible) and the Maxima
quadpack functions.

The present nint and apnint packages are a work in progress, partially
dictated by the progress in Maxima special function float and bfloat
values. The new Ch. 8 functions apnint and apquad are the first step
in providing quadrature results which attempt to satisfy user
requested precision (for one dimensional quadrature).

At a later stage, an option, such as precision(rp,wp) could be
added to the options recognised by nint and quad, which could avoid
having to load in three extra files (apnint.mac, dequad.mac,
and tsquad.mac) to be able to access the higher precision. But for
now, the easiest route is to require loading in via apnint.mac.

>From the current webpage:
=============================================
Chapter 8: Numerical Integration --NEW--11/16/2012

The newly revised chapter 8 includes new package functions nint, quad, 
mdefint, and ndefint for 1d and 2d numerical integration, available after 
loading the file nint.mac.

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.
You can also force Maxima to try integrate (if nint avoids integrate for a 
given integrand-domain) by using the syntax:

    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.

Arbitrary precision quadrature using apnint has the syntax

    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.

    --mbe8nint.zip : 11/16/2012 zip code of all Ch. 8 files
    --mbe8nint.tar.gz : 11/16/2012 tar.gz code of all Ch. 8 files
    --mbe8nint.pdf : 11/16/2012, Maxima 5.28.0, 35 page pdf file
    --mbe8code.txt : Copy and Paste Code: 11/16/2012, Maxima 5.28.0
    --nint.mac 11/16/2012, Maxima 5.28.0
    --nint.lisp Oct. 31,2012, Maxima 5.28.0
    --mydefint.mac Oct. 31,2012, Maxima 5.28.0
    --quad1d.mac Oct. 31,2012, Maxima 5.28.0
    --quad2d.mac Oct. 31,2012, Maxima 5.28.0
    --quad_util.mac Oct. 31,2012, Maxima 5.28.0
    --nint_test.mac Oct. 31,2012, Maxima 5.28.0
    --apnint.mac 11/16/2012, Maxima 5.28.0
    --dequad.mac 11/16/2012, Maxima 5.28.0
    --tsquad.mac 11/16/2012, Maxima 5.28.0

Chapter 8 Topics

    Using nint and quad for One or Two Dimensional Quadrature
    Using apnint and apquad for Arbitrary Precision Quadrature
    Using the Wolfram Alpha Web Site for Integrals
    Direct Quadpack Use of quad_qags, quad_qag, and quad_qagi
    Sharper Tools: Use of quad_qagp, quad_qawo, quad_qaws, quad_qawc, and 
quad_qawf
    Numerical Integration Decision Trees
------------------------------------------------
Ted Woollett
http://www.csulb.edu/~woollett/