autosimplify(0)

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 603
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

autosimplify(0)

Message par compsystems » dim. nov. 19, 2017 10:22 pm

Hi, why on line # 6 is simplifying the left side when the simplification flag is disabled

Code : Tout sélectionner

1: xcas_mode(0);autosimplify(0);approx_mode(0);

2: x^2=(2*x+3)
x^2=(2*x+3)

3: ans(-1)-(2*x + 3)
-2*x-3+x^2=(2*x+3-2*x-3)

4:simplify(ans(-1))
x^2-2*x-3=0

5: (x*y/2) = (x^2+y^2)/4
(x*y/2) = (x^2+y^2)/4

6: ans(-1)-(x*y/2)
0=((x^2+y^2)/4-x*y/2)  // (x*y/2)-(x*y/2) = (x^2+y^2)/4 - (x*y/2)

7:simplify(ans(-1))
0=((x^2-2*x*y+y^2)/4)

8: ans(-1)*4
0=((x^2-2*x*y+y^2)*4/4)

9:simplify(ans(-1))
0=(x^2-2*x*y+y^2)
Xcas has a command to invert the left side by the right and vice versa?

A=B -> B=A

parisse
Messages : 5882
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: autosimplify(0)

Message par parisse » lun. nov. 20, 2017 5:57 am

x-x is always simplified to 0.
left and right extract the left and right part of an equation.

compsystems
Messages : 603
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: autosimplify(0)

Message par compsystems » lun. nov. 20, 2017 12:51 pm

In following line 3 does not give zero, I hope that with autosimplify(0), the symbolic expressions are not simplified, only the numerical expressions, this with the purpose of showing intermediate steps.


with autosimplify(0)

1: (2*a+3)-(2*a+3)
2*a+3-2*a-3

2: x:=(2*a+3)
(2*a+3)

3: x-x
2*a+3-2*a-3

4: simplify(ans(-1))
0

/////

the classpad have a cmd for swap left with right part
exchange(x=y)
y=x

very important instruction to show algebraic manipulation

parisse
Messages : 5882
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: autosimplify(0)

Message par parisse » mar. nov. 21, 2017 6:40 am

exchange(eq):=right(eq)=left(eq);
exchange(x=y)
I can't write hundreds of builtin instructions just for you, write your own list in a file and read it at start.

compsystems
Messages : 603
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: autosimplify(0)

Message par compsystems » mar. nov. 21, 2017 12:36 pm

Hi BP, the instructions are not just for me, it is for the whole community that uses Xcas, the functions that I propose are not specific use functions, they are functions that are in other packages of symbolic mathematics, and specifically for the algebraic manipulation, which is what Xcas should promote, not functions type black box input/output

parisse
Messages : 5882
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: autosimplify(0)

Message par parisse » mar. nov. 21, 2017 1:14 pm

Perhaps you did not read carefully: all is about *builtin*. Why should I add very basic *builtin* functions when it is straightforward to build them with the available builtin functions ? I'm not convinced there is real interest in this from many people. I think it's better to teach people how to improve the system themselves on simple things, then they can also do it on more complicated things. If I'm wrong, then show me why.

Répondre