Post Reply 
(35S) Quick integration
11-12-2022, 02:50 PM (This post was last modified: 11-12-2022 04:51 PM by Roberto Volpi.)
Post: #1
(35S) Quick integration
Hi all,

the native integrator of our HP35S works fine, but it is not as quick as we would like.

Inputing functions in RPN mode instead of EQN makes us save approx 30% of time, but waiting 5 minutes for a result is still possible, and here a short programme to avoid it.

The algorithm is based upon Simpson's Rule, with n=2. So just 3 sampling points are taken, but the value we obtain can be an acceptable approximation most of the times, and it is really quick, as the f(x) to be integrated needs to be evaluated just 3 times.

After all, in case f(x) is a polynomial of degree 3 or lower, we obtain an exact value.

NOTE: it assumes that there is a LBL F to be used to store the f(x) to be analysed.

LBL I
STO B
X<>Y
STO A
STO X
XEQ F001
RCL B
STO X
XEQ F
X<>Y
R down
+
X<>Y
RCL B
2
/
STO X
XEQ F001
4
X
R up
+
RCL B
RCL -A
6
/
*
RTN


INSTRUCTIONS:

- Input the integrand f(x) in LBL F

- As with the native integrator, input "a" value, press ENTER, and input "b" value

- press XEQ I ENTER

we quickly obtain:

stack y: midpoint between a and b
stack x: numerical integration


Enjoy!



Put a calculator into your life!
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(35S) Quick integration - Roberto Volpi - 11-12-2022 02:50 PM
RE: (35S) Quick integration - PedroLeiva - 11-12-2022, 03:29 PM
RE: (35S) Quick integration - PedroLeiva - 11-12-2022, 03:57 PM
RE: (35S) Quick integration - Albert Chan - 11-12-2022, 05:13 PM
RE: (35S) Quick integration - Thomas Klemm - 11-12-2022, 05:16 PM
RE: (35S) Quick integration - J-F Garnier - 11-14-2022, 02:50 PM
RE: (35S) Quick integration - rawi - 11-13-2022, 05:27 AM
RE: (35S) Quick integration - rawi - 11-13-2022, 12:49 PM
RE: (35S) Quick integration - Thomas Klemm - 11-14-2022, 07:39 AM
RE: (35S) Quick integration - Thomas Klemm - 11-14-2022, 01:54 PM
RE: (35S) Quick integration - Albert Chan - 11-14-2022, 02:45 PM
RE: (35S) Quick integration - Thomas Klemm - 11-15-2022, 09:49 AM
RE: (35S) Quick integration - Thomas Klemm - 11-18-2022, 04:59 PM
RE: (35S) Quick integration - Liamtoh Resu - 11-19-2022, 01:42 AM
RE: (35S) Quick integration - Albert Chan - 11-19-2022, 04:58 AM
RE: (35S) Quick integration - Thomas Klemm - 11-19-2022, 05:19 AM
RE: (35S) Quick integration - Thomas Klemm - 11-19-2022, 05:36 AM
RE: (35S) Quick integration - Liamtoh Resu - 11-19-2022, 04:45 PM
RE: (35S) Quick integration - Albert Chan - 11-28-2022, 06:49 PM
RE: (35S) Quick integration - Albert Chan - 12-22-2022, 01:54 PM



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