(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! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)