2.4, 2.5 - Composite and inverse functions

2.4, 2.5 - Composite and inverse functions

Combine functions by feeding one output into the next, then reverse a function to recover its original input. In 2.4 you will work with composite rules and equations; in 2.5 you will use algebra and domains to work out inverse functions and check that they undo the original rule.

Composite functions and their order

Can a function be its own undo button? The rule h(x)=x+1x−1\mathrm{h}(x)=\frac{x+1}{x-1} sends 33 to 22, then sends 22 back to 33. Is that a lucky pair, or will applying the rule twice return every allowed input? By the last part you will be able to prove the answer.

First combine simpler rules. With f(x)=3x+2\mathrm{f}(x)=3x+2 and g(x)=x2\mathrm{g}(x)=x^2, input 22 can follow two routes. Squaring first gives 44, then 3(4)+2=143(4)+2=14. Using f\mathrm{f} first gives 88, then squaring gives 6464. The operations are the same, but their order changes the answer.

You already know

A function's brackets contain its input. To work out f(u)\mathrm{f}(u), substitute the whole expression uu wherever xx appears in the rule for f\mathrm{f}. The domain contains allowed inputs; the range contains their outputs.

A composite uses an intermediate output as the next input. You can calculate one stage at a time or substitute one complete rule inside the other.

[DIAGRAM: asset_name: Two orders for the same functions; asset_slug: l2fm-composite-order; caption: In fg, g acts first; reversing the order usually changes the result; description: Two left-to-right chains compare f(x) equals 3x plus 2 and g(x) equals x squared. The fg chain has input x, sage g square, intermediate x squared, blue f multiply by 3 then add 2, and output 3x squared plus 2. The gf chain has input x, blue f multiply by 3 then add 2, intermediate 3x plus 2, sage g square, and output (3x plus 2) squared. A numerical line beneath each gives input 2 mapping to 4 then 14, or to 8 then 64.]
In fg, g acts first

Composite function

A composite function is the result of functions acting in succession. In fg(x)\mathrm{fg}(x), g\mathrm{g} acts first and f\mathrm{f} acts on its output. The intermediate output must be an allowed input for the next function. For example, “square, then add 11” is a composite; multiplying two outputs is a different operation.

Read the notation from the input outwards: the letter nearest xx acts first. This convention also handles three functions: fgh(x)\mathrm{fgh}(x) means h\mathrm{h}, then g\mathrm{g}, then f\mathrm{f}.

Composition notation

fg(x)=f(g(x))\mathrm{fg}(x)=\mathrm{f}\bigl(\mathrm{g}(x)\bigr)

This is defined when xx is in the domain of g\mathrm{g} and g(x)\mathrm{g}(x) is in the domain of f\mathrm{f}. In general, fg(x)≠gf(x)\mathrm{fg}(x)\ne\mathrm{gf}(x).
Not on the formulae sheet: learn it.

Use the same two rules to work out both possible orders. Keep brackets around each whole substituted expression.

Worked example 1: g followed by f

Question. f(x)=3x+2\mathrm{f}(x)=3x+2 and g(x)=x2\mathrm{g}(x)=x^2. Work out fg(x)\mathrm{fg}(x).

Plan. Put the output x2x^2 of g\mathrm{g} into the input of f\mathrm{f}.

fg(x)=f(x2)g acts first=3(x2)+2replace the input in f=3x2+2simplify\begin{aligned} \mathrm{fg}(x)&=\mathrm{f}(x^2) && \mathrm{g}\text{ acts first}\\ &=3(x^2)+2 && \text{replace the input in }\mathrm{f}\\ &=3x^2+2 && \text{simplify} \end{aligned}

Why this step? The xx in 3x+23x+2 is an input slot. Here the entire slot is filled by x2x^2.

Answer. fg(x)=3x2+2\mathrm{fg}(x)=3x^2+2.

Check. At x=2x=2, the composite gives 3(4)+2=143(4)+2=14, matching the route 2⟼4⟼142\longmapsto4\longmapsto14.

Worked example 2 changes only the order of the functions. Now the whole linear expression must be squared.

Worked example 2: f followed by g

Question. f(x)=3x+2\mathrm{f}(x)=3x+2 and g(x)=x2\mathrm{g}(x)=x^2. Work out gf(x)\mathrm{gf}(x), expanding your answer.

Plan. Put 3x+23x+2 into the square rule, then expand both brackets.

gf(x)=g(3x+2)f acts first=(3x+2)2square the complete input=(3x+2)(3x+2)write the repeated factor=9x2+12x+4expand and collect terms\begin{aligned} \mathrm{gf}(x)&=\mathrm{g}(3x+2) && \mathrm{f}\text{ acts first}\\ &=(3x+2)^2 && \text{square the complete input}\\ &=(3x+2)(3x+2) && \text{write the repeated factor}\\ &=9x^2+12x+4 && \text{expand and collect terms} \end{aligned}

Why this step? Squaring a sum creates cross-products. The expression is not 9x2+49x^2+4.

Answer. gf(x)=9x2+12x+4\mathrm{gf}(x)=9x^2+12x+4.

Check. At x=2x=2, this gives 36+24+4=6436+24+4=64, matching 2⟼8⟼642\longmapsto8\longmapsto64.

Composition is not multiplication: f(x)g(x)=(3x+2)x2\mathrm{f}(x)\mathrm{g}(x)=(3x+2)x^2 is neither of these composites. When domains are restricted, check the middle of the chain too. If a(x)=x\mathrm{a}(x)=\sqrt{x} and b(x)=x−4\mathrm{b}(x)=x-4, then ab(x)=x−4\mathrm{ab}(x)=\sqrt{x-4} requires x⩾4x\geqslant4, even though b\mathrm{b} itself accepts every real input.

Watch out

Wrong: gf(x)=3x2+2\mathrm{gf}(x)=3x^2+2 for these rules. That is fg(x)\mathrm{fg}(x), the opposite order. Right: gf(x)=(3x+2)2\mathrm{gf}(x)=(3x+2)^2. Write the nested form before expanding if the order is easy to mix up.

Keep the same “linear rule, then square” route with new coefficients.

Equations involving function inputs

An equation such as f(2x)=gf(x)\mathrm{f}(2x)=\mathrm{gf}(x) compares two routes from the same starting value, so write each route as an expression before solving.

The distinction between changing the input and changing the output matters. For f(x)=x3+1\mathrm{f}(x)=x^3+1, replacing the input by 2x2x gives (2x)3+1=8x3+1(2x)^3+1=8x^3+1. Doubling the output gives 2(x3+1)=2x3+22(x^3+1)=2x^3+2. These are different operations.

Worked example 3: equal outputs from two routes

Question. f(x)=x3+1\mathrm{f}(x)=x^3+1 and g(x)=7x+2\mathrm{g}(x)=7x+2. Work out the value of xx for which f(2x)=gf(x)\mathrm{f}(2x)=\mathrm{gf}(x).

Plan. Form the two expressions separately, equate them, then solve the cubic equation.

f(2x)=(2x)3+1=8x3+1change the input of fgf(x)=7(x3+1)+2=7x3+9put f(x) into g8x3+1=7x3+9equate the outputsx3=8collect like termsx=2take the real cube root\begin{aligned} \mathrm{f}(2x)&=(2x)^3+1=8x^3+1 && \text{change the input of }\mathrm{f}\\ \mathrm{gf}(x)&=7(x^3+1)+2=7x^3+9 && \text{put }\mathrm{f}(x)\text{ into }\mathrm{g}\\ 8x^3+1&=7x^3+9 && \text{equate the outputs}\\ x^3&=8 && \text{collect like terms}\\ x&=2 && \text{take the real cube root} \end{aligned}

Why this step? In f(2x)\mathrm{f}(2x), the cube applies to the whole input 2x2x, so the multiplier becomes 23=82^3=8.

Answer. x=2x=2.

Check. f(4)=65\mathrm{f}(4)=65, while f(2)=9\mathrm{f}(2)=9 and g(9)=65\mathrm{g}(9)=65. Both routes give the same output.

Worked example 4 changes only the constant in g\mathrm{g}. The method is unchanged, but the solution is now negative.

Worked example 4: a negative solution

Question. f(x)=x3+1\mathrm{f}(x)=x^3+1 and g(x)=7x−14\mathrm{g}(x)=7x-14. Work out the value of xx for which f(2x)=gf(x)\mathrm{f}(2x)=\mathrm{gf}(x).

Plan. Substitute carefully into both routes, then solve their equality without dropping the constant terms.

f(2x)=8x3+1cube the complete inputgf(x)=7(x3+1)−14=7x3−7retain the constant −148x3+1=7x3−7equate the outputsx3=−8subtract 7x3+1x=−2(−2)3=−8\begin{aligned} \mathrm{f}(2x)&=8x^3+1 && \text{cube the complete input}\\ \mathrm{gf}(x)&=7(x^3+1)-14=7x^3-7 && \text{retain the constant }-14\\ 8x^3+1&=7x^3-7 && \text{equate the outputs}\\ x^3&=-8 && \text{subtract }7x^3+1\\ x&=-2 && (-2)^3=-8 \end{aligned}

Why this step? The final constant belongs to g\mathrm{g}, so it is applied after the multiplication by 77. It must not disappear when the inner function is substituted.

Answer. x=−2x=-2.

Check. f(−4)=−63\mathrm{f}(-4)=-63, while f(−2)=−7\mathrm{f}(-2)=-7 and g(−7)=−63\mathrm{g}(-7)=-63.

Both rules in these examples accept all real inputs. With restricted functions, also check that a solution permits every stage of its route; an algebraic solution outside an allowed domain is not a solution of the function equation.

Watch out

Wrong: f(2x)=2f(x)\mathrm{f}(2x)=2\mathrm{f}(x). For f(x)=x3+1\mathrm{f}(x)=x^3+1, the correct expressions are 8x3+18x^3+1 and 2x3+22x^3+2. Put brackets around the whole substituted input and retain the function's constant term.

Change the constant once more and solve the same two-route comparison.

Inverse functions reverse the mapping

An inverse takes an output of the original function and returns the input that produced it.

Inverse function

The inverse function of f\mathrm{f}, written f−1\mathrm{f}^{-1}, reverses the input-output mapping. It exists on the range of f\mathrm{f} when each output comes from exactly one allowed input. For example, if f(4)=7\mathrm{f}(4)=7, then f−1(7)=4\mathrm{f}^{-1}(7)=4. The notation f−1(x)\mathrm{f}^{-1}(x) does not mean 1f(x)\frac1{\mathrm{f}(x)}.

The domain and range swap roles: the original outputs become the inverse's inputs, and the original inputs become its outputs. To obtain a rule, write y=f(x)y=\mathrm{f}(x), rearrange to make the original input xx the subject, then rename the inverse's input as xx. Alternatively, swap xx and yy first, then rearrange. Both routes reverse the same mapping.

You already know

Rearrange an equation by applying the same operation to both sides. To undo a chain of operations, reverse their order: if the original rule doubles, adds 55, then divides by 33, the reverse multiplies by 33, subtracts 55, then divides by 22.

You can check the complete rule by putting the two functions together. A successful inverse returns the starting input throughout the relevant domain, not just at one convenient number.

Inverse checks and domains

f−1(f(x))=xx in the domain of ff(f−1(x))=xx in the range of f\begin{aligned} \mathrm{f}^{-1}\bigl(\mathrm{f}(x)\bigr)&=x && x\text{ in the domain of }\mathrm{f}\\ \mathrm{f}\bigl(\mathrm{f}^{-1}(x)\bigr)&=x && x\text{ in the range of }\mathrm{f} \end{aligned}

The domain of f−1\mathrm{f}^{-1} is the range of f\mathrm{f}; its range is the domain of f\mathrm{f}.
Not on the formulae sheet: learn it.

Begin with a linear rule. Its non-zero coefficient means each output comes from just one input, so no domain restriction is needed here.

Worked example 5: reversing a linear rule

Question. f(x)=5+2x3\mathrm{f}(x)=\frac{5+2x}{3}. Work out f−1(x)\mathrm{f}^{-1}(x).

Plan. Write the output as yy, make the original input the subject, then express the inverse using input xx.

y=5+2x3name the output3y=5+2xmultiply by 33y−5=2xsubtract 5x=3y−52divide by 2\begin{aligned} y&=\frac{5+2x}{3} && \text{name the output}\\ 3y&=5+2x && \text{multiply by }3\\ 3y-5&=2x && \text{subtract }5\\ x&=\frac{3y-5}{2} && \text{divide by }2 \end{aligned}

Why this step? The rearranged equation gives the original input in terms of its output, which is exactly what the inverse must do.

Answer. f−1(x)=3x−52\mathrm{f}^{-1}(x)=\frac{3x-5}{2}.

Check. f−1(f(x))=3(5+2x3)−52=2x2=x\mathrm{f}^{-1}\bigl(\mathrm{f}(x)\bigr)=\frac{3\left(\frac{5+2x}{3}\right)-5}{2}=\frac{2x}{2}=x Also, f(2)=3\mathrm{f}(2)=3 and f−1(3)=2\mathrm{f}^{-1}(3)=2.

Continue this lesson.

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

Create free account