[WP 34s] Trapezoidal approximation of area under curve

06012015, 01:53 PM
(This post was last modified: 06012015 02:31 PM by Marcio.)
Post: #1




[WP 34s] Trapezoidal approximation of area under curve
Hello all,
Is it possible to have access to data keyed into the calc using the \(\sum +\) for other procedures other than stat functions? If so, I am planning on creating a program that would take advantage of that so it would be possible to easily calculate the area under a curve defined by data, as shown below: \[ \int_{x_1}^{x_n} y(x) dx \approx \frac{1}{2} \sum_{k=1}^{n1} (x_{k+1}x_{k})(y_{k+1}+y_{k}) \] Many thanks Marcio 

06012015, 03:54 PM
Post: #2




RE: [WP 34s] Trapezoidal approximation of area under curve
(06012015 01:53 PM)Marcio Wrote: Is it possible to have access to data keyed into the calc using the \(\sum +\) for other procedures other than stat functions?The SUMS catalog has all the accumulated data ready for access. All commands in this catalog are programmable. Marcus von Cube Wehrheim, Germany http://www.mvcsys.de http://wp34s.sf.net http://mvcsys.de/doc/basiccompare.html 

06012015, 05:36 PM
Post: #3




RE: [WP 34s] Trapezoidal approximation of area under curve
(06012015 03:54 PM)Marcus von Cube Wrote:(06012015 01:53 PM)Marcio Wrote: Is it possible to have access to data keyed into the calc using the \(\sum +\) for other procedures other than stat functions?The SUMS catalog has all the accumulated data ready for access. All commands in this catalog are programmable. The problem is that the trapezoidal approximation appears to require the individual data points, and not just the sums. You'll probably have to write a custom program that accumulates its own sums, either on the fly, or by using a block of registers to store x and y data points. 

06012015, 06:56 PM
(This post was last modified: 06012015 07:06 PM by Thomas Klemm.)
Post: #4




RE: [WP 34s] Trapezoidal approximation of area under curve
(06012015 01:53 PM)Marcio Wrote: If so, I am planning on creating a program that would take advantage of that so it would be possible to easily calculate the area under a curve defined by data, as shown below: You could use something like: Code: 001 LBL'TPZ' Usage: \(y_1\) ENTER \(x_1\) XEQ'TPZ' \(y_2\) ENTER \(x_2\) R/S (...) \(y_n\) ENTER \(x_n\) R/S Σxy 2 ÷ Not a sophisticated program but I hope you get the idea. Cheers Thomas 

06022015, 02:46 AM
Post: #5




RE: [WP 34s] Trapezoidal approximation of area under curve
Works like a charm.
Thank you 

06022015, 09:23 PM
Post: #6




RE: [WP 34s] Trapezoidal approximation of area under curve
(06012015 06:56 PM)Thomas Klemm Wrote: Not a sophisticated program but I hope you get the idea. A bit of sophistication can be added by using the 34s' complex functions: Code: 01 LBL"TRP" XEQ"TRP" y1 ENTER x1 R/S y2 ENTER x2 R/S ... Σxy 2 ÷ Dieter 

06162015, 10:47 AM
(This post was last modified: 06162015 10:49 AM by Marcio.)
Post: #7




RE: [WP 34s] Trapezoidal approximation of area under curve
Hello again,
Does anyone know how to do \(RCL+ Z\) on the 35s? From what I saw in the manual, one has to use the EQN inside the program in order to recall the \(z\)register, which is somewhat dangerous. Thanks. 

06162015, 11:31 AM
Post: #8




RE: [WP 34s] Trapezoidal approximation of area under curve  
06162015, 12:38 PM
Post: #9




RE: [WP 34s] Trapezoidal approximation of area under curve
(06162015 10:47 AM)Marcio Wrote: Does anyone know how to do \(RCL+ Z\) on the 35s? You can use the following program: Code: T001 LBL T Usage: \(y_1\) ENTER \(x_1\) XEQ T \(y_2\) ENTER \(x_2\) R/S (...) \(y_n\) ENTER \(x_n\) R/S Σxy 2 ÷ Cheers Thomas 

06162015, 12:57 PM
Post: #10




RE: [WP 34s] Trapezoidal approximation of area under curve
Thank you Thomas.
I myself created a program with more than 2 times as many lines as yours, which is not only simpler but also much more elegant. Very much appreciated. Marcio 

« Next Oldest  Next Newest »

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