Mf4, Mf5 - Composite and inverse functions

Mf4, Mf5 - Composite and inverse functions

A composite must use its functions in the right order and respect both domains. Learn to determine composite rules and domains, decide when a function can be reversed, and find the inverse's formula, graph, domain and range.

Following the order of a composite function

Start at 22. If you triple and subtract 22, then square, you reach 1616. Square first, then triple and subtract 22, and you reach 1010. Can either route be undone, and what must the reverse route accept as inputs?

You already know

A function's rule and domain work together. A whole expression substituted into an input slot needs brackets, especially before a power.

Name “triple and subtract 22” as f\mathrm f, and “square” as g\mathrm g. Reading from the input outwards keeps the order visible.

Composite function

gf(x)=g(f(x))\mathrm{gf}(x)=\mathrm g(\mathrm f(x)) means apply f\mathrm f first and g\mathrm g second. It is one function feeding another, rather than the product of their outputs. Repeating f\mathrm f is written f2(x)=f(f(x))\mathrm f^2(x)=\mathrm f(\mathrm f(x)); squaring its output is [f(x)]2[\mathrm f(x)]^2.

These notation conventions are not in the formula sheet: learn them. The functions nearest the input act first, even though the letters are read in the opposite order in ordinary prose.

Worked example 1: keeping the inner rule intact

Question. f(x)=3x−2\mathrm f(x)=3x-2 and g(x)=x2\mathrm g(x)=x^2, both defined on R\mathbb R. Determine gf(x)\mathrm{gf}(x), fg(x)\mathrm{fg}(x) and f2(x)\mathrm f^2(x).

Plan. Put the entire inner expression into the outer function's input slot.

gf(x)=(3x−2)2square the output of ffg(x)=3x2−2apply f to x2f2(x)=3(3x−2)−2repeat f=9x−8expand and simplify\begin{aligned} \mathrm{gf}(x)&=(3x-2)^2 &&\text{square the output of }\mathrm f\\ \mathrm{fg}(x)&=3x^2-2 &&\text{apply }\mathrm f\text{ to }x^2\\ \mathrm f^2(x)&=3(3x-2)-2 &&\text{repeat }\mathrm f\\ &=9x-8 &&\text{expand and simplify} \end{aligned}

Why this step? In the first composite, the square applies to the full linear output, including its subtraction.

Answer. (3x−2)2(3x-2)^2, 3x2−23x^2-2 and 9x−89x-8, respectively.

Check. At x=2x=2, the first two values are 1616 and 1010, agreeing with the opening routes.

Change only the exponent in g\mathrm g from 22 to 33. This changes the two routes using g\mathrm g, while the repeated f\mathrm f route stays fixed.

Worked example 2: changing the outer power

Question. f(x)=3x−2\mathrm f(x)=3x-2 and g(x)=x3\mathrm g(x)=x^3, both defined on R\mathbb R. Determine gf(x)\mathrm{gf}(x), fg(x)\mathrm{fg}(x) and f2(x)\mathrm f^2(x).

Plan. Substitute in the same order, taking care to cube the complete inner expression.

gf(x)=(3x−2)3f then gfg(x)=3x3−2g then ff2(x)=3(3x−2)−2=9x−8f twice\begin{aligned} \mathrm{gf}(x)&=(3x-2)^3 &&\mathrm f\text{ then }\mathrm g\\ \mathrm{fg}(x)&=3x^3-2 &&\mathrm g\text{ then }\mathrm f\\ \mathrm f^2(x)&=3(3x-2)-2=9x-8 &&\mathrm f\text{ twice} \end{aligned}

Why this step? Composition order depends on which rule receives which input, not on whether a rule is linear, a square or a cube.

Answer. (3x−2)3(3x-2)^3, 3x3−23x^3-2 and 9x−89x-8, respectively.

Check. At x=2x=2, the values are 6464, 2222 and 1010. Only the first two change from using a different g\mathrm g.

There is no general equality gf=fg\mathrm{gf}=\mathrm{fg}. Some pairs do commute, such as adding 11 and adding 22, but that must be established for the functions concerned.

Watch out

Wrong: gf(x)=g(x)f(x)\mathrm{gf}(x)=\mathrm g(x)\mathrm f(x). Right: feed one output into the other rule. With the first example's functions, the product is x2(3x−2)x^2(3x-2), a different expression.

Keep the substitution method and try two different linear functions.

Checking both stages of the domain

A composite's domain has two gates: the input must enter the first function, and its image must enter the second. A simplified expression cannot remove a restriction imposed by either gate.

Composite domain

Dgf={x∈Df:f(x)∈Dg}D_{\mathrm{gf}}=\{x\in D_{\mathrm f}:\mathrm f(x)\in D_{\mathrm g}\}

The starting input belongs to DfD_{\mathrm f}; the intermediate output belongs to DgD_{\mathrm g}.

Not in the formula sheet: learn it.

For example, f(x)=x+1\mathrm f(x)=x+1 on [0,2][0,2] followed by g(x)=x−1\mathrm g(x)=x-1 on R\mathbb R gives gf(x)=x\mathrm{gf}(x)=x, but only on [0,2][0,2]. Cancellation changes the written rule, not the permitted starting set.

Worked example 3: a root feeding a reciprocal

Question. f(x)=x+2\mathrm f(x)=\sqrt{x+2}, with domain x≥−2x\ge-2, and g(x)=1/(x−1)\mathrm g(x)=1/(x-1), with domain x≠1x\ne1. Determine gf(x)\mathrm{gf}(x) and its domain.

Plan. Keep the first domain and find the input whose intermediate image is the forbidden value 11.

gf(x)=1x+2−1compose the two rulesx≥−2enter the root functionx+2≠1enter the reciprocal functionx≠−1translate the forbidden image\begin{aligned} \mathrm{gf}(x)&=\frac1{\sqrt{x+2}-1} &&\text{compose the two rules}\\ x&\ge-2 &&\text{enter the root function}\\ \sqrt{x+2}&\ne1 &&\text{enter the reciprocal function}\\ x&\ne-1 &&\text{translate the forbidden image} \end{aligned}

Why this step? The second function's input is x+2\sqrt{x+2}, not the starting xx; simply excluding x=1x=1 would test the wrong quantity.

Answer. gf(x)=1/(x+2−1)\mathrm{gf}(x)=1/(\sqrt{x+2}-1), with domain [−2,∞)∖{−1}[-2,\infty)\setminus\{-1\}.

Check. −2-2 is allowed: the route is −2↦0↦−1-2\mapsto0\mapsto-1. The input −1-1 reaches the forbidden intermediate value 11.

Change only the order. The reciprocal now acts first, so the root imposes an inequality on that reciprocal's output.

Worked example 4: the reversed composite domain

Question. For the same two functions and domains, determine fg(x)\mathrm{fg}(x) and its domain.

Plan. Exclude the pole, then require the intermediate image to be at least −2-2.

fg(x)=1x−1+2compose in the new orderx≠1first function is defined1x−1≥−2input allowed by f2x−1x−1≥0combine the terms\begin{aligned} \mathrm{fg}(x)&=\sqrt{\frac1{x-1}+2} &&\text{compose in the new order}\\ x&\ne1 &&\text{first function is defined}\\ \frac1{x-1}&\ge-2 &&\text{input allowed by }\mathrm f\\ \frac{2x-1}{x-1}&\ge0 &&\text{combine the terms} \end{aligned}

The numerator is zero at 1/21/2. On x<1/2x<1/2, numerator and denominator are negative; on 1/2<x<11/2<x<1, their signs differ; on x>1x>1, both are positive. The zero numerator at 1/21/2 is allowed, but the pole at 11 is not.

Why this step? A sign analysis avoids multiplying an inequality by an expression whose sign is unknown.

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

Check. At x=1/2x=1/2, the root argument is 00. At x=3/4x=3/4, it is −2-2, confirming why that interval is excluded.

A composite can therefore have a different domain from either component, and reversing its order can change the domain again.

Watch out

Wrong: use only the inner function's domain. Right: also test the entire inner image against the outer function's domain, including any explicitly stated restriction.

Move the root endpoint and pole, keeping the same kind of two-stage decision.

Making reversal a function

To reverse a function, an output must identify which input made it. If two inputs share an image, the reverse assignment would have two answers.

Inverse function

A one-to-one function f\mathrm f has an inverse f−1\mathrm f^{-1} taking each image back to its unique input. A many-to-one function needs a restriction to a one-to-one domain first. The inverse's domain is RfR_{\mathrm f}, and its range is DfD_{\mathrm f}.

A horizontal line meeting the forward graph twice exposes a failure of one-to-one behaviour. Once the graph is reflected in y=xy=x, those intersections would lie on the same vertical line, so the reflection would fail the function test. These conditions are not in the formula sheet: learn them.

Worked example 5: selecting the increasing branch

Question. For q(x)=(x−1)2\mathrm q(x)=(x-1)^2, explain why no inverse function exists on R\mathbb R, then find the inverse for the restriction x≥1x\ge1.

Plan. Exhibit a repeated image, then reverse the rule using the non-negative distance from 11.

q(0)=q(2)=1full-domain ambiguityy=(x−1)2output equationx−1=yuse x≥1x=1+yrecover the input\begin{aligned} \mathrm q(0)&=\mathrm q(2)=1 &&\text{full-domain ambiguity}\\ y&=(x-1)^2 &&\text{output equation}\\ x-1&=\sqrt y &&\text{use }x\ge1\\ x&=1+\sqrt y &&\text{recover the input} \end{aligned}

Why this step? The domain removes the negative-root possibility and makes the recovered input unique.

Answer. No inverse exists on R\mathbb R. On [1,∞)[1,\infty), the inverse is q−1(x)=1+x\mathrm q^{-1}(x)=1+\sqrt{x}, with domain [0,∞)[0,\infty) and range [1,∞)[1,\infty).

Check. q(3)=4\mathrm q(3)=4, then q−1(4)=3\mathrm q^{-1}(4)=3; also q(q−1(4))=4\mathrm q(\mathrm q^{-1}(4))=4.

Change only the chosen branch to x≤1x\le1. The output interval stays the same, but reversal must recover a different input.

Worked example 6: selecting the decreasing branch

Question. For q(x)=(x−1)2\mathrm q(x)=(x-1)^2, explain why no inverse function exists on R\mathbb R, then find the inverse for the restriction x≤1x\le1.

Plan. Use the same ambiguity and select the non-positive distance from 11.

q(0)=q(2)=1full domain is many-to-oney=(x−1)2start the reversalx−1=−yuse x≤1x=1−yrecover the left-hand input\begin{aligned} \mathrm q(0)&=\mathrm q(2)=1 &&\text{full domain is many-to-one}\\ y&=(x-1)^2 &&\text{start the reversal}\\ x-1&=-\sqrt y &&\text{use }x\le1\\ x&=1-\sqrt y &&\text{recover the left-hand input} \end{aligned}

Why this step? A positive-root choice would return values above 11, outside this forward domain.

Answer. On (−∞,1]( -\infty,1], q−1(x)=1−x\mathrm q^{-1}(x)=1-\sqrt{x}, with domain [0,∞)[0,\infty) and range (−∞,1]( -\infty,1].

Check. q(−1)=4\mathrm q(-1)=4, the new inverse sends 44 back to −1-1, and applying q\mathrm q again gives 44.

Another important inverse pair is ex\mathrm e^x and ln⁡x\ln x. The exponential has domain R\mathbb R and range (0,∞)(0,\infty); its inverse logarithm has domain (0,∞)(0,\infty) and range R\mathbb R. Thus ln⁡(ex)=x\ln(\mathrm e^x)=x for real xx, while eln⁡x=x\mathrm e^{\ln x}=x needs x>0x>0. For example, ln⁡(e2)=2\ln(\mathrm e^2)=2: the logarithm recovers the exponential's input. This inverse relationship is not in the formula sheet: learn it. Their own lessons develop the rules; here notice the exchanged sets.

Watch out

Wrong: an inverse is the reciprocal. For f(x)=2x−1\mathrm f(x)=2x-1, the inverse is (x+1)/2(x+1)/2, while the reciprocal is 1/(2x−1)1/(2x-1). Only the inverse reverses the operation.

Explain the existence decision for a new quadratic before selecting a domain.

Finding and checking an inverse

An inverse formula comes from solving the output equation for the input. Its domain and range come from the forward function, including every stated restriction.

Inverse domains and checks

Df−1=Rf,Rf−1=DfD_{\mathrm f^{-1}}=R_{\mathrm f},\qquad R_{\mathrm f^{-1}}=D_{\mathrm f} f−1(f(x))=x(x∈Df),f(f−1(x))=x(x∈Rf)\mathrm f^{-1}(\mathrm f(x))=x\quad(x\in D_{\mathrm f}),\qquad \mathrm f(\mathrm f^{-1}(x))=x\quad(x\in R_{\mathrm f})

Use a one-to-one forward function on its stated domain.

Not in the formula sheet: learn it.

For rational functions, collect the input terms before dividing. This also identifies any forbidden output value.

Worked example 7: inverse of a rational rule

Question. f(x)=(3x−2)/(x+1)\mathrm f(x)=(3x-2)/(x+1), with domain R∖{−1}\mathbb R\setminus\{-1\}. Determine its inverse, stating the inverse's domain and range.

Plan. Rearrange y=f(x)y=\mathrm f(x), establish the forward range and exchange the sets.

y(x+1)=3x−2clear the denominatorx(y−3)=−y−2collect the input termsx=y+23−ysolve for the input\begin{aligned} y(x+1)&=3x-2 &&\text{clear the denominator}\\ x(y-3)&=-y-2 &&\text{collect the input terms}\\ x&=\frac{y+2}{3-y} &&\text{solve for the input} \end{aligned}

Why this step? Output 33 would imply −2=3-2=3, which is impossible. Every y≠3y\ne3 gives one input from this rearrangement, and that input cannot be −1-1.

Answer. f−1(x)=(x+2)/(3−x)\mathrm f^{-1}(x)=(x+2)/(3-x), with domain R∖{3}\mathbb R\setminus\{3\} and range R∖{−1}\mathbb R\setminus\{-1\}.

Check. Both compositions reduce to the input:

f−1(f(x))=5x/(x+1)5/(x+1)=xx≠−1f(f−1(x))=5x/(3−x)5/(3−x)=xx≠3\begin{aligned} \mathrm f^{-1}(\mathrm f(x))&=\frac{5x/(x+1)}{5/(x+1)}=x &&x\ne-1\\ \mathrm f(\mathrm f^{-1}(x))&=\frac{5x/(3-x)}{5/(3-x)}=x &&x\ne3 \end{aligned}

Also f(0)=−2\mathrm f(0)=-2 and f−1(−2)=0\mathrm f^{-1}(-2)=0.

Change only the forward domain to [0,∞)[0,\infty). The algebraic rule remains identical, but the inverse cannot keep its old input set.

Worked example 8: the same formula with a restricted inverse

Question. f(x)=(3x−2)/(x+1)\mathrm f(x)=(3x-2)/(x+1), now with domain [0,∞)[0,\infty). Determine its inverse, stating the inverse's domain and range.

Plan. Use the same rearrangement, then find the images of the restricted forward domain.

y(x+1)=3x−2start the reversalx=y+23−ycollect and dividef(x)=3−5x+1expose the output boundsx≥0⟹−2≤f(x)<3x+1≥1\begin{aligned} y(x+1)&=3x-2 &&\text{start the reversal}\\ x&=\frac{y+2}{3-y} &&\text{collect and divide}\\ \mathrm f(x)&=3-\frac5{x+1} &&\text{expose the output bounds}\\ x\ge0&\Longrightarrow -2\le\mathrm f(x)<3 &&x+1\ge1 \end{aligned}

For every −2≤y<3-2\le y<3, the recovered input (y+2)/(3−y)(y+2)/(3-y) is non-negative, so every output in this interval is attained.

Why this step? A denominator restriction alone only excludes 33; the stated forward domain removes many more possible outputs.

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

Check. The same composition identities hold, now for x≥0x\ge0 and −2≤x<3-2\le x<3, respectively. At x=1x=1, f(1)=1/2\mathrm f(1)=1/2 and f−1(1/2)=1\mathrm f^{-1}(1/2)=1; the included inverse input −2-2 returns 00.

In a graph, inverse points exchange coordinates: (1,0)(1,0), (2,1)(2,1), (3,4)(3,4) on (x−1)2(x-1)^2, x≥1x\ge1, become (0,1)(0,1), (1,2)(1,2), (4,3)(4,3). This is reflection in y=xy=x.

Restricted quadratic and its inverse reflected in the line y equals x

Reflect the complete permitted branch, including endpoint types. Intercepts exchange roles, and a vertical asymptote reflects to a horizontal one. For the unrestricted rational example, x=−1x=-1 and y=3y=3 exchange to y=−1y=-1 and x=3x=3.

Some functions even undo themselves: s(x)=5−x\mathrm s(x)=5-x on R\mathbb R satisfies s(s(x))=5−(5−x)=x\mathrm s(\mathrm s(x))=5-(5-x)=x. Its inverse is itself, although it is not the identity function. Taking a second trip through the same rule reverses the first.

Exam tip

If asked for an inverse's domain and range, determine the forward range first. Repeating the forward domain twice loses the distinction the question is testing.

The opening linear operation can be reversed by adding 22, then dividing by 33. A following square can be reversed as a function only after choosing a suitable branch. Try the algebra with a different rational rule.

Quick Recap

  • gf(x)\mathrm{gf}(x) applies f\mathrm f first; it is a composite, not a product.
  • Its domain keeps every first-stage restriction and requires the image to enter the second domain.
  • One-to-one behaviour makes reversal a function; a quadratic's domain chooses its root branch.
  • Rearrange to find an inverse, exchange domain and range, check both compositions and reflect the graph in y=xy=x.

The opening routes reach 1616 and 1010. Reversing a route requires reversing its order and choosing domains that make each reverse step unique.