Hello.
The existing LegendreGaussQuadrature class incorrectly assumes that
it has
converged for functions where the polynomial approximation fails in a
small
corner of the integral space.
This situation is handled much better with the AdaptiveQuadrature
class in
the path for MATH-995. This problem should be observable with any
integral,
but I observed it with an improper integral. The patch in MATH-995
transforms the improper integral to a proper one before applying the
LegendreGaussQuadrature class (to show how it fails). It also
computes the
same proper integral with the Adaptive method to show the proper
behavior.
Please note that CM aims at providing _standard_ algorithms.[1]
Wikipedia has this general article:
https://en.wikipedia.org/wiki/Adaptive_quadrature
where it is mentioned that the problem is broken into
* standard quadrature rules,
* logic to subdivide the interval and terminate the algorithm.
As I explained in the other post we must aim at flexibility. In this
case, that would indeed imply a clean separation, as outlined in the
article referred to above. [This is obviously not the case in your
"AdaptiveQuadrature" class.]
Best regards,
Gilles
[1] Whenever we can find a description that is sufficiently clear to be
implemented in Java code that would be recognizable as such. ;-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org