(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

x²

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.