Try each one on paper first, then check a single step. That is worth far more than reading a finished solution.
Example 1 — composites in both orders
Given f(x)=2x+3 and g(x)=x2, find fg(x) and gf(x).
- 1fg(x) applies g first.The function nearest the x acts first — read it like brackets.
- 2fg(x)=f(x2)=2x2+3Replace every x in f with x2.
- 3gf(x) applies f first.
- 4gf(x)=g(2x+3)=(2x+3)2The whole of 2x+3 is squared.
- 5=4x2+12x+9Different from fg(x), as composites usually are.
Example 2 — an inverse and its check
Find f−1(x) for f(x)=2x+3, and verify it.
- 1f is one-to-one (it is linear with non-zero gradient), so an inverse exists.Always worth stating.
- 2Write y=2x+3.
- 3Make x the subject: x=2y−3Undo the +3, then the ×2.
- 4f−1(x)=2x−3
- 5Check: f(5)=13 and f−1(13)=210=5 ✓Feeding a number through both functions returns the original.
Example 3 — restricting a domain to create an inverse
Explain why f(x)=x2 on R has no inverse, and give a restriction that fixes it.
- 1f(2)=4 and f(−2)=4.Two different inputs share an output.
- 2So f is not one-to-one, and fails the horizontal line test.The line y=4 cuts the parabola twice.
- 3An inverse would not know whether to return 2 or −2.So no inverse function exists on R.
- 4Restrict the domain to x≥0.Either side of the turning point works; x≤0 would do equally well.
- 5Now f is one-to-one, and f−1(x)=x for x≥0.This is exactly why the root key returns only the positive root.