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$$
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityMaybe :
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] :=
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
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}$
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 *)
Reduce[Exists[{x}, x^2 + y^2 == 1 ], Reals]
: -1<=y<=1 $\endgroup$