We have seen that functions are special types of relations. When dealing with functions we often use function notation to emphasise that we are dealing with a special case, to highlight the independent and dependent variable and for ease of notation with substitution and calculus.
When we are writing in function notation, instead of writing "$y=$y=", we write "$f(x)=$f(x)=". This can be interpreted as "$f$f is a function of the variable $x$x" and read as "$f$f of $x$x". Common letters to use for general functions are lower case $f$f, $g$g and $h$h. However, any letter can be used and we can use variables that have meaning in context.
Instead of $y=2x+1$y=2x+1 we could write $f(x)=2x+1$f(x)=2x+1, here $f$f is a function of the variable $x$x which follows the rule double $x$x and add $1$1.
$P(t)=200\times0.8^t$P(t)=200×0.8t, here population is a function of time.
$H(d)=30-2d-30d^2$H(d)=30−2d−30d2, here height is a function of distance.
These are all examples of just a different way to write '$y=$y= …' notation as a function. The letter in the bracket on the left is the input and the right hand side gives us a rule for the output.
Function notation also allows for shorthand for substitution. If $y=3x+2$y=3x+2 and we write this in function notation as $f(x)=3x+2$f(x)=3x+2, then the question 'what is the value of $y$y when $x$x is $5$5?' can be asked simply as 'what is $f(5)$f(5)?' or 'Evaluate $f(5)$f(5).'
If $A(x)=x^2+1$A(x)=x2+1 and $Q(x)=x^2+9x$Q(x)=x2+9x, find:
(a) $A(5)$A(5)
Think: This means we need to substitute $5$5 in for $x$x in the $A(x)$A(x) equation.
Do:
$A(5)$A(5) | $=$= | $5^2+1$52+1 |
$=$= | $26$26 |
(b) $Q(6)$Q(6)
Think: This means we need to substitute $6$6 in for $x$x in the $Q(x)$Q(x) equation.
Do:
$Q(6)$Q(6) | $=$= | $6^2+9\times6$62+9×6 |
$=$= | $36+54$36+54 | |
$=$= | $90$90 |
(c) $A(p)$A(p)
Think: This means we need to substitute $p$p in for $x$x in the $A(x)$A(x) equation.
Do:
$A(p)$A(p) | $=$= | $p^2+1$p2+1 |
Consider the equation $x-4y=8$x−4y=8.
Assume that $y$y is a function of $x$x.
Rewrite the equation using function notation $f\left(x\right)$f(x).
Find the value of $f\left(12\right)$f(12).
Consider the function $f\left(x\right)=2x^3+3x^2-4$f(x)=2x3+3x2−4.
Evaluate $f\left(0\right)$f(0).
Evaluate $f\left(\frac{1}{4}\right)$f(14).
If $Z(y)=y^2+12y+32$Z(y)=y2+12y+32, find $y$y when $Z(y)=-3$Z(y)=−3.
Write both solutions on the same line separated by a comma.
Consider the function $g\left(x\right)=ax^3-3x+5$g(x)=ax3−3x+5.
Determine $g\left(k\right)$g(k).
Form an expression for $g\left(-k\right)$g(−k).
Is $g\left(k\right)=g\left(-k\right)$g(k)=g(−k)?
Yes
No
Is $g\left(k\right)=-g\left(-k\right)$g(k)=−g(−k)?
Yes
No
Functions can be added, subtracted, multiplied or divided. If $f$f and $g$g are functions, we compute $f(x)+g(x)$f(x)+g(x) by adding the function values at $x$x for each function. The short-hand notation for function addition is $(f+g)(x).$(f+g)(x). In a similar way, we form $f(x)-g(x)$f(x)−g(x) or $(f-g)(x)$(f−g)(x) for subtraction, $f(x)\times g(x)$f(x)×g(x) or $(fg)(x)$(fg)(x) for multiplication and $f(x)\div g(x)$f(x)÷g(x) or $(f/g)(x)$(f/g)(x) for function division.
Given the following values:
$f\left(2\right)=4$f(2)=4, $f\left(7\right)=14$f(7)=14, $f\left(9\right)=18$f(9)=18, $f\left(8\right)=16$f(8)=16
$g\left(2\right)=8$g(2)=8, $g\left(7\right)=28$g(7)=28, $g\left(9\right)=36$g(9)=36, $g\left(8\right)=32$g(8)=32
Find $\left(f+g\right)$(f+g)$\left(2\right)$(2)
If $f(x)=3x-5$f(x)=3x−5 and $g(x)=5x+7$g(x)=5x+7, find each of the following:
$(f+g)(x)$(f+g)(x)
$(f+g)$(f+g)$\left(4\right)$(4)
$(f-g)(x)$(f−g)(x)
$(f-g)$(f−g)$\left(10\right)$(10)
The idea behind the composition of functions is best explained with an example.
Suppose we think about the function given by $f\left(x\right)=2x+1$f(x)=2x+1. We understand that the function takes values of $x$x for the input and maps them to values, say $y=2x+1$y=2x+1, in the output.
Suppose however that this is only the first part of a two-stage treatment of $x$x. Suppose we now take these function values and map them using another function, say $g\left(x\right)=x^2$g(x)=x2. This means that the $y$y values given by $\left(2x+1\right)$(2x+1) become the squared values $\left(2x+1\right)^2$(2x+1)2. The diagram below captures the idea.
The function values $f\left(x\right)$f(x) have become the input for $g\left(x\right)$g(x). Thus we could describe the complete two-stage process by the expression $g\left(f\left(x\right)\right)$g(f(x)), sometimes written $(g\circ f)(x)$(g∘f)(x) and spoken of as "$g$g of $f$f of $x$x".
Algebraically, we can write $g\left(f\left(x\right)\right)=g\left(2x+1\right)=\left(2x+1\right)^2$g(f(x))=g(2x+1)=(2x+1)2.
Note that if we reversed the order of the two-stage processing, we would, in this instance, develop a different composite function.
Thus $f\left(g\left(x\right)\right)=f\left(x^2\right)=2\left(x^2\right)+1=2x^2+1$f(g(x))=f(x2)=2(x2)+1=2x2+1. This would be "$f$f of $g$g of $x$x".
Consider the functions $f\left(x\right)=-2x-3$f(x)=−2x−3 and $g\left(x\right)=-2x-6$g(x)=−2x−6.
Find $f\left(7\right)$f(7).
Hence, or otherwise, evaluate $g\left(f\left(7\right)\right)$g(f(7)).
Now find $g\left(7\right)$g(7).
Hence, evaluate $f\left(g\left(7\right)\right)$f(g(7)).
Is it true that $f\left(g\left(x\right)\right)=g\left(f\left(x\right)\right)$f(g(x))=g(f(x)) for all $x$x?
Yes
No
Consider $f\left(x\right)=x^2+3$f(x)=x2+3 and $g\left(x\right)=4x-9$g(x)=4x−9.
Define $f\left(2x\right)$f(2x).
Show that $f\left(2x\right)=g\left(f\left(x\right)\right)$f(2x)=g(f(x))