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

• What happens to the inequality sign when you multiply by negative numbers? This is the reason for the domain. Jan 9, 2019 at 0:07
• I know the inequality changes when we multiply it by a negative number, however my computation was this: (1-x)/x ≥ 0 implies 1/x -1 ≥ 0 implies 1/x ≥ 1 implies 1 ≥ x, so I don't think I multiplied by a negative number anywhere. Also, the module only includes real functions of 1 variable, so "the natural domain" kind of means "Find all real x such that the output is real and defined" I guess. Feel free to point any further mistakes.
– user600210
Jan 9, 2019 at 0:14
• This being an algebra-precalculus question, I know that the formality behind "domain" is watered down, so I know what you meant in your question. Your process works only for when $x > 0$. When $x < 0$, the inequality sign would flip. Jan 9, 2019 at 0:17
• After it "flips", what resultant inequality would you get? Jan 9, 2019 at 0:18
• Ohh I just saw it... my mind is not functioning properly today I guess. Any helpful tips on how to find the range?
– user600210
Jan 9, 2019 at 0:32

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

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.

• Thanks for that... I usually mindlessly find the domain of the inverse of f, and that's what I did here as well, obviously omitting crucial stuff. Thanks! (Note: the calculation of the monotonicity, the right-handed limit of f to 0 and f(1), while a bit more tedious, would have given me the correct range, so I guess i shot my own foot there)
– user600210
Jan 9, 2019 at 0:53
• lol understandable, it took me a second to figure it out too. And yeah, those arguments are valid too and probably way more formal than my lame heuristic appeal to intuition. :p Jan 9, 2019 at 0:55