? RPL/HP-48 - numerical S on a << >> integrand ? - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: ? RPL/HP-48 - numerical S on a << >> integrand ? (/thread-17321.html) ? RPL/HP-48 - numerical S on a << >> integrand ? - OlidaBel - 08-05-2021 12:52 PM In RPL, is there a way to integrate (S) on a program <<...>> integrand ? I don't think so, Something like this : 0 1 <> 'X' S where the legal way to integrate is : 0 1 'SIN(X)-SQ(X)' 'X' S a program gives sometimes more flexibility to build a function to integrate. RE: ? RPL/HP-48 - numerical S on a << >> integrand ? - Joe Horn - 08-05-2021 01:27 PM (08-05-2021 12:52 PM)OlidaBel Wrote:  In RPL, is there a way to integrate (S) on a program <<...>> integrand ? I don't think so, Something like this : 0 1 <> 'X' S where the legal way to integrate is : 0 1 'SIN(X)-SQ(X)' 'X' S a program gives sometimes more flexibility to build a function to integrate. Try writing the program as a "user-defined function" which means storing the argument(s) in local variable(s) like this: << -> X << X SIN X SQ - >> >> or << -> X 'SIN(X)-X^2' >> RPL treats programs like that more like built-in functions when solving, graphing, and so on, so it might help here too. RE: ? RPL/HP-48 - numerical S on a << >> integrand ? - OlidaBel - 08-05-2021 02:11 PM (08-05-2021 01:27 PM)Joe Horn Wrote:  Try writing the program as a "user-defined function" which means storing the argument(s) in local variable(s) like this: << -> X << X SIN X SQ - >> >> or << -> X 'SIN(X)-X^2' >> RPL treats programs like that more like built-in functions when solving, graphing, and so on, so it might help here too. Unfortunately something like this is refused on HP 48GX : 0 1 << -> X 'SIN(X)-X^2' >> or << -> X << X SIN X SQ - >> >> 'X' S => "S Error: Bad argument type" I checked the old HP-28s documentation. This calculator was more permissive with S. RE: ? RPL/HP-48 - numerical S on a << >> integrand ? - OlidaBel - 08-05-2021 02:19 PM But this is accepted : EQ = 'EQ1(X)' EQ1 = << -> T << T SIN T SQ - >> >> 0 1 'EQ1(X)' 'X' S => 0.12636 RE: ? RPL/HP-48 - numerical S on a << >> integrand ? - Werner - 08-05-2021 03:07 PM You can use \<< <-X SIN <-X SQ - \>> 'F' STO 0. 1. 'F' '<-X' S with <- the backarrow symbol, declaring a local variable. If you don't like that, you'll have to do it the way Olidabel did Cheers, Werner RE: ? RPL/HP-48 - numerical S on a << >> integrand ? - OlidaBel - 08-05-2021 03:21 PM Thanks Joe & Werner, I finally succeeded (and understood!) how to play with integrals S onto programs. I could adapt my old 28S program and results are now OK. The 48GX is definitely different than a 28S, it was not easy to troubleshoot ;-). Starting with an algebraic expression and playing with local variables in <<...>> was the key.