# How to find the domain and range of an implicit function?

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$$

• Maybe Reduce[Exists[{x}, x^2 + y^2 == 1 ], Reals] : -1<=y<=1 – andre314 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. – andre314 Sep 1 '13 at 18:31

Maybe :

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


-1<=y<=1

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] :=
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

• 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

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}$

• This is limited to polynomial equations. – qed Sep 1 '13 at 18:14
• All your examples are polynomial equations. – Jens Sep 1 '13 at 18:24
• :), yeah, that's true. – qed Sep 1 '13 at 18:31

In version 10,

RegionBounds@ImplicitRegion[x^2 + y^2 + z^2 == 1, {x, y, z}]

(* ==> {{-1, 1}, {-1, 1}, {-1, 1}} *)

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

(* ==> -1 < y < 1 *)