Post Reply 
? RPL/HP-48 - numerical S on a << >> integrand ?
08-05-2021, 12:52 PM
Post: #1
? 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, 28S, 15c CE. SwissMicros DM42, DM15L
A long time ago : 11C, 15C, 28C.
Find all posts by this user
Quote this message in a reply
08-05-2021, 01:27 PM
Post: #2
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-
Visit this user's website Find all posts by this user
Quote this message in a reply
08-05-2021, 02:11 PM
Post: #3
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:
Bad argument type"

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

---
HP 48GX, Prime G2, 50G, 28S, 15c CE. SwissMicros DM42, DM15L
A long time ago : 11C, 15C, 28C.
Find all posts by this user
Quote this message in a reply
08-05-2021, 02:19 PM (This post was last modified: 08-05-2021 02:19 PM by OlidaBel.)
Post: #4
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, 28S, 15c CE. SwissMicros DM42, DM15L
A long time ago : 11C, 15C, 28C.
Find all posts by this user
Quote this message in a reply
08-05-2021, 03:07 PM
Post: #5
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

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
08-05-2021, 03:21 PM
Post: #6
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, 28S, 15c CE. SwissMicros DM42, DM15L
A long time ago : 11C, 15C, 28C.
Find all posts by this user
Quote this message in a reply
Post Reply 




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