Maths4UBETA

Composite functions and their domains

Apply the inside function first, and check that its output is allowed by the outside function.

Try the quick check →
Lesson 2 of 5

Section 1 of 6 · Core · about 4 min

Which function acts first?

In the first lesson, f(x)=5−2xf(x)=5-2x took 22 to 11. Now let g(x)=x+1g(x)=x+1 for all real xx. Start at 11, add 11 using gg, then put the result into ff. You have found fg(1)fg(1).

For fg of 1, g takes 1 to 2 and f takes 2 to 1. For gf of 1, f takes 1 to 3 and g takes 3 to 4.

Worked example

Follow the number through the two rules

For f(x)=5−2xf(x)=5-2x, −2≤x<3-2\le x<3, and g(x)=x+1g(x)=x+1, x∈Rx\in\mathbb R, find fg(1)fg(1) and gf(1)gf(1).

  1. For fg(1)fg(1), start with g(1)=2g(1)=2. The value 22 is allowed in ff, so fg(1)=f(2)=1fg(1)=f(2)=1.

  2. For gf(1)gf(1), start with f(1)=3f(1)=3. Now 33 goes into gg, which accepts every real input. So gf(1)=g(3)=4gf(1)=g(3)=4.

Your turn

Let p(x)=2x+3p(x)=2x+3 and q(x)=x−4q(x)=x-4 for all real xx. Find pq(6)pq(6).

Enter the value on its own or write pq(6) = … . Fractions and exact square roots are accepted.

Section 2 of 6 · Core · about 6 min

How do I build the formula in either order?

Work with xx instead of a single number. Write the outside rule with an empty input, then put the whole inside expression into that space.

Worked example

Replace the number with x

Using the same f(x)=5−2xf(x)=5-2x and g(x)=x+1g(x)=x+1, find the two composite formulae wherever they are defined.

  1. For fgfg, the inside rule gives x+1x+1. Replace the input of ff with x+1x+1.

    fg(x)=5−2(x+1)=3−2x.fg(x)=5-2(x+1)=3-2x.
  2. For gfgf, the inside rule gives 5−2x5-2x. The outside rule gg adds 11.

    gf(x)=(5−2x)+1=6−2x.gf(x)=(5-2x)+1=6-2x.
  3. At x=1x=1, the formulae give 11 and 44, matching the two calculations in the previous section. Now check which other inputs are allowed.

Worked example

Replace every input in a quadratic rule

Let a(x)=x2+2xa(x)=x^2+2x and b(x)=x−3b(x)=x-3 on the real numbers. Find ab(x)ab(x) and ba(x)ba(x).

  1. Write the outside rule as a(t)=t2+2ta(t)=t^2+2t. Both places marked tt receive x−3x-3.

    ab(x)=(x−3)2+2(x−3).ab(x)=(x-3)^2+2(x-3).
  2. Expand the square and the linear term to get ab(x)=x2−4x+3ab(x)=x^2-4x+3.

  3. With bb on the outside, subtract 33 from the entire output of aa.

    ba(x)=x2+2x−3.ba(x)=x^2+2x-3.

Your turn

Let a(x)=x2−3xa(x)=x^2-3x and b(x)=2x+1b(x)=2x+1 for all real xx. Give the right-hand side of ab(x)ab(x). Either expanded or bracketed form is fine.

Enter an expression in x; use ^ for powers and / for fractions.

Your turn

For those same rules, a(x)=x2−3xa(x)=x^2-3x and b(x)=2x+1b(x)=2x+1, give the right-hand side of ba(x)ba(x).

Enter an expression in x; use ^ for powers and / for fractions.

Section 3 of 6 · Core · about 7 min

Which inputs get through both functions?

With g(x)=x+1g(x)=x+1, an input of 22 gives g(2)=3g(2)=3. The original function f(x)=5−2xf(x)=5-2x has domain −2≤x<3-2\le x<3. Since it cannot take 33, the calculation of fg(2)fg(2) stops there.

The allowed inputs of fg run from closed minus 3 to open 2. Adding 1 sends them to the interval from closed minus 2 to open 3, which is the domain of f.

Worked example

Find the inputs that pass both checks

For f(x)=5−2xf(x)=5-2x on [−2,3)[-2,3) and g(x)=x+1g(x)=x+1 on R\mathbb R, which inputs work in fgfg? Which work in gfgf?

  1. For fgfg, gg can start at any real xx. The intermediate value x+1x+1 must belong to [−2,3)[-2,3).

    −2≤x+1<3.-2\le x+1<3.
  2. Subtract 11 throughout. The inputs that work are −3≤x<2-3\le x<2, or [−3,2)[-3,2). In particular, x=−3x=-3 works and x=2x=2 does not.

  3. For gfgf, start with the given domain of ff, [−2,3)[-2,3). Every output of ff is real and gg accepts every real number, so there is no further restriction.

Your turn

Let p(t)=t2p(t)=t^2 on 0≤t<50\le t<5, and q(x)=9−2xq(x)=9-2x on −1≤x≤4-1\le x\le4. Restrict qq to the inputs that give a value for pq(x)pq(x). Give that complete interval.

Use inequalities in x or interval notation. Join intervals with ‘or’ or ∪. Enter an isolated value on its own.

Your turn

Use q(x)=9−2xq(x)=9-2x on its whole stated domain −1≤x≤4-1\le x\le4. Give its largest output to show why pqpq cannot be formed on that whole domain.

Enter the value on its own or write y = … . Fractions and exact square roots are accepted.

Section 4 of 6 · Core · about 6 min

What if the outside rule contains a square root?

Let q(x)=x2+3q(x)=x^2+3 on −4≤x<3-4\le x<3. If the outside rule is p(t)=t−7p(t)=\sqrt{t-7}, it only accepts values t≥7t\ge7. Look for both parts of the graph of qq at or above 77.

The restriction of y = x squared plus 3 from x = minus 4 to x = 3 meets y = 7 at x = minus 2 and x = 2. The allowed branches run from minus 4 to minus 2, and from 2 up to but excluding 3.

Worked example

Find two intervals from one square root

For p(t)=t−7p(t)=\sqrt{t-7} on t≥7t\ge7, and q(x)=x2+3q(x)=x^2+3 on −4≤x<3-4\le x<3, find pq(x)pq(x) and its domain.

  1. The outside rule needs q(x)≥7q(x)\ge7, so x2+3≥7x^2+3\ge7, or x2≥4x^2\ge4.

  2. This is true when x≤−2x\le-2 or x≥2x\ge2. The endpoints −2-2 and 22 give a square root of zero, so both are allowed.

  3. Restrict both branches to the stated interval [−4,3)[-4,3). The composite is pq(x)=x2−4pq(x)=\sqrt{x^2-4} on [−4,−2]∪[2,3)[-4,-2]\cup[2,3).

Your turn

Let p(t)=t−13p(t)=\sqrt{t-13} for t≥13t\ge13 and q(x)=x2+4q(x)=x^2+4 for −5≤x<4-5\le x<4. Give every input for which pq(x)pq(x) is defined.

Use inequalities in x or interval notation. Join intervals with ‘or’ or ∪. Enter an isolated value on its own.

Section 5 of 6 · Core · about 6 min

Can simplification bring back a forbidden input?

The graph below comes from composing two fractions. The rule simplifies to x−3x-3, but the inside fraction is undefined at 33. The hollow point is part of the final answer.

The line y = x minus 3 has an open point at (3, 0), since the composite excludes x = 3.

Worked example

A straight line with one missing point

Find pq(x)pq(x) when p(t)=5t−2p(t)=\dfrac5{t-2}, t≠2t\ne2, and q(x)=2+5x−3q(x)=2+\dfrac5{x-3}, x≠3x\ne3. State the domain.

  1. First record x≠3x\ne3 from qq. For every allowed xx, the fraction in qq is non-zero. So its output never equals 22 and the outside rule takes it.

  2. Substitute the output of qq into pp.

    pq(x)=5q(x)−2=55x−3=x−3.pq(x)=\dfrac5{q(x)-2}=\dfrac5{\frac{5}{x-3}}=x-3.
  3. The resulting rule is x−3x-3 for x≠3x\ne3. At x=3x=3 the first step still has no value, so the point (3,0)(3,0) is absent.

A link to inverses

When two rules undo each other, their composite gives back its input. For the ff from the first lesson, f−1(f(x))=xf^{-1}(f(x))=x for −2≤x<3-2\le x<3. In the reverse order, f(f−1(x))=xf(f^{-1}(x))=x for −1<x≤9-1<x\le9. Both expressions are xx, with different allowed inputs.

Your turn

Let p(t)=4t+1p(t)=\dfrac4{t+1} for t≠−1t\ne-1, and q(x)=2xq(x)=\dfrac2x for x≠0x\ne0. Write pq(x)pq(x) as a single fraction.

Enter a single fraction such as (2x+1)/(x−3). You can also separate the numerator and denominator with a semicolon.

Your turn

For the same p(t)=4t+1p(t)=\dfrac4{t+1} and q(x)=2xq(x)=\dfrac2x, give the full domain of pqpq. You can join the exclusions with and.

Use inequalities in x or interval notation. Join intervals with ‘or’ or ∪. Enter an isolated value on its own.

Section 6 of 6 · Core · about 8 min

How can I recover a missing function?

If one rule and the composite are known, use the order of the composition to see what can be recovered. The missing rule may be on the inside or the outside.

Worked example

Undo the outside function

Let a(t)=3t−5a(t)=3t-5 for real tt, and let ab(x)=6x2−9x+7ab(x)=6x^2-9x+7 for real xx. Find b(x)b(x).

  1. The outside rule acts on b(x)b(x). That makes the equation 3b(x)−5=6x2−9x+73b(x)-5=6x^2-9x+7.

  2. Add 55 to both sides and divide every term by 33.

    b(x)=2x2−3x+4.b(x)=2x^2-3x+4.
  3. Putting this into 3b(x)−53b(x)-5 gives 6x2−9x+76x^2-9x+7, as required.

Your turn

For all real xx, pq(x)=4x2−6x+9pq(x)=4x^2-6x+9. The outside rule is p(t)=2t+7p(t)=2t+7 for real tt. Find the right-hand side of q(x)q(x).

Enter an expression in x; use ^ for powers and / for fractions.

Worked example

Find the outside rule on the inputs it receives

Let q(x)=x+4q(x)=x+4 for x≥−2x\ge-2, and suppose p(q(x))=x2+3xp(q(x))=x^2+3x throughout that interval. Find the rule for pp wherever it is determined.

  1. The input of pp is t=q(x)=x+4t=q(x)=x+4. Since x≥−2x\ge-2, we know that t≥2t\ge2. Express the old input as x=t−4x=t-4.

  2. Substitute t−4t-4 into the given composite and simplify.

    p(t)=(t−4)2+3(t−4)=t2−5t+4.p(t)=(t-4)^2+3(t-4)=t^2-5t+4.
  3. This determines p(t)p(t) for t≥2t\ge2. Smaller values of tt are never reached by the stated qq, so the composite gives no information about them.

Your turn

Let g(x)=2x+1g(x)=2x+1 for x≥0x\ge0, and suppose h(g(x))=6x−1h(g(x))=6x-1 throughout that interval. Find the right-hand side of h(x)h(x) on the inputs reached by gg.

Enter an expression in x; use ^ for powers and / for fractions.

Your turn

For the same g(x)=2x+1g(x)=2x+1 on x≥0x\ge0, give all inputs of hh for which the composite determines its rule.

Use inequalities in x or interval notation. Join intervals with ‘or’ or ∪. Enter an isolated value on its own.

Worked examples

Practise the method

Core practice

Question 1 of 4

0 / 4 checked in this collection

Question list

Core practice

Fresh variants

Exam-style

Compare both composition orders

2 marks

Let f(x)=3x−2f(x)=3 x - 2 and g(x)=x2+1g(x)=x^2+1, both for real x. Find fg(x)fg(x) and gf(x)gf(x).

Enter an expression in x; use ^ for powers and / for fractions.

Enter an expression in x; use ^ for powers and / for fractions.

Full answer-format guide

Exact numbers: 3/2, sqrt(5), 2-sqrt(3), pi/6, 3*pi/2. Sets: {1,4}. Intervals: (3,5]; a round bracket excludes the endpoint. Infinity: inf; union: U; no solutions: empty. Separate coordinate pairs or triples with semicolons. Expressions: 2x^2+3x-1; equations: x^2=3x+1 or the polynomial equal to zero. Factors: x-1 ; x+2. Parameter fraction: numerator ; denominator. List integer answers individually.

Review the method

Progress stays in this browser. Create an account to save it or sign in.

Apply it · original exam-style problems

Show your working on paper and compare it with the worked solution and marking guidance.

Start after this lesson

Mixed chapter practice

Try these after completing this chapter.

Review Ranges, restrictions and inverse branches first.

Review Ranges, restrictions and inverse branches first.

Review Ranges, restrictions and inverse branches first.

Review Ranges, restrictions and inverse branches first.

Come back to what needs practice

Quick revision sheet (A4)

Your review plan starts after your first check.

Question bank and saved work