Post Reply 
How can I define cas function of an operator(mathematical term)?
09-02-2023, 04:37 PM
Post: #2
RE: How can I define cas function of an operator(mathematical term)?
(09-02-2023 03:29 PM)Aleksandr94 Wrote:  I have hp prime v2. I want to define operator, let's say I want to create user defined CAS operator, that computes indefinite integral: limit(int(Y,X,-A,A),-infinity,+infinity).
1) I tried to do this trough shift+ define with no success.
I was able to obtain correct integrals by using CAS.int(Y,X), but was inable to compute limits via CAS.limit(Y, X). Because it was impossible to obtain right result for limit, I was inable to obtain correct indefinite integral.
2) I tried to do this thought shift + program. I was unable to compute integral.
I used
EXPORT MYFUNC(x,y);
RETURN CAS(int(y,x));
3) I also tried to do this thought
# cas;
myfunc(x,y):=
BEGIN
int(y,x);
Result it gave was incorrect.
How can I do this?

Try this:

Code:

#cas
MYFUNCTION(fnz,a,b):=
BEGIN
LOCAL fnz1;
vr:=lname(fnz)[1];
fnz1:=(vr)→int(fnz(vr),vr,a,b);
RETURN fnz1(vr);
END;
#end

For example:

MYFUNCTION((x)->2*x-x^2/15,0,30) equal to 300
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)? - robmio - 09-02-2023 04:37 PM



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