Gaussian Evaluation of a Definite Integral
This program, like the Modified Simpson method, is used to limit the amount of machine-introduced error in the evaluation of integrals. In the Gauss method, however, the interval (A,B) is transformed to an interval (-1,1) and the function is evaluated at symmetrically arranged argument values which are then multiplied by the corresponding weight factors.
Program Notes:
It will be necessary to enter your actual function in the program (see REM statement).
Downloads:
basic program (liberty basic) lbgedi.bas
Test Case:
Find the correct value for the following:
F = l/X
(1,2)
GAUSSIAN EVALUATION OF A DEFINITE INTEGRAL
KEY IN LOWER LIMIT 1 KEY IN UPPER LIMIT 2
THE VALUE OF THE INTEGRAL IS 0.69314714
DO YOU WANT NEW LIMITS (YES=1,NO=0)? 0
|