Post Reply 
Derivatives
10-02-2022, 03:11 PM
Post: #4
RE: Derivatives
(10-02-2022 12:47 AM)Eddie W. Shore Wrote:  Trying the second derivative in a program:

Code:
EXPORT DER2(f,v,n)
BEGIN
LOCAL d;
d:=diff(f,v,2,v=n);
RETURN d;
END;

Home:
DER2(X^3,X,1) -> Error: Bad argument value ("diff(f,v,2,v=n)")]
DER2('X^3','X',1) -> diff(diff(3.006003,2),0)

CAS:
DER2(X^3,X,1) -> Error: Bad argument value ("diff(f,v,2,v=n)")]
DER2(x^3,x,1) -> diff(diff(3*x^2,2),0)

I hope that the next Prime update will allow for numerical differentiation for both first and second derivatives.

Hello, try using this little program:
Code:

#cas
DER2(funz,grado,num):=
BEGIN
LOCAL dd, vrb, risultato;
vrb:=lname(funz);
vrb:=vrb(1);
dd:=diff(funz,vrb,grado);
risultato:=subst(dd,vrb=num);
RETURN risultato;
END;
#end

Example:
DER2 (function, degree of derivation, number)
DER (t ^ 3,2,4) -> 24

Sincerely, robmio
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Derivatives - Eddie W. Shore - 09-28-2022, 12:53 PM
RE: Derivatives - Arno K - 09-29-2022, 12:51 PM
RE: Derivatives - Eddie W. Shore - 10-02-2022, 12:47 AM
RE: Derivatives - robmio - 10-02-2022 03:11 PM
RE: Derivatives - robmio - 10-02-2022, 04:37 PM
RE: Derivatives - Arno K - 10-04-2022, 01:47 PM
RE: Derivatives - robmio - 10-05-2022, 09:44 AM
RE: Derivatives - robmio - 10-05-2022, 09:52 AM
RE: Derivatives - Eddie W. Shore - 10-06-2022, 04:55 AM
RE: Derivatives - Arno K - 10-05-2022, 04:21 PM



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