Defining the domain of positive real numbers
There's a misunderstanding here. The third "dom" argument is not simply a set over which we solve the equation. There are only a few choices that can be used for the domain argument, and they have very specific effects on how Solve
works. An example from the documentation:
If dom is Reals, or a subset such as Integers or Rationals, then all constants and function values are also restricted to be real.
So you can't use e.g.
Solve[x^2 == 1, x, Interval[{0, Infinity}]]
The proper way to do this, as @belisarius said, is to append the constraint to the system of equations:
Solve[x^2 == 1 && x > 0, x]
In version 10 we can also do
Solve[x^2 == 1 && x ∈ Interval[{0, Infinity}], x]
or even
Solve[x^2 == 1, x ∈ Interval[{0, Infinity}]]
New in Mathematica 12 is PositiveReals
(and others like NonNegativeIntegers
, etc):
Solve[x^2 == 1, x, PositiveReals]
{{x -> 1}}
{Solve [ x^2 == 1, {x}], Solve [ x^2 == 1 && x > 0, {x}]}
(* {{{x -> -1}, {x -> 1}}, {{x -> 1}}}*)