Post Reply 
How can I define cas function of an operator(mathematical term)?
09-03-2023, 06:48 PM (This post was last modified: 09-03-2023 08:22 PM by Albert Chan.)
Post: #7
RE: How can I define cas function of an operator(mathematical term)?
HP Prime cannot generate unique symbol, like lisp gensym. (correct this if I was wrong ...)
Here, we use a fixed-name global symbol as a bridge.

If symbol is then used for other purpose, we may get into trouble.
See thread, HP Prime undef for Limes. Maybe a Bug?

Code:
#CAS
MYINT(f,x) :=
BEGIN
subst(int(f(x=x_), x_), x_=x);
END;
#END

CAS> MYINT(x*sin(y), x)      → 1/2*x^2*sin(y)
CAS> MYINT(x*sin(y), y)      → -x*cos(y)
CAS> MYINT(x*sin(y), z)      → x*z*sin(y)

Update: removed ASSUME(x_, symbol).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How can I define cas function of an operator(mathematical term)? - Albert Chan - 09-03-2023 06:48 PM



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