Pure 2.8 - Composite and inverse functions

Pure 2.8 - Composite and inverse functions

Functions describe processes with one output for each allowed input. Learn to combine those processes, undo them and use their domains and graphs to decide which answers make sense. Keeping track of the direction of each mapping is the central skill.

Functions as mappings

A machine squares a number and adds one. If its display reads 55, can you recover the input? Both 22 and −2-2 produce 55, so the display alone cannot tell you. We will find the condition that makes reversal possible.

You already know

Substitution evaluates a rule: if p(x)=x2+1p(x)=x^2+1, then p(2)=5p(2)=5. Solving x2=4x^2=4 gives two real values, x=2x=2 and x=−2x=-2.

A function must say which inputs are allowed. For p:x↦x2+1p:x\mapsto x^2+1, x∈Rx\in\mathbb R, every real input is allowed and the outputs are all at least 11.

Function, domain and range

A function assigns each input in its domain exactly one output. Its range is the set of outputs actually produced. A one-one function never gives the same output from two different inputs; a many-one function does.

For example, x↦2x+3x\mapsto2x+3 on R\mathbb R is one-one; x↦x2x\mapsto x^2 on R\mathbb R is many-one. A rule assigning both 22 and −2-2 to the single input 44 is not a function.

The notation p:x↦x2+1p:x\mapsto x^2+1 gives the rule as a mapping; p(x)=x2+1p(x)=x^2+1 gives the same rule in function notation. Its range can be written [1,∞)[1,\infty) or {y∈R:y≥1}\{y\in\mathbb R:y\ge1\}. Square brackets include an endpoint; the round bracket at infinity never includes infinity as a number.

[DIAGRAM: asset_name: One-one and many-one mappings; asset_slug: p1_2_8_understand_and_use_composite_functions_inverse_functions_and_their_graphs__diagram_01; caption: Each input has exactly one output in both mappings; description: A one-one mapping sends 1, 2, 3 to 4, 5, 6 respectively. A many-one mapping sends -2 and 2 to 4 and 3 to 9.]
Each input has exactly one output in both mappings

There is a neat surprise: restricting x2+1x^2+1 to x≥0x\ge0 makes it one-one without changing its range at all. Every output at least 11 still occurs, but its duplicate negative input has disappeared. Restricting to x≤0x\le0 works too, and gives a different inverse later.

Key idea

Many-one is allowed for a function; it is the obstacle to reversing that function uniquely.

Use the domain as well as the formula in this check.

Composite functions

A composite connects the output of one function to the input of another. With f(x)=2x+3f(x)=2x+3 and g(x)=x2−1g(x)=x^2-1, input 22 goes through gg to 33, then through ff to 99.

Composite function

fg(x)=f(g(x))fg(x)=f(g(x)) means do gg first, then ff. The input must belong to the domain of gg, and g(x)g(x) must belong to the domain of ff.

The nearest function to the input acts first. Composition generally changes when its order changes.

[DIAGRAM: asset_name: Function composition pipeline; asset_slug: p1_2_8_understand_and_use_composite_functions_inverse_functions_and_their_graphs__diagram_02; caption: The inner function acts first; description: Input x enters g, output g(x) enters f, and the final output is f(g(x)) or fg(x). The intermediate output must be in the domain of f.]
The inner function acts first

The pipeline notation is not a multiplication rule; replacing a whole input by brackets keeps that distinction clear.

Worked example 1: compose two rules

Question. For f(x)=2x+3f(x)=2x+3 and g(x)=x2−1g(x)=x^2-1, both on R\mathbb R, find fg(x)fg(x).

Plan. Substitute the complete expression g(x)g(x) into the input position of ff.

fg(x)=f(x2−1)do g first=2(x2−1)+3use the rule for f=2x2+1expand and collect\begin{aligned} fg(x)&=f(x^2-1) &&\text{do }g\text{ first}\\ &=2(x^2-1)+3 &&\text{use the rule for }f\\ &=2x^2+1 &&\text{expand and collect} \end{aligned}

Why the brackets? Everything produced by gg is the input multiplied by 22.

Answer. fg(x)=2x2+1fg(x)=2x^2+1, for x∈Rx\in\mathbb R.

Check. At x=2x=2, g(2)=3g(2)=3, f(3)=9f(3)=9, and 2(2)2+1=92(2)^2+1=9.

Change only the order. The same two rules now carry out the operations in reverse sequence.

Worked example 2: reverse the composition order

Question. For the same ff and gg, find gf(x)gf(x).

Plan. Put 2x+32x+3 into the rule for gg.

gf(x)=g(2x+3)do f first=(2x+3)2−1square the whole input=4x2+12x+8expand and collect\begin{aligned} gf(x)&=g(2x+3) &&\text{do }f\text{ first}\\ &=(2x+3)^2-1 &&\text{square the whole input}\\ &=4x^2+12x+8 &&\text{expand and collect} \end{aligned}

Why is it different? Squaring after adding 33 creates a cross term; adding after squaring does not.

Answer. gf(x)=4x2+12x+8gf(x)=4x^2+12x+8, for x∈Rx\in\mathbb R.

Check. At x=2x=2, f(2)=7f(2)=7, g(7)=48g(7)=48, agreeing with the expression.

Domains can limit a composite even when its algebra looks simple. For s(x)=xs(x)=\sqrt x and r(x)=x−4r(x)=x-4, sr(x)=x−4sr(x)=\sqrt{x-4} needs x≥4x\ge4; rs(x)=x−4rs(x)=\sqrt x-4 needs x≥0x\ge0.

Watch out

The wrong line fg(x)=f(x)g(x)fg(x)=f(x)g(x) treats composition as multiplication. The correct line is fg(x)=f(g(x))fg(x)=f(g(x)).

Now change the linear rule and evaluate both orders at one input.

Inverse functions

An inverse reverses the direction of a one-one function. If ff sends aa to bb, then f−1f^{-1} sends bb back to aa. The inverse's inputs therefore come from the original range.

Inverse identities

For a one-one function ff,

f−1f(x)=xon the domain of f,ff−1(x)=xon the range of f.f^{-1}f(x)=x\quad\text{on the domain of }f, \qquad ff^{-1}(x)=x\quad\text{on the range of }f.

Not in the formula booklet: learn it.

To find the reverse rule, solve y=f(x)y=f(x) for the original input xx, then name the inverse's input xx again.

Worked example 3: invert a rational function

Question. Find the inverse of f(x)=2x+1x−3f(x)=\frac{2x+1}{x-3}, x≠3x\ne3.

Plan. Rearrange y=f(x)y=f(x), collecting all terms containing the original input.

y(x−3)=2x+1clear the denominatorxy−2x=3y+1collect x termsx(y−2)=3y+1factorisex=3y+1y−2divide for y≠2\begin{aligned} y(x-3)&=2x+1 &&\text{clear the denominator}\\ xy-2x&=3y+1 &&\text{collect }x\text{ terms}\\ x(y-2)&=3y+1 &&\text{factorise}\\ x&=\frac{3y+1}{y-2} &&\text{divide for }y\ne2 \end{aligned}

Why collect before dividing? The input occurs in both numerator and denominator; it must be isolated as one factor.

Answer. f−1(x)=3x+1x−2f^{-1}(x)=\frac{3x+1}{x-2}, x≠2x\ne2. The range of ff excludes 22, since f(x)=2+7x−3f(x)=2+\frac7{x-3}.

Check. f(4)=9f(4)=9 and f−1(9)=287=4f^{-1}(9)=\frac{28}7=4.

Change only the numerator's constant, from 11 to 55. The rearrangement is unchanged, but the inverse's rule changes.

Worked example 4: track a changed constant

Question. Find the inverse of h(x)=2x+5x−3h(x)=\frac{2x+5}{x-3}, x≠3x\ne3.

Plan. Clear the denominator and factorise the input terms.

y(x−3)=2x+5multiply throughx(y−2)=3y+5collect and factorisex=3y+5y−2isolate the input\begin{aligned} y(x-3)&=2x+5 &&\text{multiply through}\\ x(y-2)&=3y+5 &&\text{collect and factorise}\\ x&=\frac{3y+5}{y-2} &&\text{isolate the input} \end{aligned}

Why exclude 22 again? h(x)=2+11x−3h(x)=2+\frac{11}{x-3} never equals 22.

Answer. h−1(x)=3x+5x−2h^{-1}(x)=\frac{3x+5}{x-2}, x≠2x\ne2.

Check. h(4)=13h(4)=13 and h−1(13)=4411=4h^{-1}(13)=\frac{44}{11}=4.

The superscript is notation for reversal, not an instruction to take a reciprocal.

Watch out

f−1(x)≠1f(x)f^{-1}(x)\ne\frac1{f(x)} in general. For f(x)=4x−7f(x)=4x-7, the inverse is x+74\frac{x+7}4, whereas the reciprocal is 14x−7\frac1{4x-7}.

Change the numerator's constant once more and show the reverse rule.

Domains, ranges, and graphs of inverses

Swapping input and output swaps domain and range. It also swaps coordinates: a point (a,b)(a,b) on y=f(x)y=f(x) becomes (b,a)(b,a) on y=f−1(x)y=f^{-1}(x). Geometrically, that is reflection in y=xy=x.

[DIAGRAM: asset_name: Reflection of an inverse graph; asset_slug: p1_2_8_understand_and_use_composite_functions_inverse_functions_and_their_graphs__diagram_03; caption: Reflect the non-negative branch of the square graph in y equals x; description: Equal-scale axes show y=x squared for x non-negative and its inverse y=square root of x, with reflection line y=x and swapped points (2,4) and (4,2). The excluded negative branch is faint and dashed.]
Reflect the non-negative branch of the square graph in y equals x

A quadratic must be restricted to one branch before it can be reversed. The branch determines which square root to choose.

Worked example 5: the increasing quadratic branch

Question. Find the inverse of f(x)=x2+1f(x)=x^2+1, x≥0x\ge0, stating its domain and range.

Plan. Rearrange, choosing the square root consistent with the original domain.

y=x2+1write the original rulex2=y−1subtract 1x=y−1use x≥0\begin{aligned} y&=x^2+1 &&\text{write the original rule}\\ x^2&=y-1 &&\text{subtract }1\\ x&=\sqrt{y-1} &&\text{use }x\ge0 \end{aligned}

Why the positive root? The original function accepts no negative inputs.

Answer. f−1(x)=x−1f^{-1}(x)=\sqrt{x-1}, with domain [1,∞)[1,\infty) and range [0,∞)[0,\infty). Its graph reflects the original branch in y=xy=x.

Check. The original point (2,5)(2,5) becomes (5,2)(5,2), since 5−1=2\sqrt{5-1}=2.

Change only the domain to x≤0x\le0. The formula and original range stay the same, but the inverse must return negative inputs.

Worked example 6: the decreasing quadratic branch

Question. Find the inverse of g(x)=x2+1g(x)=x^2+1, x≤0x\le0, stating its domain and range.

Plan. Use the negative square root when reversing the rule.

y=x2+1original rulex2=y−1rearrangex=−y−1use x≤0\begin{aligned} y&=x^2+1 &&\text{original rule}\\ x^2&=y-1 &&\text{rearrange}\\ x&=-\sqrt{y-1} &&\text{use }x\le0 \end{aligned}

Why not write both signs? An inverse function must produce exactly one output for each input.

Answer. g−1(x)=−x−1g^{-1}(x)=-\sqrt{x-1}, domain [1,∞)[1,\infty), range (−∞,0](-\infty,0].

Check. g(−2)=5g(-2)=5, and g−1(5)=−2g^{-1}(5)=-2. Also g−1g(x)=−x2=xg^{-1}g(x)=-\sqrt{x^2}=x when x≤0x\le0.

For a shifted quadratic, apply the same sign decision to the bracket rather than to xx alone. For example, (x−2)2+3(x-2)^2+3 on x≥2x\ge2 has inverse 2+x−32+\sqrt{x-3}, domain x≥3x\ge3.

Exam tip

State the inverse's domain as the original range. A correct rearrangement with the wrong branch is not a correct inverse.

Keep the negative branch and change the vertical shift.

Using composites and inverses together

Read a mixed expression from the input outwards. In fg−1(10)fg^{-1}(10), first undo gg, then apply ff. You do not undo the entire composite unless brackets say so.

Worked example 7: undo then apply

Question. Let f(x)=2x−5f(x)=2x-5, x∈Rx\in\mathbb R, and g(x)=x2+1g(x)=x^2+1, x≥0x\ge0. Find fg−1(10)fg^{-1}(10).

Plan. Find the permitted inverse of gg, then feed its output into ff.

g−1(x)=x−1,x≥1reverse gg−1(10)=9=3apply the inner rulef(3)=2(3)−5=1apply the outer rule\begin{aligned} g^{-1}(x)&=\sqrt{x-1},\quad x\ge1 &&\text{reverse }g\\ g^{-1}(10)&=\sqrt9=3 &&\text{apply the inner rule}\\ f(3)&=2(3)-5=1 &&\text{apply the outer rule} \end{aligned}

Why start with the inverse? It is nearest to the input 1010.

Answer. fg−1(10)=1fg^{-1}(10)=1.

Check. g(3)=10g(3)=10, so 33 is the correct recovered input; it lies in the domain of ff.

Change only the input from 1010 to 2626. This lets you follow the same route without rebuilding it.

Worked example 8: a different input through the same pipeline

Question. For the same functions, find fg−1(26)fg^{-1}(26).

Plan. Undo the square-and-add rule first.

g−1(26)=26−1=5recover the non-negative inputf(5)=2(5)−5=5apply f\begin{aligned} g^{-1}(26)&=\sqrt{26-1}=5 &&\text{recover the non-negative input}\\ f(5)&=2(5)-5=5 &&\text{apply }f \end{aligned}

Why is the input allowed? 26≥126\ge1, so it belongs to the domain of g−1g^{-1}.

Answer. fg−1(26)=5fg^{-1}(26)=5.

Check. g(5)=26g(5)=26, confirming the inverse step.

The cancellation identities also explain the opening puzzle. The machine x2+1x^2+1 can be undone only after a one-one domain is chosen: 55 returns 22 on x≥0x\ge0, and −2-2 on x≤0x\le0.

Problem-solving

Write a mixed expression as nested brackets, check the inner domain, and work outwards one function at a time.

A final input gives the same sequence with new numbers.

Quick Recap

  • A function gives exactly one output for each allowed input; it may be many-one.
  • fgfg means do gg first, then ff, checking both domains.
  • A one-one function has an inverse that swaps its domain and range.
  • Inverse graphs reflect in y=xy=x, so corresponding coordinates swap.

The machine displaying 55 reveals its input only after we choose a one-one domain: non-negative inputs give 22; non-positive inputs give −2-2.