Numerical Integration using chained Gauss-Legendre
|
03-21-2016, 05:51 PM
(This post was last modified: 01-16-2020 08:35 AM by Namir.)
Post: #1
|
|||
|
|||
Numerical Integration using chained Gauss-Legendre
Back last year, a member of this website pointed to the simplicity of using the Gauss-Legendre quadrature (with a 3rd order Legendre polynomial) with vintage and new HP calculators. This prospect made me think of using a "chained" version of that type of quadrature to yield relatively good results. Here are my preliminary results usin Excel VBA.
The following Excel VB Code compares the chained Simpson's rule with a "chained" Gauss-Legendre quadrature using a 3rd order Legendre polynomial. The following is the configuration contents of the Excel sheet: Code: Cell Contents Here is the VBA code: Code: Function Fx(ByVal sFx As String, ByVal X As Double) As Double As you experiment with different functions and integration ranges, you should see that the chained Gauss-Legendre quadrature is significantly more accurate than Simpson's rule. Both methods use three points per divided interval. Enjoy! Namir |
|||
03-22-2016, 06:40 AM
Post: #2
|
|||
|
|||
RE: Numerical Integration usined chained Gauss-Legendre
Is this related to hp 41?
|
|||
03-29-2016, 10:13 PM
Post: #3
|
|||
|
|||
RE: Numerical Integration usined chained Gauss-Legendre
(03-22-2016 06:40 AM)Tugdual Wrote: Is this related to hp 41? I think that Namir introduced his VBA code with a comment that this approach to quadrature might be well suited to keystroke programming. I discerned at least an implied challenge that someone adapt this to HP41/42 code--unless Namir is working on that himself already. I have to admit I am more of a Romberg man myself... Les |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)