Post Reply 
HP-41 Challenge: Double Integrals by INTEG Recursion
05-27-2016, 02:35 PM (This post was last modified: 05-27-2016 05:33 PM by Ángel Martin.)
Post: #1
HP-41 Challenge: Double Integrals by INTEG Recursion
Well folks, it's time to shake all those dormant brain cells and put them to a worthy task... if you'd agree.

Your mission is to write a program to calculate double integrals, i.e. those where the integrand is a function of two variables, say f(x,y), and where each of them is integrated along an interval - say [y1, y2] and [x1,x2] respectively.

Furthermore, allow for the possibility that the inner integral limits (x1, x2) could be a function of the outer variable (y).

And here is the key requirement: your program must use the INTEG function from the HP41-Advantage, and do it in a RECURSIVE manner - yes, what according to the manual is not possible.. oh well.

Input: the function name in ALPHA, and the four integration limits in the stack - plus a user program to define the function of course.

You can use as many data registers as you want. You can (and will need to) use functions from other modules, such as the AMC_OS/X and (big hint!) the RamPAGE...

I'll post my solution in a few days; it does all the work in just 31 program steps (not counting the function definition).
Six data registers are used, R00-R05. Can you beat that?

Happy recursion!
ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-41 Challenge: Double Integrals by INTEG Recursion - Ángel Martin - 05-27-2016 02:35 PM



User(s) browsing this thread: 1 Guest(s)