Trapezoidal Rule for HP-67
|
09-02-2017, 07:02 PM
Post: #1
|
|||
|
|||
Trapezoidal Rule for HP-67
Hi all.
Although the 67/97 Math Pac I has mag card which calculates an integral with the Trapezoidal Rule, the x,y data points need to be stated. Is there a program here in the archives or elsewhere for calculating integrals with the Trapezoidal Rule for the HP-67/97 where the function subroutine can be entered in the program? Thanks |
|||
09-03-2017, 08:27 AM
(This post was last modified: 09-03-2017 08:45 AM by Dieter.)
Post: #2
|
|||
|
|||
RE: Trapezoidal Rule for HP-67
(09-02-2017 07:02 PM)Matt Agajanian Wrote: Although the 67/97 Math Pac I has mag card which calculates an integral with the Trapezoidal Rule, the x,y data points need to be stated. I assume this is because the Trapezoidal method is a very simple one with quite limited accuracy for analytical functions. On the other hand it works well for purposes where discrete data points are given, e.g. in engineering. (09-02-2017 07:02 PM)Matt Agajanian Wrote: Is there a program here in the archives or elsewhere for calculating integrals with the Trapezoidal Rule for the HP-67/97 where the function subroutine can be entered in the program? Simply write your own: Code: LBL A Enter function at LBL E Here x is in the X-register and can also be recalled from R0 if required. Enter limits: a [ENTER] b [ A ] Enter number of intervals (≥2): n [ B ] (note: incorrect input (non-integer or less than 2) is automatically corrected) Calculate integral: [ C ] Registers: R0: x R1: a R2: b R3: n R4: h = (b–a)/n R5: function sum, integral Example: Integrate f(x) = 1/x from a=1 to b=2 with n=10 intervals LBL E 1/x RTN 1 [ENTER] 2 [ A ] 10 [ B ] [ C ] => 0,6938 Exact solution: ln 2 = 0,693147... If you add a PAUSE after LBL E you can see how x runs from a to b. ;-) Dieter |
|||
09-03-2017, 05:18 PM
Post: #3
|
|||
|
|||
RE: Trapezoidal Rule for HP-67
(09-03-2017 08:27 AM)Dieter Wrote:(09-02-2017 07:02 PM)Matt Agajanian Wrote: Although the 67/97 Math Pac I has mag card which calculates an integral with the Trapezoidal Rule, the x,y data points need to be stated. Thank you for this. To be honest, the HP-41 module option seems to imply that 41 x-Functions be present or perhaps the 41CX was needed. Now that I you've posted a version for a standalone 67, I can use this for everything from my own physical 67, 11C or iOS apps from CuVee. Thanks! |
|||
09-03-2017, 05:32 PM
(This post was last modified: 09-03-2017 05:36 PM by Dieter.)
Post: #4
|
|||
|
|||
RE: Trapezoidal Rule for HP-67
(09-03-2017 05:18 PM)Matt Agajanian Wrote: Thank you for this. To be honest, the HP-41 module option seems to imply that 41 x-Functions be present or perhaps the 41CX was needed. ?!? – wait a minute. I think we are talking about a program for the HP67/97 here? Now you mention a HP41 module – ?!? Auch which module do you mean here? BTW the HP41 Math and Math/Stat ROMs of course do not require any other module, let alone an X-Functions ROM or a 41CX. Why do you think they do? (09-03-2017 05:18 PM)Matt Agajanian Wrote: Now that I you've posted a version for a standalone 67, I can use this for everything from my own physical 67, 11C or iOS apps from CuVee. If you really want to do numerical integration with such an, err... "unsophisticated" method, that is. On the 41C you may instead take a look at the Advantage ROM and the Romberg method implemented there. Dieter |
|||
09-03-2017, 05:44 PM
Post: #5
|
|||
|
|||
RE: Trapezoidal Rule for HP-67
(09-03-2017 05:32 PM)Dieter Wrote:(09-03-2017 05:18 PM)Matt Agajanian Wrote: Thank you for this. To be honest, the HP-41 module option seems to imply that 41 x-Functions be present or perhaps the 41CX was needed. My goof. After I posted this, I realised that it's the Romberg Integration program from 41's Advantage module I was referring to. But, I seem to recall that the Romberg application requires a certain other module to be in the 41 to function properly. Or did I misread something? |
|||
09-03-2017, 05:59 PM
(This post was last modified: 09-03-2017 06:16 PM by Dieter.)
Post: #6
|
|||
|
|||
RE: Trapezoidal Rule for HP-67
(09-03-2017 05:44 PM)Matt Agajanian Wrote: My goof. After I posted this, I realised that it's the Romberg Integration program from 41's Advantage module I was referring to. Now I'm even more confused. What exactly do you mean here? Are we talking about the Trapezoidal method for discrete data points in the HP67 program mentioned in your first post? Or is it the integration routine in the HP41 Advantage Pac? Or the Romberg program in the PPC-ROM? What kind of program are you looking for, and for which calculator? (09-03-2017 05:44 PM)Matt Agajanian Wrote: But, I seem to recall that the Romberg application requires a certain other module to be in the 41 to function properly. Or did I misread something? I think you did. The much more sophisticated integration program in the Advantage ROM does not need any special add-on (BTW, this is not a plain-vanilla Romberg algorithm). A classic Romberg program is part of the PPC-ROM ("IG"). Nothing special required here either. It just requires a certain number of data registers. BTW, I originally confused the last two programs. Of course you cannot review the Advantage ROM since this is machine code. But you can do so with the PPC-ROM as the source is printed in the ROM's manual. Dieter |
|||
09-03-2017, 06:04 PM
Post: #7
|
|||
|
|||
RE: Trapezoidal Rule for HP-67
(09-03-2017 05:59 PM)Dieter Wrote:(09-03-2017 05:44 PM)Matt Agajanian Wrote: My goof. After I posted this, I realised that it's the Romberg Integration program from 41's Advantage module I was referring to. Thank you for clarifying that. And, honestly Dieter and MoHPC group, thank you for being helpful answering my many questions during the past few days. I appreciate that. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)