Paper ZeroSign in

IB Maths Analysis and Approaches SL

Composite and inverse functions: question types and practice

Composite and inverse functions carried 3% of the marks in the 20 recent exams, through 5 kinds of question. The one worth the most marks is Find the inverse function, with its domain.

Syllabus: AA SL 2.5: composite functions, (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)); the identity function, (f∘f−1)(x)=(f−1∘f)(x)=x(f \circ f^{-1})(x) = (f^{-1} \circ f)(x) = x; finding the inverse function f−1(x)f^{-1}(x); the existence of an inverse for one-to-one functions. It is the formal side of SL 2.2, where an inverse "undoes" a function, the graph of f−1f^{-1} is the reflection of the graph of ff in the line y=xy = x, and the domain of f−1f^{-1} is the range of ff (first met in The idea of an inverse function).
Papers: Mostly Paper 1: values read off a graph, composites and inverses by hand, often in the first question of Section A or the first parts of a Section B question on a rational, exponential or log function. On Paper 2 the algebra is the same (a GDC never gives f(g(x))f(g(x)) or f−1(x)f^{-1}(x) as a formula); the GDC finds where the graphs of ff and f−1f^{-1} meet, sketches a composite on a domain, and checks an inverse by graphing it.
Scope: AA SL only. Choosing or restricting a domain yourself so that an inverse exists ("the largest domain on which f−1f^{-1} exists"), odd and even functions, and the general theory of self-inverse functions are HL (AHL 2.14): SL questions state a domain on which ff is one-to-one. Two self-inverse shapes have been set on SL papers and are taught here with no extra theory: "show that f−1=ff^{-1} = f" and "given that f−1=ff^{-1} = f, find a constant". The domain of a composite follows from the SL 2.2 idea of domain; SL 2.5 does not list it, and it was not examined 2021–26.
Formula booklet: nothing for SL 2.5 itself. From SL 1.5 and SL 2.9: ax=b⇔x=log⁡aba^x = b \Leftrightarrow x = \log_a b, and log⁡aax=x=alog⁡ax\log_a a^x = x = a^{\log_a x}. These invert an exponential or a log, and simplify an exponential of a log.

  • Not given: (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)) and which function acts first; swapping xx and yy to find f−1f^{-1}; that the domain of f−1f^{-1} is the range of ff; (f∘f−1)(x)=x(f \circ f^{-1})(x) = x; how to show that a function is its own inverse.

Try one now

A Composite and inverse functions question of the type "Find the inverse function, with its domain". Work it out on paper, then type your answer here.

No calculator[1]

Let f(x)=2−e−xf(x) = 2 - e^{-x}, for x∈Rx \in \mathbb{R}.

State the range of ff.

An inequality, like 2<x≤52 < x \le 5, or an interval, like ]2,5]]2, 5]

Free, with no account. You see where each mark went.

The 5 question types

  1. Find the inverse function, with its domain

    • In 10 of 20 recent exams
    • 1% of the marks

    Paper 1 (no calculator) and Paper 2 (calculator), 1–4 marks per part. Rational functions are the commonest (6 of its 14 parts), then logs (3), roots (2), lines (2) and an exponential (1). Very common (10 of 20 exam versions, 4 of them on Paper 2 (calculator)). On Paper 2 (calculator) it is still algebra, often part (a) of a question whose later parts use the GDC.

  2. Values of f, f∘g and f⁻¹ from a graph or a formula

    • In 8 of 20 recent exams

    Paper 1 (no calculator), 1–3 marks per part and up to about 5 in one question (Examples 1.1 and 1.3 combine more parts, for practice): usually the first question of Section A, built on a graph, or the opening parts of a Section B question on functions. Common (8 of 20 exam versions, all on Paper 1 (no calculator)). A value read in one part is often fed into a composite or an inverse in the next.

  3. Form a composite function and use it

    • In 5 of 20 recent exams

    Paper 1 (no calculator) mostly, 2–3 marks per part: "find (f∘g)(x)(f \circ g)(x)" as part (a), then a use of it. Typical (5 of 20 exam versions, one of them on Paper 2 (calculator), where the composite is then sketched on the GDC).

  4. Find the unknown function inside a composite

    • In 3 of 20 recent exams

    Paper 1 (no calculator), 3–7 marks, often straight after "find f−1(x)f^{-1}(x)", whose answer it uses. Typical (3 of 20 exam versions, all on Paper 1 (no calculator)).

  5. The graphs of f and f⁻¹

    Reflect in y = x, find where they meet

    • In 3 of 20 recent exams

    Paper 1 (no calculator) (a sketch of f−1f^{-1}, or the meeting points by hand) and Paper 2 (calculator) (the meeting points on the GDC), 2–4 marks (Example 5.2(b), at 5, is at the long end). Typical (3 of 20 exam versions: twice on Paper 1 (no calculator), once on Paper 2 (calculator)). The meeting points are also the limits of the area between the graphs of ff and f−1f^{-1} in three more exam versions, all on Paper 2 (calculator), and a Paper 2 (calculator) question in a fourth asks for the point of a self-inverse graph nearest the origin, which in that question was where the graph meets y=xy = x.

The ideas you need

Composite functions: one function after another

(f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x))

Apply gg first, then apply ff to the result. Read it from the inside out: the function next to xx acts first.

Mini-example: f(x)=x2f(x) = x^2 and g(x)=x+3g(x) = x + 3.

  • (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x))
    First
    add 33
    Then
    square
    Result
    (x+3)2(x + 3)^2
  • (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x))
    First
    square
    Then
    add 33
    Result
    x2+3x^2 + 3
  • (f∘f)(x)=f(f(x))(f \circ f)(x) = f(f(x))
    First
    square
    Then
    square
    Result
    x4x^4

At x=1x = 1: (f∘g)(1)=f(4)=16(f \circ g)(1) = f(4) = 16, but (g∘f)(1)=g(1)=4(g \circ f)(1) = g(1) = 4. The order matters: in general f∘g≠g∘ff \circ g \ne g \circ f.

  • Substitute the whole inner expression, in brackets, for every xx in the outer function. With f(x)=2x2−xf(x) = 2x^2 - x: f(3x+1)=2(3x+1)2−(3x+1)f(3x + 1) = 2(3x + 1)^2 - (3x + 1). Missing the brackets is the commonest slip.
  • A value needs no formula. Evaluate the inner function, then feed that number to the outer one: (f∘g)(1)=f(g(1))=f(4)(f \circ g)(1) = f(g(1)) = f(4).
  • The outputs of the inner function are the inputs of the outer one. So the range of f∘gf \circ g is what ff does to the range of gg. With g(x)=sin⁡xg(x) = \sin x (outputs from −1-1 to 11) and f(x)=x2f(x) = x^2, (f∘g)(x)=sin⁡2x(f \circ g)(x) = \sin^2 x takes the values 0≤y≤10 \le y \le 1. For the same reason the inputs of f∘gf \circ g are the xx for which g(x)g(x) is in the domain of ff: with f(x)=xf(x) = \sqrt{x} and g(x)=x−5g(x) = x - 5, f(g(x))=x−5f(g(x)) = \sqrt{x - 5} needs x≥5x \ge 5 (it follows from SL 2.2 domain and range; not examined 2021–26).
  • Taking a composite apart is the first step of the chain rule: esin⁡xe^{\sin x} is f(g(x))f(g(x)) with the inner function g(x)=sin⁡xg(x) = \sin x and the outer f(x)=exf(x) = e^x (Differentiate: choose the rule).

The identity function, and f∘f⁻¹

The identity function is I(x)=xI(x) = x: it leaves every input unchanged. An inverse undoes its function, so composing the two, in either order, gives the identity:

(f∘f−1)(x)=(f−1∘f)(x)=x(f \circ f^{-1})(x) = (f^{-1} \circ f)(x) = x

Mini-example: f(x)=3x−4f(x) = 3x - 4 and f−1(x)=x+43f^{-1}(x) = \frac{x + 4}{3}. Then f(f−1(x))=3⋅x+43−4=xf(f^{-1}(x)) = 3 \cdot \frac{x + 4}{3} - 4 = x, and f−1(f(x))=(3x−4)+43=xf^{-1}(f(x)) = \frac{(3x - 4) + 4}{3} = x.

  • The check for any inverse: compose and simplify to xx. In a "show that f−1(x)=…f^{-1}(x) = \ldots", markschemes accept this in place of the derivation.
  • Read it backwards: if hh is one-to-one (as it always is in these questions) and h(k(x))=xh(k(x)) = x for all xx, then applying h−1h^{-1} to both sides gives k(x)=h−1(x)k(x) = h^{-1}(x), so finding kk is finding an inverse.
  • Undo instead of calculating. f(f−1(7))=7f(f^{-1}(7)) = 7 with no working, whenever 77 is in the range of ff. And an equation f−1(expression)=cf^{-1}(\text{expression}) = c becomes expression=f(c)\text{expression} = f(c) when ff is applied to both sides.
  • Only where both are defined: ln⁡(ex)=x\ln(e^x) = x for every xx, but eln⁡x=xe^{\ln x} = x only for x>0x > 0, where ln⁡x\ln x exists.

Finding an inverse: swap, then make y the subject

f−1f^{-1} undoes ff: f(a)=bf(a) = b exactly when f−1(b)=af^{-1}(b) = a. An inverse exists only when ff is one-to-one (each output comes from exactly one input), and SL questions state a domain on which it is. The notation, the reflection in y=xy = x and "the domain of f−1f^{-1} is the range of ff" are first met in The idea of an inverse function; choosing a domain yourself to make ff one-to-one is HL.

To find f−1(x)f^{-1}(x):

  1. Write y=f(x)y = f(x).
  2. Swap xx and yy. (Making xx the subject first and swapping at the end also scores: the swap earns its own method mark wherever it is seen.)
  3. Make yy the subject.
  4. Write f−1(x)=…f^{-1}(x) = \ldots ("y=…y = \ldots" is also accepted).
  5. The domain of f−1f^{-1} is the range of ff, and the range of f−1f^{-1} is the domain of ff.
  • linear, ax+bax + b
    After the swap
    undo the steps in reverse order
    Example
    f(x)=4x−1f(x) = 4x - 1. Swap: x=4y−1x = 4y - 1, so f−1(x)=x+14f^{-1}(x) = \frac{x + 1}{4}
  • rational, ax+bcx+d\frac{ax + b}{cx + d}
    After the swap
    multiply out, collect the yy terms on one side, factor out yy, divide
    Example
    f(x)=x+2x−3f(x) = \frac{x + 2}{x - 3}. Swap: x=y+2y−3x = \frac{y + 2}{y - 3}, so xy−3x=y+2xy - 3x = y + 2, xy−y=3x+2xy - y = 3x + 2, y(x−1)=3x+2y(x - 1) = 3x + 2 and f−1(x)=3x+2x−1f^{-1}(x) = \frac{3x + 2}{x - 1}, x≠1x \ne 1
  • root
    After the swap
    isolate the root, then square; the domain comes from the range of ff
    Example
    f(x)=x−1f(x) = \sqrt{x - 1} has range y≥0y \ge 0. x=y−1x = \sqrt{y - 1} gives f−1(x)=x2+1f^{-1}(x) = x^2 + 1, x≥0x \ge 0
  • exponential, p ekx+qp\,e^{kx} + q or p akx+qp\,a^{kx} + q
    After the swap
    isolate the power, then take ln⁡\ln (or log⁡a\log_a)
    Example
    f(x)=e2x−5f(x) = e^{2x} - 5. Swap: x=e2y−5x = e^{2y} - 5, so e2y=x+5e^{2y} = x + 5 and f−1(x)=12ln⁡(x+5)f^{-1}(x) = \frac{1}{2}\ln(x + 5), x>−5x > -5
  • logarithm, log⁡a(…)+q\log_a(\ldots) + q
    After the swap
    isolate the log, then write it as a power: log⁡au=v⇔u=av\log_a u = v \Leftrightarrow u = a^v
    Example
    f(x)=log⁡5x−3f(x) = \log_5 x - 3. Swap: x=log⁡5y−3x = \log_5 y - 3, so log⁡5y=x+3\log_5 y = x + 3 and f−1(x)=5x+3f^{-1}(x) = 5^{x + 3}
  • f−1(x)f^{-1}(x) is not 1f(x)\frac{1}{f(x)}. The −1-1 means "inverse", not a power: for f(x)=2xf(x) = 2x, f−1(x)=x2f^{-1}(x) = \frac{x}{2}, but 1f(x)=12x\frac{1}{f(x)} = \frac{1}{2x}.
  • A root's inverse needs its domain. x2+1x^2 + 1 on its own is a whole parabola, which is not one-to-one; f−1(x)=x2+1f^{-1}(x) = x^2 + 1, x≥0x \ge 0 is only its right half.
  • Check: f(f−1(x))=xf(f^{-1}(x)) = x (the identity function), or one point: if f(a)=bf(a) = b, then f−1(b)f^{-1}(b) must be aa.
  • In a context, keep the letters. Each letter keeps its meaning. For the cost C=20+4nC = 20 + 4n of nn tickets, the inverse gives nn from CC: make nn the subject, n=C−204n = \frac{C - 20}{4}. Swapping the letters would make CC stand for a number of tickets.

"f−1f^{-1}" in a question: which type?

Self-inverse functions

A function is self-inverse (its own inverse) when f−1=ff^{-1} = f. Applying it twice gets you back where you started: f(f(x))=xf(f(x)) = x. Its graph is its own reflection in y=xy = x, so the graph is symmetric in that line. Examples: f(x)=1xf(x) = \frac{1}{x} (the one SL 2.8 names), f(x)=6−xf(x) = 6 - x, and f(x)=3x+1x−3f(x) = \frac{3x + 1}{x - 3}.

  • Two ways to show it, and both score: find f−1f^{-1} and see that it is the same formula as ff; or show that f(f(x))=xf(f(x)) = x for every xx. One number, such as f(f(2))=2f(f(2)) = 2, proves nothing.
  • A shortcut for rational functions. Reflecting in y=xy = x swaps the vertical and horizontal asymptotes, so a self-inverse ax+bcx+d\frac{ax + b}{cx + d} has asymptotes x=kx = k and y=ky = k with the same kk: they cross on y=xy = x. Markschemes accept this for finding a constant; comparing f−1f^{-1} with ff always works.

Mini-example: f(x)=3x+1x−3f(x) = \frac{3x + 1}{x - 3}, x≠3x \ne 3. Swap: x=3y+1y−3x = \frac{3y + 1}{y - 3}, so xy−3x=3y+1xy - 3x = 3y + 1, then xy−3y=3x+1xy - 3y = 3x + 1 and y=3x+1x−3y = \frac{3x + 1}{x - 3}: the same formula, so f−1=ff^{-1} = f. The asymptotes are x=3x = 3 and y=3y = 3.

  • Boundary: the general theory of self-inverse functions is HL (AHL 2.14). SL papers have set only the two shapes worked in Find the inverse function, with its domain: show that f−1=ff^{-1} = f, and find a constant given that f−1=ff^{-1} = f.
  • y=f(x)=f−1(x)y = f(x) = f^{-1}(x)
  • y=xy = x

A self-inverse graph is its own reflection in y=xy = x: the two branches of y=3x+1x−3y = \frac{3x + 1}{x - 3} are mirror images in that line, and its asymptotes, x=3x = 3 and y=3y = 3, swap into each other, crossing on y=xy = x.


Where composite and inverse functions hide in other topics

Composites and inverses turn up inside other topics, usually as one step. The first move is to see which function acts first, or that a value is being undone.

  • Differentiating esin⁡xe^{\sin x}, 4x−1\sqrt{4x - 1} or ln⁡(x2+4)\ln\left(x^2 + 4\right) (Differentiate: choose the rule)
    It becomes
    a composite taken apart: the inner gg and the outer ff, then f′(g(x))×g′(x)f'(g(x)) \times g'(x)
    Watch for
    the chain rule's g′(x)g'(x) factor; and a point on the graph of f(g(x))f(g(x)) at x=1x = 1 is (1,f(g(1)))(1, f(g(1)))
  • The region enclosed by the graphs of ff and f−1f^{-1}, on P2 (Area between two curves)
    It becomes
    the meeting points first (The graphs of f and f⁻¹: reflect in y = x, find where they meet), then ∫(top−bottom) dx\int (\text{top} - \text{bottom})\,dx
    Watch for
    the region is symmetric in y=xy = x: a check is twice the area between the graph of ff and the line y=xy = x
  • An equation built from a composite, such as f(2x)=…f(2x) = \ldots with a trig ff (Solve a trig equation on an interval, Topic 3)
    It becomes
    the composite is one line; solving the equation is the work
    Watch for
    with 2x2x inside, the interval for 2x2x is twice as long (0≤2x≤2π0 \le 2x \le 2\pi for 0≤x≤π0 \le x \le \pi): list every solution for 2x2x in it, then divide by 2. Don't predict the count; the sketch decides it
  • f(ln⁡x)≤cf(\ln x) \le c, after f(x)≤cf(x) \le c has been solved in an earlier part (Quadratic inequalities: when is it above or below?); the substitution is Quadratic in disguise
    It becomes
    replace xx by ln⁡x\ln x in the earlier answer, then undo the ln⁡\ln: −2≤ln⁡x≤3-2 \le \ln x \le 3 gives e−2≤x≤e3e^{-2} \le x \le e^3
    Watch for
    exe^x is increasing, so the inequality signs stay the same way round
  • "Show that ff has an inverse", "ff is one-to-one", on an interval (Where is f increasing or decreasing?)
    It becomes
    f′(x)>0f'(x) > 0 (or f′(x)<0f'(x) < 0) throughout the interval
    Watch for
    existence only: choosing a domain yourself so that f−1f^{-1} exists is HL
  • The value of the inverse of an exponential, once f−1(x)=log⁡a(…)f^{-1}(x) = \log_a(\ldots) has been found or given (Exact value of a logarithm: write it as a power, Topic 1)
    It becomes
    substitute, then write the log as a power
    Watch for
    before the formula is found, the same value is Values of f, f∘g and f⁻¹ from a graph or a formula: solve f(x)=bf(x) = b
  • "Show that reflecting the graph of ff in the yy-axis and then in the xx-axis gives the graph of f−1f^{-1}" (Transform a graph: new equation, image points, sketch, range)
    It becomes
    −f(−x)-f(-x), simplified, then compared with f−1(x)f^{-1}(x)
    Watch for
    use a general point (x,y)(x, y): one particular point scores nothing
  • g(f(x))g(f(x)) with g(x)=x+kg(x) = x + k, asked as a transformation (Name the transformation: describe it or find its constants)
    It becomes
    f(x)+kf(x) + k: a vertical translation by kk
    Watch for
    "translation", not "move"
  • The point on the graph of a self-inverse function closest to the origin, on P2 (Optimisation: use the constraint, then optimise)
    It becomes
    minimise x2+(f(x))2\sqrt{x^2 + (f(x))^2} on the GDC; by symmetry in y=xy = x, the points where f(x)=xf(x) = x are candidates (take the nearer one), and markschemes have accepted this when it was the nearest
    Watch for
    symmetry alone proves nothing: only if a single point of the whole graph is nearest must it be on y=xy = x. f(x)=5x−24x−5f(x) = \frac{5x - 24}{x - 5} is self-inverse, but (0.209,4.79)(0.209, 4.79) and (4.79,0.209)(4.79, 0.209) are nearer to the origin than (4,4)(4, 4) on y=xy = x

More in Functions

Every topic of the course

Guides