This file is a documentation of integraXXX.lib, updated to version 1.0a (released 06-02-1995) ------------------------------------------------------------------------------ The authors are in NO WAY responsible for the suitability or accuracy of this documentation and/or the program it describes. Any damage directly or indirectly caused by the use or misuse of this program and/or documentation is the sole responsibility of the user himself. ------------------------------------------------------------------------------ Integra.lib v1.0a is Copyright (C) 1995 Daniele Finocchiaro, Gianluca Marcoccia. All rights reserved. Daniele Finocchiaro via P. Scuderi 1 95015 Linguaglossa (Ct) ITALIA Marcoccia Gianluca Via Garibaldi 78 56100 Pisa (PI) ITALIA E-Mail: (marcocci@cli.di.unipi.it) This program may be distributed non-commercially only providing that the executable, documentation and copyright notices remain unchanged and are included with the distribution. Distribuition right are granted to Fred Fish and anyone else who charges the same fees he does. Special right are granted to Aminet. YOU CANNOT USE THIS LIBRARY INSIDE A COMMERCIAL PRODUCTION WITHOUT THE WRITTEN CONSENT OF THE AUTHORS. (we are working on better/faster version of the library, if you contact us we might already probably supply a newer version of this, special custom version can be arranged on requests) This program is FREEWARE. ------------------------------------------------------------------------------ The library is virtually divided in three parts: 1) a global adaptive quadrature method 2) a polinomial interpolation method 3) a parser routine ------------------------------------------------------------------------------ The first part of the library makes available two functions that are an implementation of a sofisticated and very precise scheme of integration. Anyway these require the function f() to be calculable in every point we need. You have to supply either a C function that calculates it upon request, or an expression in the form of a string. In both cases the integration scheme used is the same, and its scope is to obtain the requested accuracy with the minimum number of evaluations of the function f(). The algorithm used is a global adaptive quadrature. Briefly, it calculates a first approximation of the value of the integral in the whole range, it this result looks enough accurate it returns it as a results and exits; otherwise the range gets divided in two sub-ranges, and on every of the sub-ranges we re-calculate the integral. Applying recursively this scheme we try to get to the requested accuracy. The algorithm is clever enough to: - concentrate the evaluations of f() in the part of f() where it is has more integration problems. This is a consequence of the adaptive strategy being used. - re-utilize already known values of f() to calculate further approximations, thus requiring minimum number of evaluations. This is due to the use of RMS rules. For a theoric explanation on RMS rules and their utilization see bibliography. (At the University of Pisa these arguments) (are topics of the Numeric Analisys exam. ) ------------------------------------------------------------------------------ The second part of the library is to be used when you have the data about f(x) evaluated in a particular set of x points, but you dont know the function f() explicitely. This is the case of experimental data. This part of the library does offer two functions, the first to be used when the set of x points is equidistribuited over the range of integration, the second to be used when the set of x points has no particular property. (when the point are equidistribuited a much more efficient method can be used.) These routines use an enhanced version of Cavalieri-Simpson method. Also supplied are the equivalent functions (as above) which also return partial computation results. (useful for monitoring) ------------------------------------------------------------------------------ The third part of the library yelds a string parser function. What a parser should do is to evaluate a string which contains a function written in ascii form, returning the numeric value (eventually in a particular x). This function isable to execute the operations described in the string, such as additions and multiplications, and apply functions such as sin and cosin. This function has been supplied for users comfort, because WITHOUT the possibility of supplying the function as an input string the function that you are willing to integrate should ALWAYS be known at compile time. The use of a parser eliminates this need, allowing the use to supply such a function at run time. This parser is based on the code `recursive descent parser' shown in the book "C-The Complete Reference" by Herb Schildt (Mc-Graw Hill) pagg. 562. A modified version of which (multiparser) has been used in the program 'MultiFun' (by Daniele Finocchiaro, 1991) ------------------------------------------------------------------------------ Bibliography: P.J. Davis, P. Rabinowitz. - Methods of Numerical Integration. Academic Press, New York, 1975. R. Bevilacqua, D. Bini, M. Capovani, O. Menchi. - Metodi Numerici. Zanichelli, Bologna, 1992. P. Favati, G. Lotti, F. Romani. - Interpolatory Integration Formulas for Optimal Composition. ACM Transaction on Mathematical Software. Vol 17, N.2, June 1991, pp. 207-217 P. Favati, G. Lotti, F. Romani. - Improving QUADPACK Integration Routines. ACM Transaction on Mathematical Software. Vol 17, N.2, June 1991, pp. 218-232 ------------------------------------------------------------------------------