3A

Functions and function notation

What a function is, independent and dependent variables, natural domains, and how to use f(x) notation, with interactive examples and practice.

Functions are the main thing this course studies. Calculus, trigonometry, exponentials and logarithms are all about particular functions and how they behave, so the language here gets used in every chapter from now on.

A function is a rule

A plumber charges a $\$90$ call-out fee plus $\$60$ per hour. If the job takes $x$ hours and costs $y$ dollars, then $y = 90 + 60x$. Once you know $x$, the cost $y$ is fixed. That is what we mean when we say $y$ is a function of $x$: the value of $y$ is completely decided by the value of $x$.

  • $x$ is the independent variable. It is the input, the one you choose.
  • $y$ is the dependent variable. It is the output, and it depends on $x$.

A table of values shows the rule at work:

$x$ (hours)$0$$1$$2$$3$$4$
$y$ (dollars)$90$$150$$210$$270$$330$

Function notation

We give the rule a name, usually $f$, and write $f(x) = 90 + 60x$. Read $f(3)$ as "$f$ of $3$". It means "the output when the input is $3$": $f(3) = 90 + 180 = 270$. The bracket is not multiplication. It holds the input.

The notation is handy because it records the input and the output together. "$f(3) = 270$" says in one line what "when $x = 3$, $y = 270$" takes a sentence to say. Other letters work too: $g(x)$, $h(t)$, $C(n)$.

Example 1●

$f(x) = x^2 - 4x$. Find $f(5)$, $f(-1)$ and $f(0)$.

$f(5) = 25 - 20 = 5$
Replace every x with 5.
$f(-1) = (-1)^2 - 4(-1) = 1 + 4 = 5$
Put −1 in brackets so the signs come out right: (−1)² = 1 and −4 × (−1) = +4.
$f(0) = 0 - 0 = 0$

Notice $f(5)$ and $f(-1)$ are both $5$. That's allowed: two inputs, one shared output.

Substituting expressions

The input can be any expression. Whatever is in the bracket replaces every $x$ in the rule, so keep it in brackets while you substitute.

Example 2●●

$g(x) = x^2 + 3$. Find and simplify $g(a + 2)$ and $g(a) + 2$.

$g(a + 2) = (a + 2)^2 + 3 = a^2 + 4a + 4 + 3 = a^2 + 4a + 7$
Replace x with the whole of a + 2.
$g(a) + 2 = a^2 + 3 + 2 = a^2 + 5$
Here we find the output g(a) first, then add 2 to it.

Restrictions on the variables

A real situation often limits the input. A $2000$ L tank drains at $80$ L per minute, so the volume after $t$ minutes is $V(t) = 2000 - 80t$. It is empty after $2000 \div 80 = 25$ minutes, and the formula means nothing before $t = 0$ or after $t = 25$. So we write the restriction as part of the function:

$V(t) = 2000 - 80t$, where $0 \le t \le 25$.

Some rules have restrictions built in. $h(x) = \dfrac{1}{x - 3}$ has no value at $x = 3$, because you can't divide by zero. $k(x) = \sqrt{x - 3}$ has no real value at $x = 1$, because $\sqrt{-2}$ is undefined. Section 3B turns this into the natural domain.

Your turn

$f(x) = 2x^2 - x$. Find $f(-3)$ and $f(2a)$.

Show the working

$f(-3) = 2(9) - (-3) = 18 + 3 = 21$.

$f(2a) = 2(2a)^2 - 2a = 2(4a^2) - 2a = 8a^2 - 2a$. The whole $2a$ gets squared.

Practice
  1. $p(x) = x^2 - 4x + 1$. Find $p(-2)$.

  2. A function is described as "double the number, then subtract the result from $10$". Its rule is:

  3. $f(x) = 3 - 2x$. Find $f(4) - f(1)$.

  4. $f(x) = x^2 + 2x$. Then $f(a - 1) =$

  5. $h(x) = \dfrac{1}{x - 3}$. Which value of $x$ cannot be substituted?

  6. A taxi charges $\$4$ plus $\$2.50$ per kilometre, so the cost is $C(x) = 4 + 2.5x$ for a trip of $x$ km. Find $C(12)$ in dollars.

  7. In the formula $A = \pi r^2$ for the area of a circle, which is the independent variable?

  8. $f(x) = x^2 - 6x$. Find all $x$ with $f(x) = -8$. Enter both values separated by &.

  9. Exam style: $f(x) = x^2 + 3x$. Then $\dfrac{f(2 + h) - f(2)}{h} = h + k$ for $h \ne 0$. Find $k$.

  10. Exam style: $P(x) = x^2 - 2x - 4$. Find the exact value of $P(1 + \sqrt5)$.

Formula sheet