# How Can I Use Conditional with Rational Domain Restrictions [duplicate]

This question already has an answer here:

I am reasking this question in a new thread. My previous post How Can I Use Solve/Reduce Output? seemed to have led to a an interesting dissussion of how to (better) solve the problem that produced the output rather than in how to use the output further as I had intended. [Perhaps it indirectly answered my question by telling me that if I wanted to know more I needed to reformulate the problem and the solution as qiven was as far as Mathematica could go with the original formulation.]

My questions is "Can I use the following result for further Mathematica calculations?" [i.e. I am not particularly interested in this solution other than using it as an example expression of a conditional with restricted domain.]

solQ= (x | y) \[Element] Rationals && -1 <= x <=
1 && (y == -Sqrt[1 - x^2] || y == Sqrt[1 - x^2])


I do know of one Mathematica function that will accept this as input:

In:= FindInstance[solQ, {x, y}, 10]

During evaluation of In:= FindInstance::fwsol: Warning: FindInstance found only 3
instance(s), but it was not able to prove 10 instances do not exist. >>

Out= {{x -> -1, y -> 0}, {x -> 100/2501, y -> 2499/2501}, {x -> 1,
y -> 0}}


[However (as an aside) this function has strange behavior when I ask for 50 instances it can only find 2 for sure!]

In:= FindInstance[solQ, {x, y}, 50]

During evaluation of In:= FindInstance::fwsol: Warning: FindInstance found only 2
instance(s), but it was not able to prove 50 instances do not exist. >>

Out= {{x -> -1, y -> 0}, {x -> 1, y -> 0}}


Are there other Mathematica functions that will accept these types of solutions (like solQ) as a valid input expressions that would help me further explore the solution? Perhaps some graphics functions? Perhaps in an Assumption? ...?

Perhaps the solution as given above satisfies a Mathematician (which I am not) by "proving" that a solution exits and giving a few examples?

Thank you all for your patience with these rather poorly defined questions [coming from a 75 year old physicist in retirement, with no cohort for discussion, just trying to (re)learn some math and Mathematica.]

## marked as duplicate by Artes, Yves Klett, Jacob Akkerboom, bobthechemist, István ZacharJan 20 '14 at 15:45

• @RonBurns solQ is a valid Mathematica expression. You can retrieve information from that, e.g. if you evaluate Plot[List @@ solQ[[3, All, 2]], {x, -1, 1}, Evaluated -> True, AspectRatio -> 1]. Does this answer your question ? – Artes Aug 3 '12 at 18:33
• @Ron Burn FindInstance[ solQ, {x, y}, 10] returns something, not exceptionally interesting, but it is better than nothing. As I demonstrated in my answer to your former question, you can still find more interesting results than FindInstance or Solve directly do. If you want to get an information from solQ you can do it but in general there is no direct procedure. If you don't like it, perhaps you'll have to wait much for more robust versions of Mathematica or any other computer algebra system otherwise you have to accustom with similar issues trying more ingenious ways. – Artes Aug 3 '12 at 19:05
• @Ron Burns If playing with Mathematica syntax is too hard, you can make use of free-form input or WolframAlpha query, shorthands (=) or (==) to find out something more from solQ. – Artes Aug 3 '12 at 19:18
• @RonBurns Solve and Reduce are powerful functions, but not as much as to give the full solution to your problem. In several cases when you restrict your domain of interest to Rationals they can give you the full solutions, but not always. It is not surprising that it cannot find all solutions however you should be pleased with solQ returned by Reduce. You shouldn't espect Mathematica to return all list of solutions : first : there are infinitely many solutions, second : they are apparently dense. You remember that the number of solutions found with P-triples was finite. – Artes Aug 3 '12 at 22:40