Chapter 2 - Functions 2.1 What is a Function

Mathematics 2
Functions
Chapter 2 - Functions
2.1 What is a Function
In this section we introduce the idea of a function. In chapter 1 we used equations to
represent relationships and we were often able to draw a graph on the coordinate plane
to represent the equation as a set of points. We usually used the letters x and y because
the coordinate plane frequently is labelled with the x- and y-axes. When we de…ne a
function we usually use the word rule in place of the word relationship. While the concept
of a function includes rules connecting x and y it covers many other situations. In fact
functions are all around us
The area of a circle is a function of the radius
The pressure on a diver is a function of the depth
The moment of a force is a function of the distance from the fulcrum
The cost of a cellphone call is a function of the time taken.
Students are introduced to functions from an early age. This is because the function
is a fundamental idea in mathematics. You will …nd that the concept of a function is
central to this mathematics course and subsequent mathematics courses. A function can
be represented by lists of numbers.
Example 1
Consider
1
2
3
4
! 1
! 4
! 9
! 16
When you see a table set out in this way you should inspect the table to see if you can
see the rule that connects the numbers on the left with the numbers on the right. The
rule in the case is x ! x2 : Every number on the right is the square of the number on
the left. In this example the x values are just the numbers 1, 2, 3 and 4. You will know
that the rule applies to those four numbers and also to any other numbers where x 2 R:
So that we can talk about the rule we give it a name. In this case we will call it f . When
we apply the rule f to x we get x2 : We express this
f (x) = x2
f has been chosen for this introductory example because it is the …rst letter of the word
function. In practice any letter of the alphabet can be chosen. This way to represent a
40
Mathematics 2
Functions
41
function is given the name functional notation. It is a very convenient way to represent
a function and is a particularly e¢ cient way to show substitution. To say “substitute
x = 3 in f (x) = x2 ”you write “…nd f (2)”
f (2) = 22 = 4
All rules are not functions however. The word function is reserved for a particular class
of rules
De…nition: A function is a rule where there is only one value of f (x) for each value of
x.
Example 2
Consider the rule
x
4
4
1
1
! f (x)
!
2
!
-2
!
1
!
-1
Why is this not a function?
You should note from the table that f (4) = 2 and f (4) = 2 so there are two di¤erent
values for f (4). Also there are two di¤erent values for f (1) but one value breaking the
rule is enough for us to say we do not have a function.
This topic will be further developed in section 2.2
2.1.1 Evaluating a Function
In the previous subsection we de…ned the function f (x) = x2 and showed that f (2) = 4.
Finding the value of f (x) for a particular value of x is given the name evaluating the
function. We might say “evaluate f when x = 2” or “evaluate f (2)” or simply “…nd
f (2)”. All we do is to substitute 2 wherever there is an x and simplify.
Example 3
Let f (x) = 4x2
(a) f (0) =
(b) f ( 3) =
(c) f (2) =
(d) f ( 12 ) =
6x
3 evaluate (a) f (0)
(b) f ( 3)
(c) f (2)
(d) f ( 12 )
Mathematics 2
Functions
Exercises 2.1.1
1. Let f (x) = x2 + 3x evaluate the following
(a) f ( 3) =
(b) f (0) =
(c) f (4) =
(d) f ( 23 ) =
x+2
x+1
2. Let g(x) =
evaluate the following
(a) g( 2) =
(b) g(0) =
(c) g(3) =
(d) g( 12 ) =
(e) g(a) =
3. Let h(t) =
1
t
+ t evaluate the following
(a) h(2) =
(b) h(1) =
(c) h( 12 ) =
(d) h( 1) =
4. Let f (x) = x2 + x evaluate the following
(a) f (2x) =
(b) f (x + 2) =
(c) f (2
x) =
2.1.2 The Four Ways to Represent a Function
At the start of the course we mentioned “Multiple Representations” Wherever possible
topics will be presented numerically, algebraically, geometrically and verbally. To help
us understand about functions we will try to represent them in more than one way. In
fact some functions provide good examples for multiple representations.
42
Mathematics 2
Functions
Exercises 2.1.2
1. Express the following rules in functional notation
(a) Multiply by 3 and add 2
(b) Add 2 then multiply by 3
(c) Square then subtract 4
(d) Subtract 4 then square
(e) Square add 3 then take the square root
2. Express the following functions in words
(b) g(x) =
x
+
2
x+3
2
(c) h(x) =
x2
3
(a) f (x) =
3
+2
(d) p(x) =
x 2
3
(e) q(x) =
x
3
+2
+2
2
3. Complete the table for the following functions
(a) f (x) = 3x
x
1
0
1
1
f (x)
1
3
4
3
(b) F (x) = x2 + x
x
2
1
0
1
2
(c) g(t) =
t
4
2
1
1
2
1
2
1
2
4
F (x)
2
t
g(t)
43
Mathematics 2
Functions
4. For each of the functions in question 3 sketch the graph on the grids below
(a) f (x) = 3x
1 sketch the graph of y = f (x)
(b) F (x) = x2 + x sketch the graph of y = F (x)
(c) g(x) =
2
x
sketch the graph of y = g(x)
44
Mathematics 2
Functions
2.2 The Graph of a Function
The best way to distinguish a function from a nonfunction is by a graph. We can sketch
a graph but this is often tedious and the important features can be lost. Graphing
calculators are often used, however these will only be useful in the hands of a skilled user.
Sadly the graphing calculator, because of the size of the graph drawn very quickly gives
an impression of the shape of a curve but does not give important features like intercepts
and asymptotes.
For our mathematics courses at levels 2 to 4 we have found the computer package Omnigraph very suitable and in our level 3 and 4 courses extensive use will be made of that
package. In this course Omnigraph has been used to produce many of the graphs. While
we would have preferred to allow students to learn their mathematics in a computer lab
where access to Omnigraph is provided, the limited computer resources have not made
this possible. It is hoped this situation will be recti…ed in the future.
You need to be aware that certain equations produce graphs with a particular shape. The
wider your list of familiar equations and their corresponding graphs the better. We will
as the course develops continue to build this library of familiar curves. Your task is to
learn the names, equations and graphs of as many functions and nonfunctions as you can.
Using functional notation we de…ne a graph as a set of points. The x-coordinates of the
points are usually the real numbers but this may not always be the case.
f(x; f (x))j x 2 Rg
We usually label our axes as the x-axis and the y-axis so when we draw our graph we
draw
y = f (x)
We have met linear functions already.
Example 1
This is a section of an Omnigraph graph showing the straight line y = 2. Can you see
that the grid lines are fainter on the page than the horizontal line drawn through y = 2.
45
Mathematics 2
Functions
46
Example 2
Here is a section of an Omnigraph graph of y = 2x
1.
2.2.1 Sketching Graphs of Functions
For our initial examples we will adopt the following method to sketch our graphs.
Step 1 We …rstly make a table of values
Step 2 We plot the points given by the table
Step 3 We join the points with a smooth curve.
Step 4 We describe some features that identify this graph with this equation.
Example 3
Sketch f (x) = x3
x
0
f (x) = x3
0
1
2
1
8
1
2
1
8
1
2
1
8
1
2
1
8
These can now be plotted on a coordinate plane. You could use a rough sketch or you
could use graph paper. Our answers will be given using Omnigraph. This should be
compared with your rough sketch.
Mathematics 2
Functions
You should not …nish this question until you can describe some features in words. The
words you use are to help you sketch the graph in future without having to complete the
table of values. Often once you have an idea of the shape of a graph you only need to
plot one or two points before completing the sketch, simply because you know what it is
going to look like.
Example of some words you could use to describe the distinguishing features.
This is a cubic curve that goes from the bottom left to the top right and passes through
the origin.
Notice the words cubic curve are used. This is because the shape associated with cubic
curves is restricted to two types so you have an immediate idea of what it will look like.
Exercises 2.2.1
1. Sketch the following power functions by making a table of values, plotting the points
then completing the smooth curve. Describe some distinguishing features.
(a) p(x) = x2
(b) q(x) = x4
(c) r(x) = x5
2. Sketch the following root functions by making a table of values, plotting the points
then completing the smooth curve. Describe some distinguishing features.
(a) h(x) =
(b) j(x) =
p
p
3
x
x
p
(c) k(x) = 4 x
p
(d) m(x) = 5 x
47
Mathematics 2
Functions
3. Sketch the following absolute value function by making a table of values, plotting the
points then completing the smooth curve. Describe some distinguishing features.
(a) f (x) = jxj
4. Sketch the following reciprocal functions by making a table of values, plotting the
points then completing the smooth curve. Describe some distinguishing features.
(a) g(x) =
(b) h(x) =
1
x
1
x2
2.2.2 The Vertical Line Test
If you take the trouble to learn the vertical line test you can tell the di¤erence between a
function and a nonfunction just by looking at the graph.
The vertical line test says that if every line you can draw on the coordinate plane cuts
the graph only once then it is the graph of a function.
This means that even if the rule is broken only once the graph will not be a function.
Example 4
This is the graph of a function
Example 5
This is the graph of a nonfunction
48
Mathematics 2
Functions
49
Exercises 2.2.2
Beside each graph write whether it is a function or nonfunction
1.
2.
3.
4.
5.
6.
Mathematics 2
Functions
2.3 Variation
A frequently used expression in mathematics is to say that one variable is proportional
to another. We use expressions such as y is proportional to x: We have a mathematical
shorthand for this
y/x
When we see y / x we say “y is proportional to x”or “y varies directly as x”.
2.3.1 Direct Variation
Whenever two quantities x and y are related by the equation
y = kx
where k is a nonzero constant
we say y is proportional to x or y varies directly as x. Put the other way whenever we
say y is proportional to x or y varies directly as x our …rst step is to write down
y = kx
The name we give to the constant k in this equation is the constant of proportionality.
Direct variation is a model that is frequently used in mathematical modelling.
Note we have already met linear equations such as
y = mx + c
You will see therefore that direct variation is the same as linear equations where the
constant term is zero. Furthermore a linear equation where the constant term is zero
looks like
y = mx
This is a straight line with a slope of m passing through the origin. We can say therefore
that the equation y = kx is a straight line with a slope of k passing through the origin.
Example 1
You are told that the height (H) of a giant redwood tree is directly proportional to its
age (t). Write this in symbols then write it as an equation.
Solution
H / t
H = kt
50
Mathematics 2
Functions
51
Example 2
The volume of liquid in a can is directly related to the height of liquid in the can.
(a) If the can is 12:5 cm tall and contains 355 mL when full, determine the constant of
proportionality.
(b) How much is left in the can when the liquid is 3 cm deep?
(c) How deep is the liquid when there is 300 mL left?
Solution
Let h be the height of the can, V be the volume of the can and k be the constant of
proportionality. Then
V = kh
(a) Substitute h = 12:5 and V = 355
355 = 12:5k
k = 28:4
Thus the model is
V = 28:4h
(1)
(b) Put h = 3 in equation (1)
V = 28:4
3 = 85:2 mL
(c) Put V = 300 in equation (1)
300 = 28:4h
h = 10:56 cm
Exercises 2.3.1
1. Write an equation that expresses the statement
(a) P varies directly as x:
(b) R is directly proportional to q:
(c) X varies directly as x:
2. Express the statement as a formula then use the given information to …nd the
constant of proportionality.
(a) y varies directly as x and x = 7 when y = 63:
Mathematics 2
Functions
(b) M is directly proportional to n and when M = 12:5 n = 0:08:
3. Hooke’s law states that the force needed to keep a spring stretched x units beyond
its natural length is directly proportional to x. Here the constant of proportionality
is called the spring constant.
(a) Write Hooke’s law as an equation.
(b) If the spring has a natural length of 10 cm and a force of 40 N is required to
maintain the spring stretched to a length of 15 cm, …nd the spring constant.
(c) What is the force needed to keep the spring stretched to a length of 14 cm?
4. The cost of a sheet of gold foil is proportional to its area. if a rectangular sheet
measuring 15 cm by 20 cm costs $75, how much would a sheet measuring 3 cm by
5 cm cost?
5. If the upkeep of 62 trucks for one year is $3100, what wold be the upkeep for 48
similar trucks for one year at the same rate?
2.3.2 Inverse Variation
Another model that is frequently used in mathematical modelling is the function y = k=x:
We have met the function y = k=x earlier (the rectangular hyperbola). We called the
function f (x) = k=x the reciprocal function.
Now we meet a further use of this same function.
If y and x are related by the equation y = k=x where k is nonzero we say “y is inversely
proportional to x”or “y varies inversely as x”.
Example 3
If y varies inversely as x, and y = 3 when x = 4, …nd y when x = 2.
Solution:
Firstly write down the equation
y=
k
x
Secondly substitute y = 3 and x = 4 to …nd k
k
4
k = 12
12
y =
x
3 =
So
Thirdly substitute x = 2
y=
12
=6
2
52
Mathematics 2
Functions
Example 4
Boyle’s law states that when a sample of gas is compressed at a constant temperature,
the pressure of the gas is inversely proportional to the volume of the gas
(a) Suppose the pressure of a sample of air that occupies 0:106 m3 at 25 C is 50 kPa.
Find the constant of proportionality and write the equation.
(b) If the sample is expanded to a volume of 0:4 m3 …nd the new pressure.
Solution
Let the pressure be P when the volume is V and let k be the constant of proportionality.
Then
k
P =
V
Substitute V = 0:106 when P = 50
k
0:106
k = 50 0:106 = 5:3
5:3
P =
V
50 =
So
Now substitute V = 0:4
P =
5:3
= 13:25
0:4
So the new pressure is 13:25 kPa
Exercises 2.3.2
1. Express the statement as a formula then use the given information to …nd the
constant of proportionality.
(a) P varies inversely as Q. If Q = 3 then P = 4:5:
(b) W is inversely proportional to x. When x = 1:2 W = 3:5:
2. Y is inversely proportional to x. If Y = 2 when x = 3, …nd Y when x = 1:2:
3. The volume of a quantity of gas is inversely proportional to the pressure upon it. If
the volume is 740 m3 under a pressure of 1:00 kg m 2 , how many cubic metres will
be present under a pressure of 2:00 kg m 2 ?
2.3.3 Joint Variation
In engineering, quantities often depend on more than one quantity. If one quantity is
proportional to two or more quantities the relationship is called joint variation. In its
53
Mathematics 2
Functions
simplest form we might say that “A is jointly proportional to x and y”. We write
or
A / xy
A = kxy
Notice we use the word and in the sentence which in mathematics is usually associated
with the process of addition. This could lead to confusion so you need to be aware that
you have to look at the whole sentence.
For the equation
A=k
x
y
we say “A is directly proportional to x and inversely proportional to y”. Notice again
the use of the word and but the quantities are multiplied together.
In engineering this concept is extended further.
Example 5
Write a sentence to express
F =k
m1 m2
r2
Solution
m1 and m2 are di¤erent quantities and r2 means the square of r. so there are three
quantities to deal with. We could say therefore
F is directly proportional to m1 and m2 and inversely proportional to r2 :
Example 6
Newton’s law of gravitation states that two objects with masses m1 and m2 attract each
other with a force F that is directly proportional to their masses and inversely proportional
to the square of the distance between their centres.
Two lead balls whose masses are m1 = 4:2 kg and m2 = 0:350 kg are placed with their
centres r = 40:0 cm apart attract each other with a force of 6:1299 10 10 N. What is
the constant of proportionality?
Solution
It should be no surprise that the equation is from example 5
F =k
m1 m2
r2
There is a trap in this example. When you are using Newtons for force you must have
masses in kilograms and distances in metres. The masses are …ne but the distance in
54
Mathematics 2
Functions
centimetres must be converted to metres. That is easy
40:0 cm = 0:4 m
So
6:1299
10
0:350
0:42
6:1299 10 10 0:42
k =
4:2 0:350
= 6:672 10 11
10
= k
4:2
Exercises 2.3.3
1. Write an equation that expresses the statement
(a) T is proportional to the square root of l:
(b) V is jointly proportional to l, b and h:
(c) M is directly proportional to n and inversely proportional to p and q:
2. Write the statement as a formula then use the information to …nd the constant of
proportionality.
(a) R varies jointly as s and t. If s = 3 and t = 4 then R = 192.
(b) L is inversely proportional to the square root of t. If L = 144 then t = 64:
3. The cost C of printing a magazine is jointly proportional to the number of pages, p
in the magazine and the number, m of magazines printed.
(a) Write an equation for this joint variation.
(b) Find the constant of proportionality if the printing cost is $80; 000 for 5000
copies of a 64 page magazine.
(c) What would be the printing cost for 4000 copies of a 72 page magazine?
4. The period of a pendulum (that is the time taken for it to swing backwards and
forwards) varies directly as the square root of the length of the pendulum
(a) Write an equation to express the relationship
(b) To double the period what would you have to do to the length?
5. The pressure P of a sample of gas is directly proportional to the temperature, T
and inversely proportional to the volume, V .
(a) Write an equation to express this relationship.
(b) Find the constant of proportionality if 100 L of gas exerts a pressure of 33:2 kPa
at a temperature of 400 K (absolute temperature measured on the Kelvin scale)
(c) If the temperature is increased to 500 K and the volume is reduced to 80 L,
what is the pressure on the gas?
55