HP Forums
autosimplify() Xcas cmd - 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: autosimplify() Xcas cmd (/thread-9459.html)



autosimplify() Xcas cmd - compsystems - 11-08-2017 09:27 PM

Without the complete control of the flags (CAS settings) in the hp-prime, many algorithms fail, for this reason the following command is important

Please HPP-TEAM include in the next update, autosimplify() Xcas cmd

autosimplify(); // returns 0/1/2
autosimplify(0); // none
autosimplify(1); // regroup or medium
autosimplify(2); // simplify or maximum


[Image: solver_xcas_step_by_step_ex0_io_image01.png]

[Image: hp_prime_autosimplifyCmd_image00.png]

PHP Code:
#cas
testBeta1():=
BEGIN
 purge
(x,y);
 print;
 print(
"autosimplify off");
 
autosimplify(0);
 
list0 := [ x^22*]; // Solving a system of two equations
 
print(""+list0);wait;
 
expr0 := subst(list0(2),list0(1)); // substitute y = x² in y = 2x + 3
 
print(""+expr0);wait;
 
expr0 := expr0-(2*3);  // substract 2x + 3 
 
print(""+expr0);wait;
 
expr0 := simplify(expr0); // simplify
 
print(""+expr0);wait;
 
expr0 := factor(expr0);
 print(
""+expr0);wait;
 
lsolx := [ part(left(expr0),1)=0part(left(expr0),2)=]; // zero factor theorem
 
wait;
 return 
lsolx;
END;
#end