For f(g(x)), x must first belong to the domain of g, and the resulting g(x) must belong to the domain of f. The composite domain is the set satisfying both conditions.
Two gates, in the correct order
A composition sends x through the inner function g and then through the outer function f. A valid input cannot fail at either stage. For an outer square root, its input must be nonnegative. For an outer reciprocal, its input must be nonzero. For a real logarithm, its input must be positive.
Find restrictions from the original rules before simplifying the final expression. A cancellation may hide a point where the inner function was undefined. The simplified formula agrees with the original composition only on the original domain.
Stuck on a question? Ask it here and get a step-by-step answer in seconds — pay only per answer, no subscription. Ask your doubt now →
Worked example
Let f(u) = √(u − 2) and g(x) = (x + 1)/(x − 1). The inner function requires x ≠ 1. The outer function requires g(x) ≥ 2. Therefore (x + 1)/(x − 1) − 2 ≥ 0, which simplifies to (3 − x)/(x − 1) ≥ 0.
The critical values are 1 and 3. For x < 1, the numerator is positive and denominator negative, so the fraction is negative. For 1 < x < 3, both are positive. At x = 3, the numerator is zero and the denominator is nonzero. For x > 3, the numerator is negative and denominator positive.
The domain is therefore (1, 3]. At x = 2, g(2) = 3 and f(g(2)) = 1, confirming an interior input. At x = 3, g(3) = 2 and the outer square root is zero, so this endpoint is included. The point x = 1 remains excluded because the inner function cannot be evaluated there.
The reversed order usually changes the answer
For g(f(x)), the inner square root requires x ≥ 2. The outer denominator requires √(x − 2) ≠ 1, so x ≠ 3. Its domain is [2, ∞) excluding 3. This differs from the domain of f(g(x)); composition is not generally commutative.
Common mistake
Do not multiply an inequality by x − 1 without knowing its sign. A sign chart or two separate sign cases preserves the inequality correctly. Also, distinguish ≥ 0 for a square-root argument from > 0 for a logarithm argument. Equality can change which interval endpoints are included.
Pehle inner rule chale, phir uska output outer rule mein fit ho.
Three practice questions with worked answers
-
Let f(u) = 1/u and g(x) = x − 4. Find the domain of f(g(x)).
The inner rule accepts every real x. Its output must not be zero, so x − 4 ≠ 0. The domain is all real numbers except 4.
-
Let f(u) = √u and g(x) = 1/(x − 2). Find the composite domain.
Require x ≠ 2 and 1/(x − 2) ≥ 0. The numerator is positive, so x − 2 must be positive. The domain is (2, ∞).
-
Let f(u) = ln u and g(x) = 9 − x². Find the domain.
Require 9 − x² > 0, or x² < 9. Thus −3 < x < 3. The endpoints are excluded because ln 0 is undefined.
Related study guides
Need one step explained? Open the DoubtPay study tool. Check the current credit price before requesting a paid answer, and verify the working yourself.
References and authorship
Original examples and practice questions, prepared with AI assistance and editorial arithmetic review. Related definitions and methods: OpenStax: Review of Functions. No textbook or exam-board affiliation is claimed.
Stuck on a question? Ask it here and get a step-by-step answer in seconds — pay only per answer, no subscription. Ask your doubt now →
