#### 6.26 allvalues, number of solutions (3.4.00)

Can anyone give an explanation for the following strange behaviour of Maple V.5.1 (it is
clear that the system represents the intersection of a circle and a parabola):

`allvalues( solve( {x^2+y^2-1,x^2-y} , {x,y} ) ):`

Nevertheless, Maple returns 8 (!) points (in fact there are two real solutions and two complex
-non real- ones). The 4 extra points that Maple returns do not satisfy the original
equations.

RootOf() has been remarkably extended in maple6. One gets the following four solutions in
maple6:

> restart;
> x^2+y^2-1,x^2-y;
> solve({%},{x,y});
2 2
{x = RootOf(-RootOf(_Z + _Z - 1, label = _L1) + _Z , label = _L2),
2
y = RootOf(_Z + _Z - 1, label = _L1)}
> allvalues(%);
{y = - 1/2 + 1/2 sqrt(5), x = 1/2 sqrt(-2 + 2 sqrt(5))},
{y = - 1/2 + 1/2 sqrt(5), x = - 1/2 sqrt(-2 + 2 sqrt(5))},
{x = 1/2 sqrt(-2 - 2 sqrt(5)), y = - 1/2 - 1/2 sqrt(5)},
{x = - 1/2 sqrt(-2 - 2 sqrt(5)), y = - 1/2 - 1/2 sqrt(5)}

As far as I know, you cannot avoid those many solutions, of which only a part is appropriate.
As in many cases, in your case "solve" returns RootOf-expressions, telling that the solutions
are among the roots of certain polynomials. allvalues returns all roots of these polynomials,
even those that are no solutions to the original problem. The only way I know is to insert the
"solutions" found into the original equations, as is demonstrated in the following
piece of Maple code. You may rewrite the loop for automatically discarding the
"non-solutions".

> solve( {x^2+y^2-1,x^2-y} , {x,y} );
> restart;
> equat:=x^2+y^2-1,x^2-y;
> solve({equat},{x,y});
> Solution:=allvalues(%);
> for i to nops([Solution]) do
> i,simplify(subs(Solution[i],[equat])),Solution[i],evalf(Solution[i])
> od;

On the other hand, fsolve returns only one solution at a time. You can look for the second
solution by giving a search interval. Hence you need to have an idea in advance,
how many solutions exist and where they approximately are situated (e.g. by a
graph).

> fsolve({equat},{x,y});
> fsolve({equat},{x,y},{x=0..1});# if the first statement found the
# "negative x solution"