HP Forums
HP prime integration - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: HP prime integration (/thread-7426.html)



HP prime integration - jsima - 12-14-2016 09:05 PM

Hello,
I have recently started with this calculator and I still don't know how everything works. I have been looking for information about how does it solve the numerical integrals, but couldn't find any info anywhere. Does someone know about this?


RE: HP prime integration - parisse - 12-15-2016 07:22 AM

Adaptive method, described in French here
(E. Hairer)


RE: HP prime integration - Tim Wessman - 12-15-2016 04:20 PM

(12-14-2016 09:05 PM)jsima Wrote:  Hello,
I have recently started with this calculator and I still don't know how everything works. I have been looking for information about how does it solve the numerical integrals, but couldn't find any info anywhere. Does someone know about this?

Are you asking "how do I do a numeric integration?" or "what are the algorithms used inside the calculator?"


RE: HP prime integration - jsima - 12-15-2016 07:14 PM

I know how to do it, but I don't know where the result came from. Just wanted to know the method it uses to do so.


RE: HP prime integration - Wes Loewer - 12-16-2016 04:36 AM

(12-15-2016 07:14 PM)jsima Wrote:  I know how to do it, but I don't know where the result came from. Just wanted to know the method it uses to do so.

I don't read French, but a few years ago, with the help of google translate, I studied the Hairer paper that parisse referenced. Someone may find this summary helpful. (Correction welcome if I misunderstood the translation.)

The algorithm described uses a variation of the Gaussian quadrature. Specifically, it uses a standard 15-node Gaussian quadrature. To get an error estimate, two more calculations are done, first using the 14 nodes remaining after removing the middle node, and then a 6-node calculation removing alternating nodes. (See Fig I.10 on p16 of the paper.) If the error estimate is smaller than a specified amount, then the result of the 15 node calculation is your final result. If the error estimate to too large, then the interval is split in half and the same algorithm is applied recursively to each half.

The general idea is to start with the standard Gauss nodes and then remove some. This is the reverse of the more commonly used Gauss-Kronrod algorithm which starts with a number of standard Gauss nodes (say, 7 nodes) then adds more nodes (8 Kronrod nodes for a total of 15).

I've not seen any comparisons of the two approaches, but it seems to me that subtracting nodes makes more sense. Using 15 Gauss-Kronrod nodes would give an exact result for a degree 22 polynomial, while using 15 Gaussian nodes would be exact for a degree 29 polynomial with only slightly more overhead.

I find it rather humbling that Gauss came up with all this without the use of a computer. :-)


RE: HP prime integration - Gerald H - 12-16-2016 06:31 AM

For comparison you might consider this 50g programme:

http://www.hpmuseum.org/forum/thread-4249.html?highlight=lobatto

I would be pleased to see a Prime version of the Gauss-Lobatto-Kronrod method.