HP Forums
HP Prime CAS programming - 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: HP Prime CAS programming (/thread-3149.html)

Pages: 1 2


RE: HP Prime CAS programming - roadrunner - 08-29-2020 11:25 AM

Have you tried:

CMD1:="diff(3*x^2+5*x,x,1)"

or

CAS.diff("3*x^2+5*x,x,1")

Both return 6*x+5

for me.

-road


RE: HP Prime CAS programming - ramon_ea1gth - 08-29-2020 07:13 PM

(08-29-2020 11:25 AM)roadrunner Wrote:  Have you tried:
CMD1:="diff(3*x^2+5*x,x,1)"
or
CAS.diff("3*x^2+5*x,x,1")
Both return 6*x+5
for me.
-road
Good point. In fact I left on purpose the example with the two "different" results, so it is possible to quickly imagine alternatives like yours or, e.g., if you implement a custom CAS function to be called this way, add an extra simplify() command if needed.