Finding the domain of $f \circ g$ where $f(x) = \sqrt{x}$ and $g(x) = \frac{x}{x-1}$. If $f(x) = \sqrt{x}$ and $g(x) = \dfrac{x}{x-1}$,
I want to find $D_{f \circ g}$ using the definition 
$$D_{f \circ g} = \{x \in D_{g}: g(x) \in D_{f} \}$$
I used that $g(x) = 1 + \dfrac{1}{x-1}$ and $D_{f}= [0, \infty[$. but I reach a contradiction that $x \in \mathbb{R} - \{1\}$ and $0 \geq x > 1$, so could anyone tell me the correct answer?
Thanks! 
 A: $x$ being in $f\circ g$'s domain is equivalent to $$\frac{x}{x-1}\geq0$$ where the left side must be defined first of all to evaluate to be $\geq0$. This will make $x$ valid input for $g$, and then make $g(x)$ valid input for $f$. The inequality is tricky because of issues with $0$, negative numbers, and inequalities. Here is one way to solve it.
$$\begin{align}
\frac{x}{x-1}&\geq0\\
1+\frac{1}{x-1}&\geq0\\
\frac{1}{x-1}&\geq-1\\
x-1&>0&\text{ or}&&x-1\leq-1\\
x&>1&\text{ or}&&x\leq0
\end{align}$$
At the step where the split happens, either $x-1$ is positive so of course its reciprocal is greater than $-1$; or $x-1$ is negative, and taking the reciprocal of both sides reverses direction of the inequality.
A: We have $x \in D_{f \circ g}$ $ \iff x>1$ or $x \le 0$.
A: \begin{align}
D_{f \circ g} 
&= \{x \in D_{g}: g(x) \in D_{f} \}\\
&= \{x \in \mathbb{R} - \{1\}: \dfrac{x}{x-1} \in D_{f} \}\\
&= \{x \in \mathbb{R} - \{1\}: \dfrac{x}{x-1} \geq0 \}\\
&= \{x \in \mathbb{R} - \{1\}: x\in(-\infty,0]\cup(1,\infty) \}\\
&= (-\infty,0]\cup(1,\infty)
\end{align}
