Regarding Integration of Functions...
Many functions are defined by an integral.
Integrals are useful in probability theory to compute the probability of
obtaining a value over a given interval.
Integrals come up in the computation of surfaces and of many physical
quantities related to mechanics, energy, power and others and finally numerical integrals are accurate procedures that
formally consist of an infinite sum of infinitesimal quantities.
We have already introduced the use of (see menu under) "Simpson Method "
in a real world application.
We want to show how different methods offer strategies that deal with number of iterations,
estimated precision of the results and absolute values of the difference between the result of the integration and
the true result. This time we implemented under the Smalltalk environment.
We chose three methods of integration approximation: Trapeze, Simpson and Romberg to illustrate
progress of function evaluation in each situation. The function to integrate:
is specified as a block closure to be implemented in Smalltalk: