3.2 - Composite and inverse functions

3.2 - Composite and inverse functions

Learn to combine function rules in the right order and find a function that reverses a mapping. You will keep track of allowed inputs and choose the correct square-root branch when an inverse needs a domain restriction. This lesson is for Higher students.

The order of a composite function (Higher)

Two machines use the rules “double, then subtract 11” and “square, then add 33”. Starting with 00, can reversing their order really change the final answer? We will get 55 one way and 44 the other.

You already know

A function gives one output for each allowed input. In f(t)f(t), replace every input variable in the rule for ff by the whole expression tt, using brackets where needed.

A second machine can act on the first machine's output. Read a nested expression from the innermost brackets outwards.

Composite function

A composite function applies one function, then another. Pearson's notation is

fg(x)=f(g(x))fg(x)=f(g(x))

It means do gg first, then ff. It does not mean multiply the two outputs. This notation is not supplied on the Higher formulae sheet: learn it.

For the opening machines, let f(x)=2x−1f(x)=2x-1 and g(x)=x2+3g(x)=x^2+3, both with all real inputs. When forming a rule, insert the complete inner expression into the outer rule before expanding.

Worked example 1: apply the rightmost function first

Question. For f(x)=2x−1f(x)=2x-1 and g(x)=x2+3g(x)=x^2+3, find fg(x)fg(x) and fg(0)fg(0).

Plan. Apply gg, then substitute its output into ff.

fg(x)=f(x2+3)apply g first=2(x2+3)−1replace the whole input of f=2x2+5expand and simplifyfg(0)=5substitute zero\begin{aligned} fg(x)&=f(x^2+3) &&\text{apply }g\text{ first}\\ &=2(x^2+3)-1 &&\text{replace the whole input of }f\\ &=2x^2+5 &&\text{expand and simplify}\\ fg(0)&=5 &&\text{substitute zero} \end{aligned}

Why double the whole bracket? The input to ff is x2+3x^2+3, including its constant.

Answer. fg(x)=2x2+5fg(x)=2x^2+5, and fg(0)=5fg(0)=5.

Check. Directly, 00 goes to g(0)=3g(0)=3, then f(3)=5f(3)=5.

Now change only the order. The same functions and same starting input will give a different answer.

Worked example 2: reverse the order

Question. For f(x)=2x−1f(x)=2x-1 and g(x)=x2+3g(x)=x^2+3, find gf(x)gf(x) and gf(0)gf(0).

Plan. Apply ff, then substitute its output into gg.

gf(x)=g(2x−1)apply f first=(2x−1)2+3square the whole input=4x2−4x+4expand and simplifygf(0)=4substitute zero\begin{aligned} gf(x)&=g(2x-1) &&\text{apply }f\text{ first}\\ &=(2x-1)^2+3 &&\text{square the whole input}\\ &=4x^2-4x+4 &&\text{expand and simplify}\\ gf(0)&=4 &&\text{substitute zero} \end{aligned}

Why retain the bracket before squaring? The output of ff is the entire expression 2x−12x-1.

Answer. gf(x)=4x2−4x+4gf(x)=4x^2-4x+4, and gf(0)=4gf(0)=4.

Check. Directly, f(0)=−1f(0)=-1, then g(−1)=(−1)2+3=4g(-1)=(-1)^2+3=4.

The opening puzzle shows that order matters: fgfg and gfgf are usually different functions, although some special pairs do give the same rule.

Watch out

The wrong line fg(x)=(2x−1)2+3fg(x)=(2x-1)^2+3 applies ff first. That is gf(x)gf(x). For fgfg, start with gg: fg(x)=2(x2+3)−1fg(x)=2(x^2+3)-1.

Write the nested form first when unsure of the order. It makes the first operation visible.

Allowed inputs of a composite (Higher)

A composite is a journey through two domains. The starting input must be allowed by the first function; its output must then be allowed by the second. A restriction on an intermediate value can therefore exclude a different starting input.

For fgfg, first check the domain of gg, then require g(x)g(x) to lie in the domain of ff. The Higher formulae sheet does not supply these domain rules. Use the original functions, even if later simplification hides a restriction.

Worked example 3: an intermediate value is forbidden

Question. Let f(x)=1x−2f(x)=\frac{1}{x-2} and g(x)=x+5g(x)=x+5, each with its largest real domain. Find fg(x)fg(x) and its domain.

Plan. Substitute g(x)g(x) into ff, then exclude an intermediate input of 22.

fg(x)=1(x+5)−2=1x+3substitute the inner rulex+5≠2input to f must be allowedx≠−3solve the restriction\begin{aligned} fg(x)&=\frac{1}{(x+5)-2}=\frac{1}{x+3} &&\text{substitute the inner rule}\\ x+5&\ne2 &&\text{input to }f\text{ must be allowed}\\ x&\ne-3 &&\text{solve the restriction} \end{aligned}

Why exclude −3-3, rather than 22? Starting at −3-3 makes gg output 22, which ff cannot accept.

Answer. fg(x)=1/(x+3)fg(x)=1/(x+3), with domain all real x≠−3x\ne-3.

Check. At x=2x=2, the intermediate value is 77, and f(7)=1/5f(7)=1/5, so 22 is allowed here.

Change only the outer operation: replace the reciprocal by a square root, so f(x)=x−2f(x)=\sqrt{x-2}, and keep g(x)=x+5g(x)=x+5. Now the intermediate value must be at least 22, rather than merely different from 22.

Worked example 4: a square-root restriction

Question. Let f(x)=x−2f(x)=\sqrt{x-2} and g(x)=x+5g(x)=x+5, each with its largest real domain. Find fg(x)fg(x) and its domain.

Plan. Substitute into the root and require its inside expression to be nonnegative.

fg(x)=(x+5)−2=x+3substitute the inner rulex+3≥0real square-root conditionx≥−3solve the inequality\begin{aligned} fg(x)&=\sqrt{(x+5)-2}=\sqrt{x+3} &&\text{substitute the inner rule}\\ x+3&\ge0 &&\text{real square-root condition}\\ x&\ge-3 &&\text{solve the inequality} \end{aligned}

Why include −3-3? The intermediate value is 22, giving output 0=0\sqrt0=0, which is defined.

Answer. fg(x)=x+3fg(x)=\sqrt{x+3}, with domain x≥−3x\ge-3.

Check. Starting at −2-2 gives g(−2)=3g(-2)=3, then f(3)=1f(3)=1; the composite also gives 1=1\sqrt1=1.

Order affects the domain as well as the expression. For the original reciprocal f(x)=1/(x−2)f(x)=1/(x-2) and g(x)=x+5g(x)=x+5, reversing the order gives

gf(x)=1x−2+5(x≠2)gf(x)=\frac{1}{x-2}+5\qquad (x\ne2)

Here ff acts first, and adding 55 creates no further exclusion. Also retain a restriction if cancellation hides it: composing f(x)=1/xf(x)=1/x with itself simplifies to xx, but input 00 remains forbidden.

Watch out

The wrong restriction “x≠2x\ne2” for fg(x)=1/(x+3)fg(x)=1/(x+3) copies the outer function's restriction without checking what reaches it. Solve g(x)≠2g(x)\ne2, giving x≠−3x\ne-3.

Check the root condition on the complete substituted expression in the next problem.

Finding an inverse algebraically (Higher)

If a machine triples its input and adds 44, undo it by subtracting 44 and dividing by 33. Reverse both the operations and their order.

Inverse function

An inverse function, written f−1f^{-1}, reverses a function's input-output pairs. Its domain is the original range, and its range is the original domain. The notation f−1(x)f^{-1}(x) does not mean the reciprocal 1/f(x)1/f(x).

To find a rule, write y=f(x)y=f(x), solve for the old input xx, then use xx as the input name in the inverse rule. These inverse methods are not supplied on the Higher formulae sheet.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account