Activity 2.6.1.
Compose the functions \(f(x) = \frac{1}{x+4}\) and \(g(x) = x^2 - 4\) in both orders. Determine the domain of both compositions.
Solution.
For the composition \(f \circ g\text{,}\) \(f\) is the outside function and \(g\) is the inside function. I use the function \(g\) to replace the variable in the function \(f\text{.}\)
\begin{equation*}
f \circ g(x) = \frac{1}{(x^2-4) + 4} = \frac{1}{x^2}
\end{equation*}
In the resulting function, I need to exclude \(x = 0\) to avoid division by zero. The inside function \(g\) has no restrictions, so there are no other domain concerns and the domain is all real numbers except 0.
For the composition \(g \circ f\text{,}\) \(g\) is the outside function and \(f\) is the inside function. I use the function \(f\) to replace the variable in the function \(g\text{.}\)
\begin{equation*}
g \circ f(x) = \left( \frac{1}{x+4} \right)^2 - 4 =
\frac{1}{(x+4)^2} - 4
\end{equation*}
In the resulting function, I need to exclude \(x = -4\) to avoid division by zero. The inside function \(f\) has the same restriction, \(x \neq -4\text{,}\) so there are no other domain concerns and the domain is all real numbers except \(-4\text{.}\)