? RPL/HP-48 - numerical S on a << >> integrand ?
08-05-2021, 12:52 PM
Post: #1
 OlidaBel Member Posts: 57 Joined: Mar 2021
? RPL/HP-48 - numerical S on a << >> integrand ?
In RPL, is there a way to integrate (S) on a program <<...>> integrand ? I don't think so,
Something like this :
0
1
<<X SIN X SQ - >>
'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.

---
HP 48GX, Prime G2, 50G. A long time ago : 11C, 15C, 28C, 28S. SwissMicros DM42, DM15L
08-05-2021, 01:27 PM
Post: #2
 Joe Horn Senior Member Posts: 1,829 Joined: Dec 2013
RE: ? RPL/HP-48 - numerical S on a << >> integrand ?
(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 SIN X SQ - >>
'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.

<0|ΙΈ|0>
-Joe-
08-05-2021, 02:11 PM
Post: #3
 OlidaBel Member Posts: 57 Joined: Mar 2021
RE: ? RPL/HP-48 - numerical S on a << >> integrand ?
(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:

I checked the old HP-28s documentation. This calculator was more permissive with S.

---
HP 48GX, Prime G2, 50G. A long time ago : 11C, 15C, 28C, 28S. SwissMicros DM42, DM15L
08-05-2021, 02:19 PM (This post was last modified: 08-05-2021 02:19 PM by OlidaBel.)
Post: #4
 OlidaBel Member Posts: 57 Joined: Mar 2021
RE: ? RPL/HP-48 - numerical S on a << >> integrand ?
But this is accepted :
EQ = 'EQ1(X)'
EQ1 = << -> T << T SIN T SQ - >> >>

0
1
'EQ1(X)'
'X'
S
=>
0.12636

---
HP 48GX, Prime G2, 50G. A long time ago : 11C, 15C, 28C, 28S. SwissMicros DM42, DM15L
08-05-2021, 03:07 PM
Post: #5
 Werner Senior Member Posts: 687 Joined: Dec 2013
RE: ? RPL/HP-48 - numerical S on a << >> integrand ?
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
08-05-2021, 03:21 PM
Post: #6
 OlidaBel Member Posts: 57 Joined: Mar 2021
RE: ? RPL/HP-48 - numerical S on a << >> integrand ?
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.

---
HP 48GX, Prime G2, 50G. A long time ago : 11C, 15C, 28C, 28S. SwissMicros DM42, DM15L
 « Next Oldest | Next Newest »

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