HP Forums

Full Version: compute derivatives without evaluation in program?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I desire F1 := C2/(X+5) and want F2 to be the first derivative F2 := -C2/(X+5)^2. More generally, given an arbitrary F1(X), I'd like F2(X) to be symbolic function without the values of variables being substituted for as the derivative is being calculated.

Here is my test program. C2 is a list of numbers.

EXPORT MYTEST()
BEGIN
F1 := EXPR("'C2/(X+5)'");
F2 := EXPR("'diff(F1(X),X)'");
END;
(02-25-2018 07:05 PM)mbeddo Wrote: [ -> ]I desire F1 := C2/(X+5) and want F2 to be the first derivative F2 := -C2/(X+5)^2. More generally, given an arbitrary F1(X), I'd like F2(X) to be symbolic function without the values of variables being substituted for as the derivative is being calculated.

Here is my test program. C2 is a list of numbers.

EXPORT MYTEST()
BEGIN
F1 := EXPR("'C2/(X+5)'");
F2 := EXPR("'diff(F1(X),X)'");
END;

Hi Friend,
try
fx:='C2/(X+5)'
dfx:=CAS.diff(fx,X);
Best regards!!
josephec
Reference URL's