Post Reply 
How can I define cas function of an operator(mathematical term)?
09-04-2023, 02:08 PM
Post: #8
RE: How can I define cas function of an operator(mathematical term)?
(09-03-2023 06:48 PM)Albert Chan Wrote:  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).
Thank you for the reply!
I have aso tried something like

#CAS
NORM1(fn,a,b):=
BEGIN
LOCAL x
RETURN int(fn(x=x_),x_,a,b);
END;
#end
And tis didn't work.
I also tried this.

#CAS
NORM1(fn,a,b):=
BEGIN
LOCAL x
RETURN int(fn(x),x,a,b);
END;
#end
And this also didn't work.

How do I find this, assuming that there may be several variables and variable of integration is unknown?
It is a bit dissaponying thing about this calculator, that one just can't define mathematical operators by simply writing some formula. It is dissapoinnting, that there is no good queck start manual about defining user defined CAS functions. I think that a user defined function is the most important feature of calculator like this.
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)? - Aleksandr94 - 09-04-2023 02:08 PM



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