Post Reply 
Firmware 2021 - Scripts CAS on history view
04-17-2021, 04:02 AM (This post was last modified: 04-17-2021 04:14 AM by compsystems.)
Post: #1
Firmware 2021 - Scripts CAS on history view
Hi, I'm having trouble executing a series of statements or scripts in CAS

Example:
Deduction of quadratic equations, step by step in CAS history view

follow the next steps

A: First manually change to CAS mode, then CAS Settings SIMPLIFICATION TO NONE
[CAS]
[Shift]+[CAS]
simplify flag: None
Exact flag: ✔

B: Then run the following instructions

PHP Code:
purge(a,b,c,x); 
assume(a>0);  
(
a*x^2+b*x+c) = 0
Ans*4*a;      
expand(Ans);    
Ans+b^2;      
Ans-4*a*c;    
simplify(Ans); 
factor(Ans);   
(Ans);       
expr(replace(string(Ans),"abs","")); 
Ans-b;          
simplify(Ans);
Ans/(2*a);    
simplify(Ans);  
expr(replace(string(Ans),"-b+","-b-")); 

This is the expected result

PHP Code:
purge(a,b,c,x); [enter"No such variable a",...
assume(a>0); [entera
(a*x^2+b*x+c) = 0; [enter] (a*x^2+b*x+c) = 0
Ans
*4*a;       [enter] ((a*x^+b*+c) * 4*a) = 0
expand
(Ans);   [enter] (4*a^2*x^+4*a*b*+4*a*c) = 0
Ans
+b^2;       [enter] (4*a^2*x^+4*a*b*+4*a*+b^) = (b^2)
Ans-4*a*c;     [enter] (4*a^2*x^+4*a*b*+4*a*+b^-4*a*c) = (b^-4*a*c)
simplify(Ans); [enter] (4*a^2*x^+4*a*b*+b^2) = (-4*a*+b^2)  
factor(Ans);   [enter] (2*a*+b)^2) = (-4*a*+b^2)
(Ans);        [enter] (abs(2*a*+b)) = ((-4*a*+b^2))
expr(replace(string(Ans),"abs","")); [enter] (2*a*+b) = ((-4*a*+b^2))
Ans-b;          [enter] (2*a*+-b) = ((-4*a*+b^2)-b)
simplify(Ans);  [enter] (2*a*x) = ((-4*a*+b^2)-2*b)
Ans/(2*a);      [enter] (2*a*x/(2*a)) = (-b+(-4*a*c+b^2))/(2*a)
simplify(Ans);  [enter= (-b+(-4*a*c+b^2))/(2*a)
expr(replace(string(Ans),"-b+","-b-")); [enter= (-b-[b^2-4*a*c])/(2*a

[Image: script_cas_hp_prime_2021_img00.png]

but now sometimes expressions or numbers are floated ((4. *a^2*x^2 +4. *a*b*x +4. *a*c) = 0) and the symbolic calculation is lost, please tell me if the same thing happens to you too.

[Image: script_cas_hp_prime_2021_img01.png]

mechanical binary calculator https://www.youtube.com/watch?v=NQX6irk11qA
Find all posts by this user
Quote this message in a reply
Post Reply 




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