Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

For example, we have this curve:

$$ x^2 + y^2 = 1 $$

Is there a function in Mathematica for finding out that the ranges for $x$ and $y$ are both [-1, 1]?

What about implicit functions of more than 2 variables? e.g.

$$ x^2 + y^2 + z = 1 $$

share|improve this question
3  
Maybe Reduce[Exists[{x}, x^2 + y^2 == 1 ], Reals] : -1<=y<=1 –  andre Sep 1 '13 at 18:14
    
Great! Is there any way for applying this result to the plotting functions? –  qed Sep 1 '13 at 18:18
    
For applying the result to plotting functions, it would be hard to find a solution that is a little bit generic. –  andre Sep 1 '13 at 18:31
    
Please consider post your comment as an answer and I will gladly accept. :) –  qed Sep 1 '13 at 18:51
add comment

3 Answers

up vote 11 down vote accepted

Maybe :

Reduce[Exists[{x}, x^2 + y^2 == 1 ], Reals]

-1<=y<=1

share|improve this answer
add comment

Not sure if this will work for you, but... There is a cool blog by Roman Osipov in Russian (use Google Translate to translate):

Study of arbitrary functions by methods of mathematical analysis in the system Mathematica

I will give 2 functions from there (see the blog for more tricks). The domain of the function

DefinitionDomain[expr_, variable_: x] := 
 If[Head[#] === List, #, 
    List[#]] &@(Reduce[Element[expr, Reals] && Denominator[expr] != 0,
      variable, Reals] /. Or -> List)

The range of the function

RangeValues[expr_, variable_: x] := 
 Reduce[Or @@ 
   Cases[FullForm@
     Flatten[Reduce[y == expr, variable, Reals] /. And | Or -> List], 
    Inequality[___, y, ___] | LessEqual[_, y, _] | Less[_, y, _] | 
     y <= _ | y >= _ | y > _ | y < _ | y == _, Infinity], y, Reals]

Now, this may not be what you need, but - express explicitly what is the function and what is the argument:

f[x_] := Sqrt[1 - x^2]

Then

DefinitionDomain[f[x], x]

{-1 <= x <= 1}

and

RangeValues[f[x], x]

0 <= y <= 1

share|improve this answer
    
Perhalf it is wrong with the function f[x_] := (x^2 + x + 1) (x^2 + x + 2) –  minthao_2011 Oct 29 '13 at 10:53
add comment

Maybe what you want is CylindricalDecomposition:

CylindricalDecomposition[x^2 + y^2 < 1, {x, y}]

$-1<x<1\land -\sqrt{1-x^2}<y<\sqrt{1-x^2}$

share|improve this answer
    
This is limited to polynomial equations. –  qed Sep 1 '13 at 18:14
1  
All your examples are polynomial equations. –  Jens Sep 1 '13 at 18:24
    
:), yeah, that's true. –  qed Sep 1 '13 at 18:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.