Functions

Functions

A function is a rule that maps each input value to exactly one output value. It can be thought of as a machine: every number fed in produces a unique number out. Functions are written using the notation \( f(x) \) — read as "f of x" — where \( x \) is the input and \( f(x) \) is the corresponding output. Alternatively, the mapping notation \( f: x \mapsto ldots \) is used, which emphasises the "maps to" relationship.

input x f(x) = 2x + 3 double, then add 3 f(x) output e.g. x = 4 f(4) = 11

Function Notation

The expression \( f(x) = 2x + 3 \) defines a function called \( f \). To evaluate it, substitute the input value for \( x \):

\[ f(4) = 2(4) + 3 = 11 qquad f(-2) = 2(-2)+3 = -1 \]

Multiple functions are named with different letters: \( f \), \( g \), \( h \), etc. Evaluating \( g(3) \) means substituting \( x = 3 \) into the rule for \( g \), not \( f \).

The mapping notation \( f: x \mapsto 2x+3 \) means "the function \( f \) maps \( x \) to \( 2x+3 \)".

Domain and Range

The domain is the set of valid input values. The range is the corresponding set of output values. Most GCSE problems use all real numbers unless a restriction is needed.

Restrictions arise when an expression is undefined for certain inputs:

  • Division by zero: \( f(x) = \dfrac{1}{x-2} \) is undefined at \( x = 2 \). Domain: all real \( x \) except \( x = 2 \).
  • Negative under a square root: \( f(x) = \sqrt{x-1} \) requires \( x - 1 \geq 0 \). Domain: \( x \geq 1 \).

Worked Examples

Given \( f(x) = x^2 - 3x + 1 \) and \( g(x) = 4 - 2x \), find \( f(3) \), \( g(-1) \) and \( f(a+1) \).
\[ f(3) = 9 - 9 + 1 = 1 \] \[ g(-1) = 4 - 2(-1) = 4 + 2 = 6 \] \[ f(a+1) = (a+1)^2 - 3(a+1) + 1 = a^2+2a+1-3a-3+1 = a^2-a-1 \]
Given \( f(x) = 5x - 3 \), find \( x \) when \( f(x) = 7 \). Given \( g(x) = x^2 + 2x - 3 \), find all values of \( x \) for which \( g(x) = 0 \).
\[ 5x - 3 = 7 \implies 5x = 10 \implies x = 2 \] \[ x^2 + 2x - 3 = 0 \implies (x+3)(x-1) = 0 \implies x = -3 \text{ or } x = 1 \]
State the domain of \( f(x) = \dfrac{3}{x+4} \) and \( g(x) = \sqrt{2x-6} \). Find the range of \( h(x) = x^2 + 1 \) for \( x \in \mathbb{R} \).

\( f(x) = \frac{3}{x+4} \): undefined when \( x+4 = 0 \), i.e. \( x = -4 \). Domain: all real \( x \), \( x \neq -4 \).

\( g(x) = \sqrt{2x-6} \): requires \( 2x-6 \geq 0 \), so \( x \geq 3 \). Domain: \( x \geq 3 \).

\( h(x) = x^2 + 1 \): since \( x^2 \geq 0 \) for all real \( x \), \( h(x) \geq 1 \). Range: \( h(x) \geq 1 \).

 Key Takeaways

  • A function maps each input to exactly one output. \( f(x) \) means "apply the rule \( f \) to input \( x \)".
  • To evaluate \( f(a) \): substitute \( x = a \) into the function, applying BIDMAS carefully.
  • Different function letters (f, g, h) represent different rules — \( f(3) \) and \( g(3) \) are generally different.
  • The domain is the set of valid inputs. Division by zero and square roots of negatives create domain restrictions.
  • To find the value of \( x \) for which \( f(x) = k \): set up the equation \( f(x) = k \) and solve for \( x \).