H2 Mathematics · JC 1 and 2
Functions
Functions are the language of H2 Mathematics. A function is a rule that assigns each element of a set, the domain, to exactly one value. In this topic you work with domain and range, decide whether a function is one-one, find inverse functions, and form composite functions, stating when they exist. The ideas underpin graphing, calculus and the rest of the course, and questions often combine them with graph sketching and with restricting a domain so that an inverse exists.
What the syllabus expects
- Use function notation, such as f(x) = 2x + 1, x ∈ ℝ, and state the domain and range of a function
- Determine whether a function is one-one, using the horizontal line test or a counterexample
- Find the inverse f⁻¹ of a one-one function and state its domain and range
- Understand the graphical relationship between f and f⁻¹ as reflections in the line y = x
- Form composite functions such as fg, and state the condition for fg to exist: the range of g must be a subset of the domain of f
- Restrict the domain of a function so that its inverse exists
Domain, range and what makes a function
A function f has a domain, the set of allowed inputs, and a rule that gives exactly one output for each input. The range is the set of all outputs. The domain is part of the definition, so f(x) = x², x ∈ ℝ and g(x) = x², x ≥ 0 are different functions. To find the range, sketch the graph over the given domain and read off the y-values it covers, taking care with endpoints and asymptotes. For example, f(x) = x² - 4x + 1 for x ∈ ℝ can be written as (x - 2)² - 3, so its range is [-3, ∞). If the domain is restricted to 0 ≤ x ≤ 5, the range becomes [-3, 6], because f(5) = 6 is larger than f(0) = 1. Use interval notation or inequalities, and choose round or square brackets according to whether each endpoint is included.
One-one functions and inverses
A function is one-one if each output comes from only one input. Graphically, every horizontal line y = k meets the graph at most once. To show a function is not one-one, give a counterexample, such as f(1) = f(3) = -2 for f(x) = (x - 2)² - 3. Only a one-one function has an inverse. To find f⁻¹, let y = f(x), make x the subject, then write the result as f⁻¹(x). The domain of f⁻¹ is the range of f, and the range of f⁻¹ is the domain of f. For example, if f(x) = (x - 2)² - 3 for x ≥ 2, then y + 3 = (x - 2)², so x = 2 + √(y + 3), taking the positive root because x ≥ 2. Hence f⁻¹(x) = 2 + √(x + 3), with domain x ≥ -3. The graphs of f and f⁻¹ are reflections of each other in the line y = x.
Composite functions
The composite function fg means apply g first, then f, so fg(x) = f(g(x)). It exists only if the range of g is contained in the domain of f, written R_g ⊆ D_f. The domain of fg is the domain of g. To find the range of fg, take the range of g as the set of inputs for f and see what f produces, rather than simplifying the formula and guessing. For example, let f(x) = ln x for x > 0 and g(x) = x² + 1 for x ∈ ℝ. R_g = [1, ∞), which lies inside (0, ∞), so fg exists and fg(x) = ln(x² + 1). Feeding [1, ∞) into ln gives R_fg = [0, ∞). The composite gf(x) = (ln x)² + 1 also exists, because R_f = ℝ = D_g. In general fg and gf are different functions. Also, ff⁻¹(x) = x for every x in the domain of f⁻¹.
Restricting a domain
When a function is not one-one, questions often ask for the largest domain of a given form for which an inverse exists. For a quadratic, the turning point splits the graph into two one-one halves. For f(x) = (x - 2)² - 3, the largest domain of the form x ≥ k is x ≥ 2, so k = 2. For f(x) = 2 + 1/(x - 1), x ≠ 1, the graph has a vertical asymptote x = 1 and a horizontal asymptote y = 2. Every horizontal line except y = 2 meets it exactly once, so it is already one-one, with range y ≠ 2. A good habit is to sketch y = f(x), y = f⁻¹(x) and y = x on the same axes with equal scales so the reflection is clear. For an increasing function, the graphs of f and f⁻¹ meet on the line y = x, so f(x) = f⁻¹(x) can be solved as f(x) = x, but confirm this from your sketch.
Worked example
The function f is defined by f(x) = x² - 6x + 5 for x ≥ k, and g is defined by g(x) = e^x + 1 for x ∈ ℝ. (a) Find the smallest value of k for which f⁻¹ exists. (b) Using this value of k, find f⁻¹(x) and state its domain. (c) Determine whether fg and gf exist, and find the range of any composite that does.
- Complete the square: f(x) = (x - 3)² - 4. The turning point is at x = 3, so f is one-one for x ≥ 3, and the smallest k is 3.
- Let y = (x - 3)² - 4. Then (x - 3)² = y + 4 and x - 3 = √(y + 4), taking the positive root since x ≥ 3.
- So f⁻¹(x) = 3 + √(x + 4). The range of f is [-4, ∞), so the domain of f⁻¹ is x ≥ -4.
- For fg: R_g = (1, ∞) and D_f = [3, ∞). Since (1, ∞) is not a subset of [3, ∞), for example g(0) = 2 is not in D_f, fg does not exist.
- For gf: R_f = [-4, ∞), which lies inside ℝ = D_g, so gf exists and gf(x) = e^(x² - 6x + 5) + 1.
- Range of gf: the inputs to g are [-4, ∞), and g is increasing, so the outputs start at e^(-4) + 1 and increase without bound. So R_gf = [1 + e^(-4), ∞).
Answer: (a) k = 3. (b) f⁻¹(x) = 3 + √(x + 4), for x ≥ -4. (c) fg does not exist, gf exists with range [1 + e^(-4), ∞).
Common mistakes
- Finding the range of a composite function by simplifying fg(x) and looking at the formula over all of ℝ. The inputs to f are only the outputs of g, so work from R_g.
- Keeping both signs when finding the inverse of a restricted quadratic, such as x = 3 ± √(y + 4). The restricted domain decides the sign, which is positive here.
- Stating the domain of f⁻¹ from where its formula makes sense. The domain of f⁻¹ is the range of f, which may be smaller.
- Working out fg(x) as g(f(x)). In fg, the function g acts first.
- Relying on a sketch alone when asked to show that a function is not one-one. Give a counterexample with two different inputs and the same output, or explain the horizontal line test in words with a specific line.
- Confusing f⁻¹(x) with 1/f(x). The inverse undoes f, while 1/f(x) is a reciprocal.
Exam tips
- Always state domains when giving an inverse or a composite function. A correct formula with a missing domain is an incomplete answer.
- For range questions, sketch the graph over the given domain and mark the endpoint values. Include or exclude each endpoint deliberately.
- In 'does fg exist' questions, write R_g and D_f as actual sets, compare them, then conclude in a sentence.
Practice questions
1. Explain why the function f(x) = x² + 2, x ∈ ℝ, does not have an inverse.
Show answer
f is not one-one. For example, f(1) = f(-1) = 3, so the horizontal line y = 3 meets the graph twice, and only one-one functions have inverses.
2. Given f(x) = (2x + 1)/(x - 3) for x ∈ ℝ, x ≠ 3, find f⁻¹(x) and state its domain.
Show answer
f⁻¹(x) = (3x + 1)/(x - 2), for x ∈ ℝ, x ≠ 2. Let y = (2x + 1)/(x - 3), so xy - 3y = 2x + 1, x(y - 2) = 3y + 1 and x = (3y + 1)/(y - 2). Since f(x) = 2 + 7/(x - 3), the range of f is all real numbers except 2, which is the domain of f⁻¹.
3. The functions f and g are defined by f(x) = ln(x - 1) for x > 1 and g(x) = x² + 2 for x ∈ ℝ. Show that fg exists, find fg(x), and state its range.
Show answer
R_g = [2, ∞), which is a subset of D_f = (1, ∞), so fg exists. fg(x) = ln(x² + 2 - 1) = ln(x² + 1). Feeding [2, ∞) into f gives ln(t - 1) for t ≥ 2, which starts at ln 1 = 0 and increases, so R_fg = [0, ∞).
Related topics
Want a tutor for H2 Math?
Shortlist on WhatsApp within 16 hours. You choose the tutor. About H2 Math tuition
Get matched with a tutor