## Calculus 8th Edition

(a)$$(f \circ g)(x)=\frac{x+1}{x+2}+ \frac{1}{\frac{x+1}{x+2}}$$ $$D_{f \circ g}=\mathbb R -\{-2, -1 \}$$ (b) $$(g \circ f)(x)=\frac{x+ \frac{1}{x} +1}{x+ \frac{1}{x} +2}$$ $$D_{g \circ f}=\mathbb R - \{0, -1 \}$$ (c)$$(f \circ f)(x)= x+ \frac{1}{x} + \frac{1}{x+ \frac{1}{x}}$$ $$D_{f \circ f}=\mathbb R - \{0\}$$ (d)$$(g \circ g)(x)=\frac{\frac{x+1}{x+2}+1}{\frac{x+1}{x+2}+2}$$ $$D_{g \circ g}=\mathbb R - \{ -2, - \frac{5}{3} \}$$
To find domain of a real rational function, one should consider the fact that it equals the set of real numbers, $\mathbb R$, minus the set of numbers vanishing the denominator. (a)$$(f \circ g)(x)=f(g(x))=\frac{x+1}{x+2}+ \frac{1}{\frac{x+1}{x+2}}$$ $$D_{f \circ g}= \\\mathbb R - \left ( \{ \text{roots of } (x+2=0) \} \cup \left \{ \text{roots of } \left (\frac{x+1}{x+2} \right )=0 \right \} \right ) = \\ \mathbb R -\{-2, -1 \}$$ For $x \in D_{f \circ g}$, we can write this composite function as $$(f \circ g)(x)=\frac{x+1}{x+2}+\frac{x+2}{x+1}=\frac{2x^2+6x+5}{x^2+3x+2}.$$ (b)$$(g \circ f)(x)=g(f(x))=\frac{x+ \frac{1}{x} +1}{x+ \frac{1}{x} +2}$$ $$D_{g \circ f}= \\\mathbb R - \left ( \{ \text{roots of } (x=0) \} \cup \left \{ \text{roots of } \left ( x+ \frac{1}{x}+2 \right ) =0 \right \} \right )= \\ \mathbb R - \left ( \{ \text{roots of } (x=0) \} \cup \left \{ \text{roots of } \left ( x^2+2x+1 \right ) =0 \right \} \right )= \\ \mathbb R - ( \{0 \} \cup \{-1\})= \mathbb R - \{0, -1 \}$$ For $x \in D_{g \circ f}$, we can write this composite function as $$(g \circ f)(x)=\frac{x^2+x+1}{x^2+2x+1}.$$ (c)$$(f \circ f)(x)= x+ \frac{1}{x} + \frac{1}{x+ \frac{1}{x}}$$ $$D_{f \circ f}= \\\mathbb R - \left ( \{ \text{roots of } (x=0) \} \cup \left \{ \text{roots of } \left ( x+ \frac{1}{x} \right ) =0 \right \} \right )= \\ \mathbb R - \left ( \{ \text{roots of } (x=0) \} \cup \left \{ \text{roots of } \left ( x^2+1 \right ) =0 \right \} \right )= \\ \mathbb R - ( \{0 \} \cup \varnothing )= \mathbb R - \{0\}$$For $x \in D_{f \circ f}$, we can write this composition function as$$(f \circ f)(x)= \frac{x^2+1}{x}+\frac{x}{x^2+1}=\frac{x^4+3x^2+1}{x^3+x}.$$ (d)$$(g \circ g)(x)=\frac{\frac{x+1}{x+2}+1}{\frac{x+1}{x+2}+2}$$ $$D_{g \circ g}= \\\mathbb R - \left ( \{ \text{roots of } (x+2=0) \} \cup \left \{ \text{roots of } \left ( \frac{x+1}{x+2}+2 \right ) =0 \right \} \right )= \\ \mathbb R - \left ( \{ \text{roots of } (x+2=0) \} \cup \left \{ \text{roots of } \left ( 3x+5 \right ) =0 \right \} \right )= \\ \mathbb R - ( \{-2 \} \cup \{ - \frac{5}{3} \} )= \mathbb R - \{ -2, - \frac{5}{3} \}$$For $x \in D_{ g \circ g}$, we can write this composition function as $$(g \circ g)(x)=\frac{\frac{2x+3}{x+2}}{\frac{3x+5}{x+2}}=\frac{2x+3}{3x+5}.$$