Find the domain and range of a function The question is: find the domain and range of $f(x) = \sqrt{{(1-x)}/x}$.
For the domain, I took $x ≠ 0$ and $(1-x)/x ≥ 0$, which gave me $1 ≥ x$.
So the domain I found is $(-∞,0)∪(0,1]$. However, the proposed solution says that the domain is just $(0,1],$ without explaining, so I wonder why.
Also, any quick tip to find the range (without taking monotonicity, roots, limits to infinity etc.)? I tried inverting the function and the domain of the inverse is $\Bbb R$, which is clearly not the range of $f$.
Thanks in advance!
 A: $f(x) = \sqrt{\frac {1-x}x}$ which is undefined if $x =0$ and if $\frac {1-x}x = \frac 1x - 1 < 0$.  $x\ne 0$ and $\frac 1x -1 < 0 \implies \frac 1x \ge  1$.   
If $x > 0$ then $\frac 1x \ge 1 \implies x \le 1$ and if $x < 0$ implies $x \ge 1$ which is a contradiction so $0 < x \le 1$ and domain is $(0,1]$.
[Alternatively $\frac 1x \ge 1 > 0$ so $\frac {\frac 1x}{\frac 1x} \ge \frac 1{\frac 1x}>\frac 0{\frac 1x} \implies 1 \ge x > 0$.]
As for range.
Now that we know $0 < x \le 1$ then $\frac 1x \ge 1$ and $\frac 1x - 1 \ge 0$ and $\frac {1-x}x = \frac 1x -1 \ge 0$ and $\sqrt{\frac {1-x}x} \ge 0$ with no restrictions.
That implies the range is $[0, \infty)$.
But just to make certain we should test if $\sqrt{\frac {1-x}x} = m$ is solvable for all $m \ge 0$.
$\sqrt{\frac {1-x}x} = m \ge 0 \implies$
$\frac{1-x}x =\frac 1x- 1= m^2 \implies$
$\frac 1x = m^2 + 1$.  So $m^2 + 1 \ge 1$ we can conclude
$x = \frac 1{m^2 + 1}$ and that exists for all possible $m\ge 0$
So range is all $[0, \infty)$
A: 
So the domain I found is $(-∞,0)∪(0,1]$. However, the proposed solution says that the domain is just $(0,1],$ without explaining, so I wonder why.

Suppose you take $f(x)$ for $x < 0$.
Then you know $1 - x > 0$, and $x < 0$.
Thus, since dividing a positive by a negative is a negative,
$$\frac{1-x}{x} < 0$$
Since you're contending with a function of real values here, you can't have the radicand be negative. That's why the domain of $f$ is only $(0,1]$.


Also, any quick tip to find the range (without taking monotonicity, roots, limits to infinity etc.)? I tried inverting the function and the domain of the inverse is $\Bbb R$, which is clearly not the range of $f$.

Whenever easily doable, as noted, taking the inverse is the way to go. However, I believe you made a slight oversight in investigating said inverse. I'll start from the beginning for completion's sake.
Let
$$y = \sqrt{ \frac{1-x}{x} } = \sqrt{ \frac{1}{x} - 1}$$
Solving for $x$ (i.e. getting the inverse) yields
$$x = \frac{1}{y^2 + 1}$$
Now, in this context, "range" means the set of values $f$ maps to on its domain. In other words, since the domain of $f$ is $(0,1]$, we're looking at the inverse for which $y$ values map to that interval.
You can easily confirm this by looking at either the graph of $f$ or $f^{-1}$ depending on the interpretation you want to fiddle with. But, analytically, we note:


*

*$0 < x \leq 1$ gives us our inputs $x$.

*Can $f^{-1}$ be greater than $1$? (Hint: notice: $y^2 \geq 0$.)

*Can $f^{-1}$ be less than $0$? (Hint: notice from the previous that the numerator and denominator are always positive.)


Depending on how formal/informal your argument could be, utilizing the previous and the fact that we're looking at the image of $(0,1]$ under $f$ might be sufficient. Again, graphs are also useful for all this. (They're not a substitute for a proof, but they can be very useful in seeing what to do.)
Of course, we conclude that the above seems to imply the image of $f$ is $\Bbb R$ since we never really restricted the values of $y$. All the above really seem to show is that any $y$ can give us an $x$ in our domain. 
(This might be touching on your error: it's always useful to reconsider, after analyzing the inverse, to see if the values you found up to now can be mapped to.)
However, if $y$ is in the image of $f$, that means there exists some $x$ so that $f(x) = y$, right? Then suppose $y<0$ - it should be immediately obvious why the negative real numbers are not in the image of $f$, namely because we take the principal square root, i.e. $f$ is always positive or zero.
So with these observations in mind, it becomes clear then that the range of $f$ is not all real numbers - just the nonnegative ones.
