Post Reply 
WP 34S solve an integral
04-24-2015, 02:46 PM (This post was last modified: 04-25-2015 07:39 PM by BarryMead.)
Post: #20
RE: WP 34S solve an integral
(04-24-2015 12:34 PM)Dieter Wrote:  
Code:
LBL A
STO 00      //Save target integral result desired
DROP        //Lower stack to get Upper/Lower solve guess bounds
SLV 00
RTN
ERR 20      //If solve fails to find a root show this error
LBL 00
 0
∫ 01      // ∫ from x to 0 = –∫ from 0 to x 
RCL+ 00   // 10 – ∫
RTN
LBL 01

RTN
Very cleaver optimization. I knew that my original program was clumsy, and non-optimal. I did that on purpose to make it as clear and obvious as possible how to turn the original idea into a program. Using reversed integral bounds (to make the integral negative), and adding a positive target value is equivalent to subtracting a target, and the ability of solve to converge regardless of the sign of the error also can make the program more compact. Congrats on how small you made the program.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
WP 34S solve an integral - lrdheat - 04-23-2015, 07:27 PM
RE: WP 34S solve an integral - lrdheat - 04-23-2015, 08:43 PM
RE: WP 34S solve an integral - BarryMead - 04-23-2015, 08:50 PM
RE: WP 34S solve an integral - BarryMead - 04-23-2015, 09:05 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 12:34 PM
RE: WP 34S solve an integral - BarryMead - 04-24-2015 02:46 PM
RE: WP 34S solve an integral - CR Haeger - 04-23-2015, 10:28 PM
RE: WP 34S solve an integral - BarryMead - 04-23-2015, 10:34 PM
RE: WP 34S solve an integral - Dieter - 04-23-2015, 10:46 PM
RE: WP 34S solve an integral - walter b - 04-24-2015, 08:57 AM
RE: WP 34S solve an integral - CR Haeger - 04-24-2015, 01:24 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 12:16 PM
RE: WP 34S solve an integral - CR Haeger - 04-24-2015, 01:01 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 01:09 PM
RE: WP 34S solve an integral - rprosperi - 04-24-2015, 05:53 PM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 06:22 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 06:37 PM
RE: WP 34S solve an integral - Dieter - 04-25-2015, 10:48 AM
RE: WP 34S solve an integral - BarryMead - 04-25-2015, 06:59 PM
RE: WP 34S solve an integral - Dieter - 04-25-2015, 08:54 PM
RE: WP 34S solve an integral - lrdheat - 04-24-2015, 02:11 AM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 06:19 AM
RE: WP 34S solve an integral - CR Haeger - 04-24-2015, 01:20 PM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 07:07 PM
RE: WP 34S solve an integral - Dieter - 04-24-2015, 07:17 PM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 07:30 PM
RE: WP 34S solve an integral - walter b - 04-24-2015, 10:12 PM
RE: WP 34S solve an integral - Thomas_Sch - 04-24-2015, 10:27 PM
RE: WP 34S solve an integral - lrdheat - 04-25-2015, 09:09 PM



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