Page 1 sur 1
solve([x=1,y=2],[x,y])
Publié : mer. juin 12, 2019 5:57 pm
par niccolo
Hello!
The following works:
But when I do:
I don't get any solution. Why is that?
Re: solve([x=1,y=2],[x,y])
Publié : mer. juin 12, 2019 6:13 pm
par niccolo
I suspect I understand why. It's because "x=1" (the solution I was expecting) isn't a solution to the set of equations.
In other words, it's as if giac does "subst(equation_set, solution)" and if not *all* the equations in equation_set evaluate to 'true', it's not considered a solution.
E.g., "subst([x=1,y=2],[x=1])" evaluates to "[1=1,y=2]", and while "1=1" is 'true', "y=2" isn't!
OTOH, "subst([x=1,y=2],[x=1,y=2])" evaluates to "[1=1,2=2]", and both "1=1" and "2=2" are 'true'.
Am I right in my understanding?
Re: solve([x=1,y=2],[x,y])
Publié : mer. juin 12, 2019 7:17 pm
par parisse
Yes, it's an and. For example solve([x^2-1=0,(x-1)*(x-2)=0],[x]) returns [1].