IDEA: More explicit solutions for a didactic contex

Messages in english

Modérateur : xcasadmin

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

IDEA: More explicit solutions for a didactic contex

Message par compsystems » dim. juin 25, 2017 3:09 am

Hello Bernard

Students find it difficult to interpret only numerical solutions array[[#,#,...#], [#,#,...#],....[#,#,...#]], an idea to present the real symbolic output as math books is to use the AND, OR operators as symbols (∧, ∨), in this way does not affect the core of the algebraic motor.

solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]) returns

[[1,1],[2.19343941542,3.02046646812]]

solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]) More a didactic view flag returns

(x=1 ∧ y=1) ∨ (x=2.19343941542 ∧ y=3.02046646812)

exp2list(ans(-1)) returns
[[1,1],
[2.19343941542,3.02046646812]]

or a new cmd list2expr( array, vars )

solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]) returns

[[1,1],[2.19343941542,3.02046646812]]

list2expr(ans(-1),{x,y}) returns
(x=1 ∧ y=1) ∨ (x=2.19343941542 ∧ y=3.02046646812)

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

Re: IDEA: More explicit solutions for a didactic contex

Message par parisse » dim. juin 25, 2017 6:24 am

This is already the case in TI mode, with and or (I don't want to support notations that you can not get from the keyboard, like ∧).
I can add a list2exp command to postprocess solutions in Xcas mode ... but I'm not convinced it's easier for students, because you can't do anything further with a symbolic answer.

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

Re: IDEA: More explicit solutions for a didactic contex

Message par compsystems » dim. juin 25, 2017 3:39 pm

parisse a écrit :This is already the case in TI mode
TI-mode: Works very well (Explicit output)
solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]) returns on I/O of expressions
((x=1) and (y=1)) or ((x=2.19343941542) and (y=3.02046646812))
you can't do anything further with a symbolic answer.
then, an extra step is required for use within a program, using the EXPR2LIST command

exp2list(((x=1) and (y=1)) or ((x=2.19343941542) and (y=3.02046646812))) returns
[[1,1],[2.19343941542,3.02046646812]]

or extracting the parts

part(solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]),1) returns or
part(solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]),1) returns (x=1) and (y=1)
part(solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]),2) returns (x=2.19343941542) and (y=3.02046646812)

part(part(solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]),1),0) returns and
part(part(solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]),1),1) returns (x=1)
part(part(solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]),1),2) returns (y=1)

part(part(solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]),2),0) returns and
part(part(solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]),2),1) returns x=2.19343941542
part(part(solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]),2),2) returns y=3.02046646812

or using []

solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y])[1] returns 'or'
solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y])[2] returns '(x=1) and (y=1)'
solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y])[2,1] returns 'and'
solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y])[2,2] returns 'x=1'
solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y])[2,3] returns 'y=1'
solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y])[3] returns (x=2.19343941542) and (y=3.02046646812)
solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y])[3,1] returns 'and'
solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y])[3,2] returns x=2.19343941542
solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y])[3,3] returns y=3.02046646812
I don't want to support notations that you can not get from the keyboard, like ∧, ∨
I share your position, everything should be possible to write it from the PC keyboard,
but the future is to operate on touch screens, in addition the GUI of Giac has a virtual keyboard that can access symbols not available from the PC keyboard, One more solution, you can do a combination of keys to place the math characters.

[Alt] + [^] = ∧ (and)
[Alt] + [|] = ∨ (or)

I think we should reincorporate mathematical keyboards on computers, the current keyboards are designed for narrative text, non-scientific writing

Image

I also think that it is very necessary to support of Giac the special mathematical symbols ∧, ∨ available in UNICODE,
because

ti-mode
sols:=solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]) returns
((x=1) and (y=1)) or ((x=2.19343941542) and (y=3.02046646812))

but
exp2list(sols) return false
Because it makes a comparison of equal expressions
(x=1) and (y=1) -> (x=1) == (y=1) -> false
Then inside a program I can not use the exp2list command =(

Should be displayed in ti-mode
sols:=solve([x^2-10*x+y^2+8=0,x*y^2+x-10*y+8=0],[x,y]) returns
((x=1) ∧ (y=1)) ∨ ((x=2.19343941542) ∧ (y=3.02046646812))
exp2list(sols,{x,y})
[[1,1],[2.19343941542,3.02046646812]]
I can add a list2exp command to postprocess solutions in Xcas mode


Thank you very much, I hope this command soon, because I am doing some presentations with XCAS and I want to show my students of first levels, output solutions more comprehensible at first sight

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

Re: IDEA: More explicit solutions for a didactic contex

Message par parisse » lun. juin 26, 2017 3:54 pm

list2exp(list of lists,variable) is now available.

Répondre