## Calculus, 10th Edition (Anton)

$$(f \circ g)(x)=\frac{1}{1-2x}$$ $$(g \circ f)(x)=-\frac{1+x}{2x}$$ $$D_{f \circ g}= \mathbb{R} - \{ 1, \frac{1}{2} \}$$ $$D_{g \circ f}= \mathbb{R}- \{ 1, 0 \}$$
$$(f \circ g)(x)=f(g(x))=\frac{1+\frac{x}{1-x}}{1- \frac{x}{1-x}}=\frac{1}{1-2x}$$ $$(g \circ f)(x)=g(f(x))=\frac{\frac{1+x}{1-x}}{1-\frac{1+x}{1-x}}=-\frac{1+x}{2x}$$ The domain of $f \circ g$ consists of all $x$ in the domain of $g$ for which $g(x)$ is in the domain of $f$. So we have $$D_{f \circ g}= \{ x \neq 1 \mid \frac{x}{1-x} \neq 1 \}= \mathbb{R} - \{ 1, \frac{1}{2} \}$$ $$D_{g \circ f}= \{ x \neq 1 \mid \frac{1+x}{1-x} \neq 1 \}=\mathbb{R}- \{ 1, 0 \} .$$