## solve([x=1,y=2],[x,y])

Messages in english

niccolo
Messages : 22
Inscription : dim. mars 02, 2014 2:13 pm

### solve([x=1,y=2],[x,y])

Hello!

The following works:

Code : Tout sélectionner

``solve([x=1,y=2],[x,y])``
But when I do:

Code : Tout sélectionner

``solve([x=1,y=2],[x])``
I don't get any solution. Why is that?

niccolo
Messages : 22
Inscription : dim. mars 02, 2014 2:13 pm

### Re: solve([x=1,y=2],[x,y])

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?

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

### Re: solve([x=1,y=2],[x,y])

Yes, it's an and. For example solve([x^2-1=0,(x-1)*(x-2)=0],[x]) returns .