the functions and are defined as follows:
\[ f(x)=\frac{2x-3}{x+1}, \qquad g(x)=x^2-4. \]
A composite function \(f\circ g\) means \(f(g(x))\): the output of \(g\) becomes the input of \(f\). Domain restrictions for a composite come from two sources: restrictions already present in the inner function, and any values the inner function produces that are not allowed as inputs to the outer function.
Composition \(f\circ g\)
Substitution of \(g(x)\) into \(f\) gives
\[ (f\circ g)(x)=f(g(x))=\frac{2\cdot g(x)-3}{g(x)+1} =\frac{2(x^2-4)-3}{(x^2-4)+1}. \]
Simplification yields
\[ (f\circ g)(x)=\frac{2x^2-8-3}{x^2-3} =\frac{2x^2-11}{x^2-3}. \]
Domain of \(f\circ g\)
The function \(g\) is defined for all real \(x\). The function \(f(u)=\frac{2u-3}{u+1}\) requires \(u\ne -1\), because the denominator \(u+1\) cannot be zero. Here \(u=g(x)=x^2-4\), so the restriction becomes
\[ x^2-4\ne -1 \quad\Longleftrightarrow\quad x^2\ne 3 \quad\Longleftrightarrow\quad x\ne \pm\sqrt{3}. \]
Therefore the domain of \(f\circ g\) is all real numbers except \(x=\sqrt{3}\) and \(x=-\sqrt{3}\).
Composition \(g\circ f\)
The polynomial \(g(x)=x^2-4\) acts on the output of \(f\), so
\[ (g\circ f)(x)=g(f(x))=(f(x))^2-4 =\left(\frac{2x-3}{x+1}\right)^2-4. \]
A single rational expression is obtained by using the common denominator \((x+1)^2\):
\[ (g\circ f)(x)=\frac{(2x-3)^2}{(x+1)^2}-\frac{4(x+1)^2}{(x+1)^2} =\frac{(2x-3)^2-4(x+1)^2}{(x+1)^2}. \]
Expansion and collection of like terms gives
\[ (2x-3)^2-4(x+1)^2 =(4x^2-12x+9)-4(x^2+2x+1) =4x^2-12x+9-4x^2-8x-4 =5-20x. \]
\[ (g\circ f)(x)=\frac{5-20x}{(x+1)^2}=\frac{5(1-4x)}{(x+1)^2}. \]
Domain of \(g\circ f\)
The only restriction comes from \(f(x)=\frac{2x-3}{x+1}\), which requires \(x\ne -1\). The polynomial \(g\) places no additional restrictions on its input. Therefore the domain of \(g\circ f\) is all real numbers except \(x=-1\).
Evaluation at \(x=3\)
\[ (f\circ g)(3)=\frac{2\cdot 3^2-11}{3^2-3} =\frac{18-11}{9-3} =\frac{7}{6}. \]
\[ (g\circ f)(3)=\frac{5(1-4\cdot 3)}{(3+1)^2} =\frac{5(1-12)}{16} =-\frac{55}{16}. \]
Summary
| Composite | Simplified expression | Domain restriction | Value at \(x=3\) |
|---|---|---|---|
| \(f\circ g\) | \(\frac{2x^2-11}{x^2-3}\) | \(x\ne \pm\sqrt{3}\) | \(\frac{7}{6}\) |
| \(g\circ f\) | \(\frac{5(1-4x)}{(x+1)^2}\) | \(x\ne -1\) | \(-\frac{55}{16}\) |
Visualization of the two compositions
Common pitfalls
Composition order matters: \(f\circ g\) generally differs from \(g\circ f\) because different substitutions are performed. Domain restrictions also depend on order, since the inner function controls which values are fed into the outer function.