HP Forums
compute derivatives without evaluation in program? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: compute derivatives without evaluation in program? (/thread-10244.html)



compute derivatives without evaluation in program? - mbeddo - 02-25-2018 07:05 PM

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;


RE: compute derivatives without evaluation in program? - josephec - 02-28-2018 02:36 AM

(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