B8 - Composite and inverse functions

B8 - Composite and inverse functions

A function has a rule and a set of permitted inputs. You will describe its outputs, combine functions in a specified order, and reverse a function when each output identifies just one original input. Domains and ranges keep each operation meaningful.

Functions, domains and ranges

Can a function undo itself without being f(x)=xf(x)=x? Try f(x)=3−xf(x)=3-x: it sends 11 to 22, then sends 22 back to 11. To decide whether this works for every input, we first need to say precisely what a function is.

Function, domain and range

A function assigns exactly one output to each input in its domain, the set of permitted inputs. Its range is the set of outputs actually attained. The notation f:x↦f(x)f:x\mapsto f(x) gives the mapping rule. For example, f(2)=1f(2)=1 for f(x)=3−xf(x)=3-x; it does not mean multiplication by ff.

A many-to-one rule can still be a function: x2x^2 gives the same output at −2-2 and 22, but each input has just one output. A rule that sends the single input 44 to both 22 and −2-2 is not a function. In particular, 4=2\sqrt4=2, while the equation x2=4x^2=4 has two solutions.

You already know

A denominator cannot be zero, and a real square root needs a nonnegative expression inside it. A quadratic's completed-square form reveals its minimum or maximum.

Unless a question states another domain, use the real inputs for which the expression is defined. A given restriction overrides that largest possible domain. The range must then come from those actual inputs, including endpoint inclusion.

Sets can be written with braces, such as {x:x≥2}\{x:x\geq2\}, or intervals, such as [2,∞)[2,\infty). A square bracket includes a finite endpoint; a round bracket excludes it. Infinity is never an included real endpoint. A union A∪BA\cup B joins sets. Membership is written x∈Ax\in A. These definitions and notation are not supplied as results in the formula booklet.

Worked example 1: an excluded input need not exclude its output

Question. Find the range of f(x)=(x−1)2f(x)=(x-1)^2 with domain [−1,3)[-1,3).

Plan. Locate the vertex and check both domain boundaries, remembering that different inputs may have the same output.

f(1)=0included vertex gives the minimumf(−1)=4included left endpoint0≤(x−1)2≤4−1≤x<3\begin{aligned} f(1)&=0 && \text{included vertex gives the minimum}\\ f(-1)&=4 && \text{included left endpoint}\\ 0&\leq(x-1)^2\leq4 && -1\leq x<3 \end{aligned}

Why this step? Although x=3x=3 is excluded, x=−1x=-1 is included and gives the same output 44.

Answer. The range is [0,4][0,4], or {y:0≤y≤4}\{y:0\leq y\leq4\}. Every intermediate height occurs on the continuous quadratic branch.

Check. The equation (x−1)2=4(x-1)^2=4 gives x=−1x=-1 or 33; one permitted input is enough to include the output.

Change only the left endpoint's inclusion in the next example. The maximum output now behaves differently.

Worked example 2: exclude both inputs giving the boundary output

Question. Find the range of f(x)=(x−1)2f(x)=(x-1)^2 with domain (−1,3)(-1,3).

Plan. Keep the vertex minimum, then ask whether any permitted input attains 44.

−2<x−1<2subtract 10≤(x−1)2<4square the distance from zerof(1)=0zero is attained\begin{aligned} -2&<x-1<2 && \text{subtract }1\\ 0&\leq(x-1)^2<4 && \text{square the distance from zero}\\ f(1)&=0 && \text{zero is attained} \end{aligned}

Why this step? Both inputs giving output 44 are now excluded, so approaching that height does not include it in the range.

Answer. The range is [0,4)[0,4), equivalently {y:0≤y<4}\{y:0\leq y<4\}.

Check. Inputs close to −1-1 or 33 give outputs close to 44, but solving for 44 gives only the excluded endpoints.

Finite domains work differently: evaluate only the listed members. For x2x^2 on {−1,0,2}\{-1,0,2\}, the range is {0,1,4}\{0,1,4\}, without any intervening outputs.

Watch out

Wrong: copy the domain's brackets onto the range. Right: establish which output bounds are actually attained; another input can include a height whose corresponding endpoint was excluded.

Now use the definition of a real square root to find both sets.

One-to-one functions and restrictions

An output can identify the original input only if two inputs have not been merged. For x2x^2, output 44 could have come from −2-2 or 22, so reversing the unrestricted rule is ambiguous.

One-to-one and many-to-one

A function is one-to-one when different inputs in its domain always have different outputs: f(a)=f(b)f(a)=f(b) implies a=ba=b. It is many-to-one if at least two different inputs have the same output. Both satisfy the definition of a function.

An inverse function reverses the mapping. It exists on the original range precisely when the function is one-to-one on its chosen domain. Graphically, every horizontal line must meet the original graph at most once. This condition is not in the formula booklet: learn it.

For q(x)=x2q(x)=x^2, the pair q(−2)=q(2)=4q(-2)=q(2)=4 proves that it is many-to-one on R\mathbb R. Restricting its domain to [0,∞)[0,\infty) gives an increasing branch; then output 44 identifies input 22, and the inverse is x\sqrt{x}. Restricting instead to (−∞,0]( -\infty,0] gives a decreasing branch and inverse −x-\sqrt{x}. A restriction changes the function being defined, so state it explicitly.

A few successful pairs cannot prove one-to-one behaviour. For p(x)=3−2xp(x)=3-2x, a general argument does:

p(a)=p(b)⟹3−2a=3−2b⟹a=b\begin{aligned} p(a)=p(b)&\quad\Longrightarrow\quad3-2a=3-2b\\ &\quad\Longrightarrow\quad a=b \end{aligned}

This covers arbitrary permitted inputs. Strictly increasing or strictly decreasing behaviour over the whole domain also establishes one-to-one behaviour; testing a few plotted points does not.

Key idea

Restrict the original domain before finding its inverse. Its range then becomes the inverse's domain.

AQA's “Fully justify” needs a reason for the classification. If you say a function is many-to-one, exhibit two different permitted inputs with the same output or give an equivalent general argument.

Composition order and permitted inputs

A composite function uses one output as the next input. If ff adds 33 and gg squares, gf(1)=g(4)=16gf(1)=g(4)=16, whereas fg(1)=f(1)=4fg(1)=f(1)=4: the order matters.

Composition

gf(x)=g(f(x)),fg(x)=f(g(x))gf(x)=g(f(x)),\qquad fg(x)=f(g(x))

The function nearest the input acts first. For gfgf to be defined on all of ff's stated domain, the range of ff must be a subset of the domain of gg. Not in the formula booklet: learn it.

If that subset condition fails, do not say the composite works on the whole original domain. You may define it on a stated restricted domain: keep exactly those original inputs whose intermediate outputs are allowed by the second function. Simplification must not restore an input excluded at either stage.

Worked example 3: reciprocal after square root

Question. Let f(x)=x+2f(x)=\sqrt{x+2}, x≥−2x\geq-2, and g(x)=1/(x−1)g(x)=1/(x-1), x≠1x\ne1. Find gf(x)gf(x) and its largest permitted domain.

Plan. Substitute the square-root output into gg, then apply both functions' restrictions.

gf(x)=1x+2−1use f firstx≥−2the square root must existx+2≠1the reciprocal denominator is nonzerox≠−1exclude the forbidden intermediate output\begin{aligned} gf(x)&=\frac1{\sqrt{x+2}-1} && \text{use }f\text{ first}\\ x&\geq-2 && \text{the square root must exist}\\ \sqrt{x+2}&\ne1 && \text{the reciprocal denominator is nonzero}\\ x&\ne-1 && \text{exclude the forbidden intermediate output} \end{aligned}

Why this step? Output 11 belongs to the range of ff but is excluded from the domain of gg, so the composite requires a restriction.

Answer. gf(x)=1/(x+2−1)gf(x)=1/(\sqrt{x+2}-1), for x≥−2x\geq-2, x≠−1x\ne-1.

Check. At x=2x=2, f(2)=2f(2)=2 and g(2)=1g(2)=1; the composite formula gives 11. At x=−1x=-1, the second stage is undefined.

Change only the order in the next example. The original functions are the same, but a reciprocal must now produce a permissible square-root input.

Worked example 4: square root after reciprocal

Question. For the same ff and gg, find fg(x)fg(x) and its largest permitted domain.

Plan. Put g(x)g(x) into ff, exclude the reciprocal's pole, then solve the nonnegative-radicand condition.

fg(x)=1x−1+2use g first1x−1+2=2x−1x−1≥0x≠1x≤12 or x>1check signs across 12,1\begin{aligned} fg(x)&=\sqrt{\frac1{x-1}+2} && \text{use }g\text{ first}\\ \frac1{x-1}+2&=\frac{2x-1}{x-1}\geq0 && x\ne1\\ x&\leq\frac12\text{ or }x>1 && \text{check signs across }\frac12,1 \end{aligned}

Why this step? The numerator can be zero, but the denominator cannot. The two boundary inputs therefore have different inclusion rules.

Answer. fg(x)=1/(x−1)+2fg(x)=\sqrt{1/(x-1)+2}, with domain (−∞,12]∪(1,∞)( -\infty,\frac12]\cup(1,\infty).

Check. At x=0x=0, the radicand is 11; at x=34x=\frac34, it is −2-2, so this input is excluded; at x=2x=2, it is 33.

A sign check on each interval supplies the inequality solution; never multiply an inequality by x−1x-1 without considering its sign.

Watch out

Wrong: g(f(x))=f(g(x))g(f(x))=f(g(x)) because both use the same functions. Right: follow the actual input through the two stages and keep brackets around the complete substituted expression.

The next question changes the constants but keeps the second example's order and domain decision.

Finding and verifying an inverse

To reverse f(x)=3−2xf(x)=3-2x, undo its operations: subtract the output from 33, then divide by 22. Algebra gives a systematic version of that reversal.

Write y=f(x)y=f(x), solve for the original input xx in terms of yy, then rename the inverse's input. Its domain is the original range, and its range is the original domain. The notation f−1f^{-1} means inverse, while 1/f1/f means reciprocal.

Inverse identities

f−1(f(x))=x(x in the domain of f)f^{-1}(f(x))=x\qquad(x\text{ in the domain of }f) f(f−1(y))=y(y in the range of f)f(f^{-1}(y))=y\qquad(y\text{ in the range of }f)

These identities express reversal on the permitted sets. Not in the formula booklet: learn it.

A formula may simplify correctly while an intermediate operation is undefined. Always pair the algebra with the correct sets.

Worked example 5: a restricted decreasing function

Question. Find the inverse, domain and range of f(x)=3−2xf(x)=3-2x, x≤1x\leq1.

Plan. Find the original range, solve the equation for its input, then exchange the two sets.

x≤1⟹3−2x≥1original rangey=3−2xwrite the mappingx=3−y2solve for the old input\begin{aligned} x\leq1&\quad\Longrightarrow\quad3-2x\geq1 && \text{original range}\\ y&=3-2x && \text{write the mapping}\\ x&=\frac{3-y}{2} && \text{solve for the old input} \end{aligned}

Why this step? The least original output is 11, so 11 is the least permitted input to the inverse.

Answer. f−1(x)=(3−x)/2f^{-1}(x)=(3-x)/2, with domain [1,∞)[1,\infty) and range (−∞,1]( -\infty,1].

Check. f−1(f(x))=[3−(3−2x)]/2=xf^{-1}(f(x))=[3-(3-2x)]/2=x. Also f(f−1(y))=3−2(3−y)/2=yf(f^{-1}(y))=3-2(3-y)/2=y, for the stated permitted inputs.

Change only x≤1x\leq1 to x<1x<1. The inverse formula is unchanged; the endpoint inclusion is not.

Worked example 6: an open boundary

Question. Find the inverse, domain and range of h(x)=3−2xh(x)=3-2x, x<1x<1.

Plan. Repeat the reversal and track strictness through the range inequality.

x<1⟹3−2x>1reverse the inequality after −2y=3−2x⟹x=3−y2same algebraic reversal\begin{aligned} x<1&\quad\Longrightarrow\quad3-2x>1 && \text{reverse the inequality after }-2\\ y&=3-2x\quad\Longrightarrow\quad x=\frac{3-y}{2} && \text{same algebraic reversal} \end{aligned}

Why this step? The original function approaches 11 but never attains it on this domain, so the inverse cannot accept input 11.

Answer. h−1(x)=(3−x)/2h^{-1}(x)=(3-x)/2, with domain (1,∞)(1,\infty) and range (−∞,1)( -\infty,1).

Check. Input 22 to the inverse gives 12\frac12, which is allowed by hh, and h(12)=2h(\frac12)=2. Input 11 would give the excluded old input 11.

The opening example is a different reversal: for s(x)=3−xs(x)=3-x on R\mathbb R, solving y=3−xy=3-x gives s−1(x)=3−x=s(x)s^{-1}(x)=3-x=s(x). Thus s(s(x))=3−(3−x)=xs(s(x))=3-(3-x)=x. A function really can undo itself while swapping most of its inputs in pairs; only 32\frac32 stays fixed. This identity is derived here and is not in the formula booklet.

Watch out

Wrong: f−1(x)=1/(3−2x)f^{-1}(x)=1/(3-2x). That is a reciprocal. Right: solve y=3−2xy=3-2x for the old input, then exchange domain and range.

Use the same method for an increasing linear function.

Inverse graphs and the chosen branch

Reversing input and output swaps the coordinates: a point (a,b)(a,b) becomes (b,a)(b,a). The line y=xy=x is the mirror for this swap.

Reflect only the points belonging to the stated original domain. Reflecting an unrestricted many-to-one parabola would give a sideways curve with two outputs for some inputs, which is not an inverse function. The reflection rule and branch selection are not in the formula booklet: learn them.

Worked example 7: reflect the right-hand branch

Question. Find and sketch the inverse of f(x)=(x−2)2+1f(x)=(x-2)^2+1, x≥2x\geq2.

Plan. Solve for the old input, choose the square-root sign using x≥2x\geq2, then swap points.

y−1=(x−2)2isolate the squarex−2=y−1x−2≥0f−1(x)=2+x−1rename the input\begin{aligned} y-1&=(x-2)^2 && \text{isolate the square}\\ x-2&=\sqrt{y-1} && x-2\geq0\\ f^{-1}(x)&=2+\sqrt{x-1} && \text{rename the input} \end{aligned}

Why this step? The negative square-root sign would return inputs below 22, outside the original domain.

Answer. The inverse has domain [1,∞)[1,\infty), range [2,∞)[2,\infty), and endpoint (1,2)(1,2). Reflect the original endpoint (2,1)(2,1) and the right-hand quadratic branch in y=xy=x.

Check. Original point (3,2)(3,2) becomes (2,3)(2,3); 2+2−1=32+\sqrt{2-1}=3.

The diagram uses equal scales, so swapping coordinates produces the expected mirror image.

A restricted quadratic and its square-root inverse reflected in the line y equals x

Change only the original branch in the next example. The same original formula now has a different inverse function.

Worked example 8: reflect the left-hand branch

Question. Find the inverse of g(x)=(x−2)2+1g(x)=(x-2)^2+1, x≤2x\leq2, and describe its reflected endpoint and direction.

Plan. Solve the same square equation but select the nonpositive value of the original x−2x-2.

y−1=(x−2)2same square equationx−2=−y−1x−2≤0g−1(x)=2−x−1choose the permitted branch\begin{aligned} y-1&=(x-2)^2 && \text{same square equation}\\ x-2&=-\sqrt{y-1} && x-2\leq0\\ g^{-1}(x)&=2-\sqrt{x-1} && \text{choose the permitted branch} \end{aligned}

Why this step? The domain restriction selects the minus sign before variables are renamed; it is part of the inverse definition.

Answer. The inverse has domain [1,∞)[1,\infty), range (−∞,2]( -\infty,2], included endpoint (1,2)(1,2), and extends downwards to the right.

Check. g(1)=2g(1)=2, so g−1(2)=1g^{-1}(2)=1; the minus-sign formula gives 2−1=12-1=1.

The identity (x−2)2=∣x−2∣\sqrt{(x-2)^2}=|x-2| explains why the restriction matters. It equals x−2x-2 on the right branch and 2−x2-x on the left. This square-root identity is not in the formula booklet.

Watch out

Wrong: put ±\pm in an inverse function's formula and leave both branches. Right: use the stated domain to choose the one value that recovers the original input.

Select a left-hand branch once more, then identify the reflected endpoint.

Quick Recap

  • A function assigns one output per input; its domain and range are sets.
  • A one-to-one function has an inverse on its range; state any branch restriction first.
  • Compose from the inside out and check every intermediate input.
  • An inverse exchanges domain with range and reflects the chosen graph in y=xy=x.

The opening function s(x)=3−xs(x)=3-x undoes itself because s(s(x))=xs(s(x))=x, even though it changes every input except 32\frac32.