How to find the domain of a composite function

When we plug one function into another, the input has to make it through both steps. Sometimes the expression simplifies enough to hide a restriction, so we’ll keep track of the inputs as we go.

Check both functions in order

In (f∘g)(x)=f(g(x)), start with an input x for the inside function g. Then check that the output g(x) is an allowed input for the outside function f. The composite includes only the inputs that pass both checks.

Example with a square root inside

Let f(x)=x2-3 and g(x)=x+9. The inside function requires x+9≥0, so x≥-9. The outside function is a polynomial, so it accepts every real output from g.

f(g(x))=(x+9)2-3=x+9-3=x+6

The rule x+6 is the simplified expression on the allowed domain. At x=-9, the square root is zero and the composite is -3. Values below -9 still cannot enter g, so the domain is [-9,∞).

Example with restrictions in both denominators

Let f(u)=22u+4 and g(x)=3x-5. The inside denominator requires x≠5. The outside denominator requires u≠-2, so find the input that would make g(x)=-2.

3x-5=-23=-2(x-5)x=72

We can also see both restrictions by writing out the composite. Multiply the numerator and denominator of the complex fraction by x-5. That step uses the condition x≠5.

f(g(x))=22(3x-5)+4=2(x-5)6+4(x-5)=x-52x-7
Which inputs are excluded
InputWhy it’s excluded
5The inside denominator is zero.
72The inside output makes the outside denominator zero.

The composite has all real inputs except 5 and 72. The simplified formula would give zero at 5, but there is no value of g(5) to put into f.

Try it yourself

Let the inside function be 1/x and the outside function be 1/x as well. What is their composition, and is zero in its domain?

Show solutionHide solution

For any nonzero input, taking the reciprocal twice gives back x. At zero, the very first reciprocal is undefined. The composition equals x for every real x except zero.

If you’re deciding which expression goes inside the other, review how to build a composite function.