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

(i)

Range from a graph

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. Sketch y=f(x)y=f(x) and state its range.

Explore this idea

Hint

  1. Square-root graph starting where the radicand is zero.

  2. Read the range off the yy-values of the graph.

y=f(x)=√(x−2)
y=f(x)=√(x−2)Scroll across to see the full diagram.

Answer · (i)

Rf=[0,∞)R_f=[0,\infty); closed start (2,0)(2,0).

Explore the idea

The square root starts at (2, 0)

Switch on the features.

Switch on a feature to add it to the sketch and see how it is found. A full-mark sketch shows all of them.

  • Y = √(x − 2)
  • Lower bound of the range
Ideas to try
Is there any xx for which f(x)f(x) is negative?
(ii)

Inverse functions

Find the inverse of ff and state its domain.

Explore this idea

Hint

  1. Write y=x−2y=\sqrt{x-2} and make xx the subject.

  2. Swap the names xx and yy.

  3. The domain of f−1f^{-1} is the range of ff.

Answer · (ii)

f−1(x)=x2+2f^{-1}(x)=x^2+2, x≥0x\ge0.

Explore the idea

f and f⁻¹ are mirror images in y = x

Drag the input. P is the point (x, f(x)) and Q is its mirror image (f(x), x), which lies on the inverse.

Point on f: input xx = 4.00
Try an example

Reflection swaps the coordinates. The segment PQ is perpendicular to y = x, and its blue midpoint M lies on that line.

P = (x, f(x))
(4, 1.41421)
Q = (f(x), x)
(1.41421, 4)
on the inverse
Domain of f
x≥2x\ge2
Range of f = domain of f⁻¹
y≥0y\ge0
Midpoint M on y = x
(2.70711, 2.70711)
  • F(x) = √(x − 2)
  • F⁻¹(x) = x² + 2, for x ≥ 0
  • Mirror y = x
  • PQ is perpendicular to y = x; its blue midpoint M lies on that line
Key idea

Reflecting in y=xy=x swaps inputs and outputs: the domain of ff becomes the range of f−1f^{-1}, and vice versa.

Ideas to try
  1. Move xx to 2. Where is QQ? Why is the inverse's graph starting at (0,2)(0,2)?
  2. Why is the inverse only drawn for x≥0x\ge0?
(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

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?
(iv)

Composite rule and range

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

Explore this idea

Hint

  1. Substitute g(x)g(x) into ff.

  2. Simplify the radicand.

  3. For the range, use the range of gg as the new domain of ff.

Answer · (iv)

fg(x)=3∣x−1∣fg(x)=\sqrt3|x-1|, Rfg=[0,27]R_{fg}=[0,\sqrt{27}].

0≤x≤40\le x\le4.

Explore the idea

A V with vertex (1, 0)

fg(x) = √3|x − 1| on the domain of g, 0 ≤ x ≤ 4.

Switch on a feature to add it to the sketch and see how it is found. A full-mark sketch shows all of them.

  • Fg(x)
  • Maximum
Ideas to try
Why is the graph not symmetric about x=1x=1? (The domain stops at x=0x=0 on the left.)
(v)

Transformations

With gg now defined for all real xx, describe fully a sequence of transformations that takes the graph of y=g(x)y=g(x) to the graph of y=x2−1y=x^2-1.

Explore this idea

Hint

  1. Complete the square: g(x)=3(x−1)2+2g(x)=3(x-1)^2+2.

  2. Remove the xx-translation, then handle the stretch and the vertical shift.

  3. Track the vertex: (1,2)→(0,−1)(1,2)\to(0,-1).

Answer · (v)

Translate left 1, down 5, then scale vertically by 1/3.

Explore the idea

From 3(x − 1)² + 2 to x² − 1

Translate left, translate down, then squash vertically.

Teal: y = 3(x − 1)² + 2. No comparison overlay.

Start: y = 3(x − 1)² + 2

Vertex (1,2)(1,2).

  • Graph at the selected step
  • Vertex
Ideas to try
Follow the vertex through the four stages.