For the composition, x must be in Dom(g) and g(x) must be in Dom(f): so we require g(x) \neq -1.
Solve for g(x) \neq -1: \n 2x5=−1⇒5=−2x⇒x=−25.
Thus: Dom(f∘g)=(−∞,−25)∪(−25,0)∪(0,∞).
Note: The domain of the simplified form ( \frac{2x}{5+2x} ) excludes the same points: ( x \neq 0 ) (from Dom(g)) and ( x \neq -\tfrac{5}{2} ) (to avoid division by zero in the simplified form).
Example 2: New pair: f(x) = |x|, g(x) = \sqrt{2x-1}
Compute f \circ g:
(f∘g)(x)=f(g(x))=∣2x−1∣=2x−1.
Domain for this composition: require g(x) to be defined, i.e., 2x - 1 \ge 0 \Rightarrow x \ge \tfrac{1}{2}.
Compute g \circ f:
(g∘f)(x)=g(f(x))=2∣x∣−1.
Domain for this composition: require inside the square root nonnegative: 2|x| - 1 \ge 0 \Rightarrow |x| \ge \tfrac{1}{2} \Rightarrow x \le -\tfrac{1}{2} \text{ or } x \ge \tfrac{1}{2}.
DIY Problem: h(x) = \sqrt{4 - x^2}
Define: h(x)=4−x2.
Compute h \circ h:
(h∘h)(x)=h(h(x))=4−(h(x))2=4−(4−x2)2
Simplify inside: ( (\sqrt{4 - x^2})^2 = 4 - x^2 )
So, (h∘h)(x)=4−(4−x2)=x2=∣x∣.
Domain for h: require (4 - x^2 \ge 0) ⇒ ( -2 \le x \le 2 ).
Since the inner output h(x) lies in [0, 2], which is within the outer domain [-2, 2], the composition is defined on the same domain as the inner function:
Domain of ( h \circ h ) is ([ -2, 2 ]).
Result summary:
(h∘h)(x)=∣x∣,x∈[−2,2].
If desired, piecewise form on this domain is: ( (h \circ h)(x) = -x ) for ( x < 0 ) and ( (h \circ h)(x) = x ) for ( x \ge 0 ).
Quick recap: Key takeaways
General rule: Dom(f∘g)=x∈Dom(g)∣g(x)∈Dom(f)).
Always verify that the inner function’s output lies in the outer function’s domain before concluding the domain of the composition.
You can compose with itself; the process is the same as composing two distinct functions and often reveals simplifications or constraints not obvious at first glance.
Practical tip: when simplifying, keep track of domain restrictions separately from algebraic simplification to ensure the final domain is correct.