When can two functions compose?

The functions are f(x)=x−2f(x)=\sqrt{x-2} for x≥2x\ge2, and g(x)=3x2−6x+5g(x)=3x^2-6x+5 for 0≤x≤40\le x\le4, with real inputs.

(i) Sketch y=f(x) and state its range. marks

(ii) Find the inverse of f and its domain. marks

(iii) Show that fg exists. marks

(iv) Find fg(x) and its range. marks

(v) With g now defined on all real numbers, describe fully a sequence of transformations taking y=g(x) to y=x2−1y=x^2-1. marks

[2023/MI/Promo/PU2/I/8]

Total marks: 12

Solution

If this part uses an earlier result, revisit (ii) Inverse functions or open all working together.

(iii)

Existence of composites

Show that fgfg exists.

Explore this idea

Hint

  1. fgfg exists when Rg⊆DfR_g\subseteq D_f.

  2. Find RgR_g by completing the square and checking the endpoints of the domain.

  3. Compare with Df=[2,∞)D_f=[2,\infty).

Answer · (iii)

fgfg exists: Rg=[2,29]⊆Df=[2,∞)R_g=[2,29]\subseteq D_f=[2,\infty).

Explore the idea

Open interactive exploration

Does every output of g fit into f?

Drag x. The range of g (purple) must lie inside the domain of f (teal).

Input x (in the domain of g)x = 2.00
Try an example
input
2
↓ g
g(x)
5
↓ f
fg(x)
1.73205

5 is an allowed input of f.

D_fR_g01632

D_f: [2, ∞); R_g: [2, 29]. Finite bounds are shown to 6 significant figures. Hollow ends are excluded; arrows continue beyond this window.

Selected output: 5.

The composite exists

Rg=[2,29]⊆Df=[2,∞)R_g=[2,29]\subseteq D_f=[2,\infty): the smallest output of gg is exactly the first allowed input of ff.

  • G(x) on its domain
  • Fg(x), when it exists
  • Lower end of D_f
Key idea

Because gg's smallest output (2) is exactly ff's smallest allowed input, the composite exists with no gaps.

Ideas to try
  1. Drag xx to 1. What is g(1)g(1)? Is it allowed in ff?
  2. Which xx gives the largest output?