Error with list2expr
Modérateur : xcasadmin
-
- Messages : 558
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Error with list2expr
Hello BP, in the last version I observe
1: linsolve([x+y=(1+√2)/2, x-y=(1-√2)/2],[x,y])
[1/2,1/(sqrt(2))]
2: list2exp(ans(-1),[x,y])
error
3: list2exp(linsolve([x+y=(1+√2)/2, x-y=(1-√2)/2],[x,y]),[x,y])
error
4: list2exp([[1/2,1/(sqrt(2))]],[x,y])
(x=1/2) and (y=(1/sqrt(2)))
---
5: linsolve([x+2*y=5,1/2*x+y=5/2],[x,y])
[-2*y+5,y]
6: list2exp(linsolve([x+2*y=5,1/2*x+y=5/2],[x,y]),[x,y])
error
7: list2exp([[-2*y+5,y]],[x,y])
(x=-2*y+5) and (y=y) =)
1: linsolve([x+y=(1+√2)/2, x-y=(1-√2)/2],[x,y])
[1/2,1/(sqrt(2))]
2: list2exp(ans(-1),[x,y])
error
3: list2exp(linsolve([x+y=(1+√2)/2, x-y=(1-√2)/2],[x,y]),[x,y])
error
4: list2exp([[1/2,1/(sqrt(2))]],[x,y])
(x=1/2) and (y=(1/sqrt(2)))
---
5: linsolve([x+2*y=5,1/2*x+y=5/2],[x,y])
[-2*y+5,y]
6: list2exp(linsolve([x+2*y=5,1/2*x+y=5/2],[x,y]),[x,y])
error
7: list2exp([[-2*y+5,y]],[x,y])
(x=-2*y+5) and (y=y) =)
Re: Error with list2expr
Yes, that's because linsolve returns a unique solution instead of a list of solutions. Will be fixed.
-
- Messages : 558
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: Error with list2expr
I do not know, if it is important to add an extra parameter '=' to get more quickly input and the most 'explicit' form output
1: linsolve( [x+y=(1+√2)/2, x-y=(1-√2)/2], [x, y] )
[ 1/2, 1/(sqrt(2)) ]
2: linsolve( [x+y=(1+√2)/2, x-y=(1-√2)/2], [x, y], '= ' )
[ x=1/2, y=(1/sqrt(2) ]
1: linsolve( [x+y=(1+√2)/2, x-y=(1-√2)/2], [x, y] )
[ 1/2, 1/(sqrt(2)) ]
2: linsolve( [x+y=(1+√2)/2, x-y=(1-√2)/2], [x, y], '= ' )
[ x=1/2, y=(1/sqrt(2) ]
Re: Error with list2expr
Ok, I will add '=' as an optional arg for linsolve, this is coherent with solve.
-
- Messages : 558
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: Error with list2expr
Thanks Mr Bernard.
and with desolve and similar cmds
desolve(((y')'+y) = 0,y) returns
G_0*cos(x)+G_1*sin(x)
desolve(((y')'+y) = 0,y, '=' )
y(x)=G_0*cos(x)+G_1*sin(x)
and with desolve and similar cmds
desolve(((y')'+y) = 0,y) returns
G_0*cos(x)+G_1*sin(x)
desolve(((y')'+y) = 0,y, '=' )
y(x)=G_0*cos(x)+G_1*sin(x)
-
- Messages : 558
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: Error with list2expr
Hello, the inverse function exp2list, automatically changes to ti68k mode flag, this causes that when the code is re-executed the outputs fail, the exp2list command must not change the flag automatically to ti68k mode.
Re: Error with list2expr
I can't reproduce, I tried with the first example of the help.
-
- Messages : 558
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: Error with list2expr
hello, there's no problem with exp2list, it's with list2exp, with linsolve,
list2exp(linsolve([equal(x+y,(1+√2)/2),equal(x-y,(1-(√2))/2)],[x,y]),[x,y]) // change to ti89 mode
//
As the list2exp and exp2list commands are new please can rename to list2expr and expr2list, with the purpose of differences the EXPonential function of EXPRession
Thanks
list2exp(linsolve([equal(x+y,(1+√2)/2),equal(x-y,(1-(√2))/2)],[x,y]),[x,y]) // change to ti89 mode
//
As the list2exp and exp2list commands are new please can rename to list2expr and expr2list, with the purpose of differences the EXPonential function of EXPRession
Thanks
Re: Error with list2expr
I don't think it's worth the effort. Students running desolve are at a higher level of math, they can certainly understand the current form for the solution (or if they don't, the problem will most probably be with the integration constants).compsystems a écrit : ↑ven. août 10, 2018 2:19 pmThanks Mr Bernard.
and with desolve and similar cmds
desolve(((y')'+y) = 0,y) returns
G_0*cos(x)+G_1*sin(x)
desolve(((y')'+y) = 0,y, '=' )
y(x)=G_0*cos(x)+G_1*sin(x)
Re: Error with list2expr
It works with the current devel version.compsystems a écrit : ↑jeu. août 16, 2018 2:05 pmhello, there's no problem with exp2list, it's with list2exp, with linsolve,
list2exp(linsolve([equal(x+y,(1+√2)/2),equal(x-y,(1-(√2))/2)],[x,y]),[x,y]) // change to ti89 mode