girgit.org

Relations and Functions

Real functions: domain and range from a formula

The big ideaA real function takes real numbers in and gives real numbers out; its domain is every input the formula can handle, and its range is every output it actually produces.

In simple words

Most functions you will meet are number machines: put a number in, a number comes out. Some numbers break the machine. You cannot share a cake among zero people, and you cannot find a number that times itself gives a minus number. So first ask which numbers the machine accepts. Then ask which answers it can ever give back.

Real valued and real functions

  • A function whose range is \( \mathbf{R} \) or some subset of \( \mathbf{R} \) is a real valued function: its outputs are real numbers.
  • If, in addition, its domain is \( \mathbf{R} \) or a subset of \( \mathbf{R} \), it is a real function: real numbers in, real numbers out.

A real function is usually given by a formula, such as \( f(x) = 3x - 2 \). The letter \( x \) is the input and \( y = f(x) \) is the output. To find \( f(5) \), put 5 in place of \( x \): \( f(5) = 3 \cdot 5 - 2 = 13 \).

Worked example

Let \( f : \mathbf{N} \to \mathbf{N} \), \( f(x) = 3x - 2 \). Complete the table.

\( x \)123456
\( f(x) \)147101316

Each step of 1 in \( x \) adds 3 to \( f(x) \). The range is \( \{1, 4, 7, 10, \dots\} \), the natural numbers that leave remainder 1 when divided by 3.

Finding the domain from a formula

If a question gives only a formula and asks for the domain, it means: the set of all real \( x \) for which the formula gives a real number. Two things break a formula in this chapter:

  1. Dividing by zero. Remove every \( x \) that makes a denominator 0.
  2. Square root of a negative number. Under a square root, the expression must be \( \ge 0 \).

Worked example

Find the domain of \( f(x) = \dfrac{x + 1}{x^2 - 7x + 10} \).

  1. Factorise the denominator: \( x^2 - 7x + 10 = (x - 2)(x - 5) \).
  2. It is 0 at \( x = 2 \) and \( x = 5 \). Every other real number is fine.
  3. Domain \( = \mathbf{R} - \{2, 5\} \).

Worked example

Find the domain and range of \( f(x) = \sqrt{x - 3} \).

  1. Need \( x - 3 \ge 0 \), that is \( x \ge 3 \). Domain \( = [3, \infty) \).
  2. A square root (the \( \sqrt{\ } \) sign always means the non-negative root) is never negative. At \( x = 3 \) it is 0, and as \( x \) grows it grows without end.
  3. Range \( = [0, \infty) \).

Try it: drag the input onto the numbers that break each machine, and watch the domain and range shade in.

Finding the range

For the range, ask: which values of \( y \) can come out? A good method is to start from what you know about \( x \) and build up the formula step by step.

Worked example

  1. \( f(x) = x^2 + 3 \), \( x \in \mathbf{R} \). Since \( x^2 \ge 0 \), \( x^2 + 3 \ge 3 \), and every value from 3 up is reached. Range \( = [3, \infty) \).
  2. \( f(x) = 4 - x \), \( x \in \mathbf{R} \), \( x \gt 1 \). Then \( -x \lt -1 \), so \( 4 - x \lt 3 \). Range \( = (-\infty, 3) \).
  3. \( f(x) = |x - 1| \), \( x \in \mathbf{R} \). A distance is never negative, and 0 is reached at \( x = 1 \). Range \( = [0, \infty) \).

Linear functions

A function \( f(x) = mx + c \), \( x \in \mathbf{R} \), where \( m \) and \( c \) are constants, is a linear function. Its graph is a straight line: \( c \) is where it crosses the \( y \)-axis (because \( f(0) = c \)) and \( m \) is how much \( y \) goes up for each step of 1 in \( x \).

For example, \( f(x) = x + 6 \) gives \( f(0) = 6 \), \( f(1) = 7 \), \( f(-6) = 0 \). Its graph is a line climbing at 45°, crossing the \( y \)-axis at 6 and the \( x \)-axis at \( -6 \).

Worked example

An auto-rickshaw charges a fixed amount plus a rate per kilometre. A 2 km ride costs Rs 54 and a 5 km ride costs Rs 105. Find the fare function \( f(x) = mx + c \).

  1. \( f(2) = 2m + c = 54 \) and \( f(5) = 5m + c = 105 \).
  2. Subtract: \( 3m = 51 \), so \( m = 17 \).
  3. Then \( c = 54 - 34 = 20 \). So \( f(x) = 17x + 20 \): Rs 20 to start, Rs 17 per km.

Now play with the fare. Find the numbers of the worked example, then tap "Every rate".

Don't mix these up

  • The domain is about inputs (\( x \)); the range is about outputs (\( y \)). Denominators and square roots limit the domain.
  • \( \sqrt{x^2} = |x| \), not \( x \). For \( x = -3 \), \( \sqrt{9} = 3 \).
  • Write a domain with a removed point as \( \mathbf{R} - \{2\} \), not \( \mathbf{R} - 2 \).

Try it. (a) \( f(x) = 2x - 5 \). Find \( f(0) \), \( f(4) \) and \( f(-3) \). (b) Find the domain of \( g(x) = \dfrac{1}{\sqrt{x + 2}} \). (c) A linear function has \( f(0) = -1 \) and \( f(1) = 2 \). Find \( f(x) \).

Answer
(a) \( f(0) = -5 \), \( f(4) = 3 \), \( f(-3) = -11 \). (b) Need \( x + 2 \ge 0 \) for the root and \( \sqrt{x + 2} \ne 0 \) for the fraction, so \( x + 2 \gt 0 \): domain \( = (-2, \infty) \). (c) \( c = f(0) = -1 \); \( m + c = 2 \) gives \( m = 3 \). So \( f(x) = 3x - 1 \).

Words to know

Real valued function
A function whose outputs are real numbers.
Real function
A function whose inputs and outputs are both real numbers.
Domain from a formula
All real \( x \) for which the formula gives a real value.
Range
All the values \( f(x) \) actually takes.
Linear function
\( f(x) = mx + c \) with constants \( m, c \); its graph is a straight line.

What is the domain of \( f(x) = \dfrac{5}{x^2 - 9} \)?

  1. \( \mathbf{R} - \{3\} \)
  2. \( \mathbf{R} - \{-3, 3\} \)
  3. \( (-\infty, -3) \cup (3, \infty) \)

What is the range of \( f(x) = x^2 + 2 \), \( x \in \mathbf{R} \)?

  1. \( \mathbf{R} \)
  2. \( (2, \infty) \)
  3. \( [2, \infty) \)

A linear function has \( f(1) = 5 \) and \( f(3) = 11 \). What is \( f(0) \)?

  1. \( 2 \)
  2. \( 3 \)
  3. \( 5 \)