Mathematics 265 Introduction to Calculus I
Study Guide :: Unit 2
Functions
Objectives
When you have completed this unit, you should be able to
- distinguish between a relation and a function.
- apply the definition of a function to practical situations.
- find the domain of a function.
- apply basic transformations to sketch graphs of functions.
Relations and Functions
Prerequisites
To complete this section, you must know how to write inequalities in interval notation. See the section titled “Intervals,” pages 337-338 of the textbook.
Calculus is the area of mathematics that specializes in solving problems by establishing the function or functions that represent the quantities involved. In this introductory course, you will learn to apply different types of functions to solve problems, and it is our hope that, in the process, you will come to appreciate how powerful the concept of function is for problem solving. But before we discuss functions, we must consider variables and relations.
In mathematics, quantities are called “variables.” Quantities that do not change are called constant variables or constants; those that do change are called changing variables or simply variables.
Definition 2.1. A variable is a quantity that may or may not change (vary) according to what it represents.
You may think that this definition contains a contradiction, but what we intend is to give ourselves the flexibility of changing a constant into a variable if we need to. In this course, all variables are real numbers.
Example 2.1. Your age is a changing variable. It changes (varies) every year while you age, but it becomes a constant on your death.
Example 2.2. Income is a changing variable (increasing, one hopes). It changes according to cost of living adjustments, promotions, etc.
Example 2.3. The distance of a traveling object from its origin is a changing variable.
Example 2.4. The volume of a wooden box is a constant variable. [Why?]
Example 2.5. The volume of a melting ice cube is a changing variable. [Agree?]
In general, it is easy to decide when a variable is constant or changing. Consider the following exercises.
Exercises
- Is the number of children in a family a changing or a constant variable?
- Is the acceleration of Earth’s gravity a constant variable?
- Is the number of days in a year a constant or a changing variable?
When working with variables, it is important to know which quantities are changing, and which are constant.
When we identify one or more variables, we name them for easy reference; therefore, different variables must have different names. Once a variable is named, we represent it as a symbol; this is the first step in abstract thinking—what mathematicians call “mathematical modeling.” The type of symbol is not important, but to facilitate the manipulation of the variables, we tend to give them symbols that are related to what they represent, using as few letters or other characters as possible. Since each person could choose a different symbol for each variable, once we have assigned a symbol, we must let others know what the symbol represents. That is, we assign names and their corresponding symbols to the variables in order to define them.
Always define the variables you are using and give different names to different variables.
It is also convenient to reflect on the possible range of values of the variables we define.
Example 2.6. We could assign the symbols and to the variables that refer to two different types of income. We can define them by stating: “We denote by the income earned by an employee before the year 2000, and by the income earned by the same employee after the year 2000.” What are the possible values for and ? We expect that and are positive nonzero real numbers; that is, and
Example 2.7. To the variable “age” of a person we could assign the letter and state: “The age (in years) of a person is denoted by ” The variable is positive or zero, and we are probably safe to assume that it is less than 120; hence, ; that is, the range of values for is the interval [0,120).
Example 2.8. The variable “distance” can be represented by and we can say: “ . . . the distance $s$ of a traveling object . . . . The variable $s$ is positive; that is,
Exercises
- What symbol would you give to the variable “volume of an ice cube”? How would you define it?
- How would you define the variable “the body temperature of a living human being”? What is the possible range of values for this variable?
Having defined the variables, we must try to understand the possible relationships among them.
Example 2.9. The “income” of an employee is related to the “number the employee’s working hours.” So we have a relation between the changing variables “income” and “number of worked hours.”
Example 2.10. The cost of mailing a letter depends on its weight, so we have a relation between the changing variables “weight of a letter” and “cost of postage.”
Example 2.11. The “area of any triangle” depends on the “length of its base and its height.” So we have a relation between the variables “area of a triangle” and “length of base and height.”
Example 2.12. The “distance” of a traveling object depends on the “time” traveled.
Observe that in the examples give above, we have related variables because we found a relation of dependency between them. But we can also relate variables based on other criteria.
Example 2.13. We can relate the “Social Insurance Number” of a Canadian citizen with his or her “age in the year 1998.”
Example 2.14. Your “age” can be related to your “weight.”
The criterion used to associate the variables must be established—that is, defined—and to establish it, we must introduce a mathematical model.
Example 2.15. In Example 2.9, we have the relation between the variable “income” and the variable “number of worked hours.” We start by defining these variables. Let be the income and be the number of worked hours. There are two ways to define the relation between these two variables:
by ordered pairs. The pair indicates that and are two related variables. To establish the relationship between them, we say that the relation is the set of all pairs where is the income earned for worked hours, and we write is the income earned for worked hours We can also give a name to this relation, say and we write
The brackets $\{\}$ are read as “the set of,” and the symbol is read as “such that” or “where.” So the expression is, “ is the set of all pairs of the form such that is the income for worked hours.”
by explicit definition of the relation. We decide on the name of the relation first, say and then we write to indicate that is related to by We define this relation explicitly, as follows:
$wTI$ if and only if $I$ is the income earned for $w$ worked hours.
In calculus, we prefer the notation that uses ordered pairs.
Example 2.16. In Example 2.10, we have the variables cost of postage and weight, which we define as and respectively. If we name the relation we either write
$ C = \{ (w,P)|P\;\mbox{is the cost of postage for a piece of mail of weight}\;w\}$
to be read as “ is the set of all pairs such that is the cost of postage of a piece of mail of weight ,” or we write iff[1] is the cost of posting a piece of mail of weight
We read “ is related to by the relation if and only if is the cost of posting a piece of mail of weight .”
Example 2.17. In Example 2.11, we define as the area of a triangle, and and as the base and height of the triangle, respectively. We name the relation and we define it as
$T = \{ ((b,h),A)|A\;{\text{is}}\;{\text{the}}\;{\text{area}}\;{\text{of}}\;{\text{a}}\;{\text{triangle}}\;{\text{of}}\;{\text{base}}\;b\;{\text{and}}\;{\text{height}}\;h\}$
or
iff is the area of a triangle with base and height
Example 2.18. Refer to Example 2.13. We will let SIN be the social insurance number of a person, and we let be that person’s age in the year 1998. We name the relation , and we have
$ K = (\mbox{SIN},A) | A $ is the age, in the year 1998, of the person associated to $\mbox{SIN}$
or
$ \mbox{SIN} K\,A $ iff $ A $ is the age in the year 1998 of the person associated to $\mbox{SIN}$.
Example 2.19. The relation between a positive integer and its square root is written as
.
Since we already have a symbol to denote the square root of a positive integer , we can also write .
Exercises
- How would you state the relation in Example 2.12?
- How would you read the relation below?
- How would you read the relation below?
- iff is the area of a triangle with base and height
- Define the variables “age” and “weight” and establish their relation as given in Example 2.14.
- How would you read the relation below?
Once a relation is established (defined), we can decide which particular pairs belong to it.
Definition 2.3. We say that a pair belongs to a relation if is related to by and we write If is not related to by , then we write
A relation is well defined if we can determine whether any given pair belongs to the relation or not.
From Example 2.15, we can see that if the pair then for hours of work the income is $\$500\mbox{.}00$, we also see that the pair since the income cannot be $\$0\mbox{.}00$ for $12$ hours of work. It is also clear that .
In Example 2.16, we write to indicate that, for a piece of mail weighing grams, the cost of postage is
In Example 2.17, we have and
In Example 2.19, we have and [Why?]
Observe that the order in which the pair is presented matters, the pairs and in the relation of Example 2.15 are not the same: as we said means that the income for hours of work is , the pair says that for hours of work the income is
Exercises
- Consider the relation
- Identify a pair that is in and a pair that is not in
- Indicate whether the pair belongs to the relation
We use a special notation when there is a relation of dependency between variables. In Example 2.15, the income depends on the number of worked hours and we express this fact by writing In Example 2.16, we write to indicate that the cost of posting a piece of mail depends on its weight . In Example 2.17, we are told that —the area of a triangle depends on its base and height . In Example 2.12, the distance traveled $s$ depends on the time traveled ; hence, However, in Example 2.18, the variable SIN does not depend on the variable . This is not a relation of dependency, so it is not correct to write (SIN).
Definition 2.4. If a variable depends on the variable , we write In this case, we refer to as the dependent variable, and as the independent variable.
For convenience, the relation of dependency takes the name of the dependent variable . Moreover, the pair belongs to the relation iff
Observe that if the pair belongs to the relation , then is the independent variable and is the dependent variable. When we write we indicate two things: depends on and the value that corresponds to is . So we write
The relation in Example 2.15 is a relation of dependency; therefore, it is no longer referred to as ; instead, it is called . Note that because belongs to the relation. The statement indicates that for worked hours, the income is ; that is, the pair belongs to the relation . We also recognize that does not belong to the relation; hence, is undefined.
In Example 2.16, in Example 2.17, and in Example 2.19, and
Exercises
- Is the relation in Example 2.11 a relation of dependency? How would you write it?
- If $s$ is the distance traveled (in metres) and is the time (in seconds), then is the relation of dependency between $s$ and . How would you write the statement, “the object travels m in seconds,” in symbolic form?
- Establish the relation of dependency between the following pairs of variables.
- temperature , and wind chill factor
- cost of living , and taxes
- amount of interest paid , and principal amount
The problems that calculus investigates are those that can be represented by a relation of dependency, where the dependent variable is uniquely determined by the value of the independent variable or variables. We call these special relations “functions.” Some functions have to do with variables that change with respect to time, such as distance, velocity, area, volume, population, etc. [Note that, for a given time, there is only one distance, one velocity, one area, one volume or one population.]
In this course, we consider only functions of one independent variable; functions of more than one independent variable, such as that shown in Example 2.17, are studied in more advanced courses.
Definition 2.5. A function is a relation of dependency between two variables, such that if the pairs and belong to the relation [i.e., if and then . That is, the dependent variable associated to the independent variable is uniquely determined.
If two pairs and belong to a relation and , then the relation is not a function.
Example 2.20. In Example 2.19, the relation $S$ is a relation of dependency, but it is not a function, because $S(9) = 3$ and $S(9) = -3$. That is, it is not a function because both of the pairs $(9,3)$ and $(9,-3)$ belong to $S$.
Example 2.21. The relation between the area of a square and the length of its side is a function because each length of a square’s side is associated with only one area.
Example 2.22. The GST we pay for a product of cost $C$ is a relation of dependency, GST($C$), and it is a function. [Why?]
The relations in Examples 2.15 and 2.16 are functions. [Why?]
Later, we will need to solve problems by establishing the function or functions that represent the problem. The key to doing so is understanding the relation of dependency between the variables of the problem.
We have been paying attention to the range of values of the dependent and independent variables. These ranges of values are important for identifying the variables we are working with. We have special names for them.
Definition 2.6. The domain $D_F$ of a function $F(s)$ the largest set of acceptable values of the independent variable $s$.
The range or rank of a function is the largest set of values of the dependent variable
Thus a pair belong to the function , if $s$ is in $D_F$ and is in
To find the domain of a function, ask yourself, “What are the possible values for the independent variable?”
If we have a function with independent variable —that is, —what we try to do next is to find a mathematical expression that gives the value of for each value of This mathematical expression is the mathematical representation (model) of the function This model is also referred as a “formula” for In this course, the formula we want must involve constants and the variable only. That is, we want to express only in terms of the independent variable
Example 2.23. If is the function that gives the area of a square of side $s$, then the mathematical representation of is [Why?] So, we write In this case, is expressed in terms of The domain and range of the function is the interval [Why?]
The formula can be used to solve any problem that involves the area of a square. Observe that this means that the area of a square of side is We say that “the value of at is ” or “the area is if $s$ is .”
Example 2.24. If ${\text{GST}}(C)$ is the function of Example 2.22, above, then ${\text{GST}}(C) = 0.05C$. [Agree?] What is the formula for the total cost $T$ (including the GST) that we would pay for a product of cost $C$? That is, what is the mathematical model (formula) in terms of $C$ of $T$? What is the value of $T$ for an item priced at $\$165.45$?
Example 2.25. If income paid is at a rate of per hour, then the mathematical model of the function of Example 2.15 is The income for worked hours is Although we can multiply by a negative number, it does not make sense to say that the value of at is that is, it is true that but the meanings of and are lost here. The domain and range of this function are the interval and we say that we cannot evaluate the function at negative numbers, not because we cannot multiply by a negative number, but because the variable represents worked hours, and this variable takes only positive values.
We now have the concepts of mathematical domain, as defined in Definition 2.6, above, and of physical domain, as the set of acceptable values of the independent variable, according to what the independent and dependent variables involved represent.
Example 2.26. If $A$ is the area of an equilateral triangle with side $s$, then the formula of the function $A(s)$ in terms of $s$ is $(\sqrt 3 {s^2})/4$; that is,
$A(s) = \displaystyle\frac{{\sqrt 3 {s^2}}}{4}$.
To arrive at this relation, we must study the area of equilateral triangles. The area of any triangle is half of the product of the base and the height. The base of the equilateral triangle is $s$. To find the height (height is a variable) we use Pythagoras’ Theorem.
Figure 2.1. Equilateral triangle with side equal to $s$
According to Pythagoras’ Theorem,
so
since and $s$ are positive. [Why?] Therefore,
and the area is as indicated.
An equilateral triangle with side has an area of
In words, the area of an equilateral triangle with side is approximately equal to . What are the domain and range of ? What is the value of at ? What is the interpretation of
Note: We are ignoring the units for the time being. Be aware, however, that you will be expected to use the correct units in assignments or examinations.
Example 2.27. If the area of a rectangle is m, what is the formula for where is the perimeter of the rectangle and is the length of one of its sides? In other words, how can we express in terms of ?
Step 1
We start with a picture of the problem:
Figure 2.2. Rectangle with length equal to , and width equal to
Step 2
We define the variables:
$l$ is the length of the base
$w$ is the height of the rectangle
$P$ is the perimeter of the rectangle
$A$ is the area
Step 3
We relate the variables to what we already know about the perimeter and area of the rectangle; hence, and
Since we want to find a formula for the perimeter that depends only on , we must substitute for the variable an expression with only s. Hence,
and we conclude that
We have found the formula that gives the perimeter of a rectangle of side and area m. We can find the value of for any positive value of —all we have to do is to apply the formula. For example,
We call this process “evaluating at ,” and the answer is expressed as, “the value of at is $52/3$.”
The domain and range of are the interval [Agree?]
What is the perimeter of a rectangle of area m if one of its sides is m?
Exercises
- A rectangle has perimeter of $20$ m. Express the area of the rectangle as a function of the length of one of its sides.
- Express the surface area of a cube as a function of its volume.
- An open rectangular box with volume m has a square base. Express the surface area of the box as a function of the length of a side of the base.
- The cost of renting a car is plus cents per kilometre traveled.
- Define the variables that correspond to this problem, and establish the relation of dependency between them.
- Find the formula that gives the rental cost in terms of the kilometres traveled.
- Give the domain and range of this function.
- What is the cost for renting a car in Edmonton to travel to Calgary? Include the appropriate taxes.
The formulas or mathematical models of functions can take different forms. We cannot always give a single formula for a function. For instance, in Example 2.16, the cost of postage is fixed depending on a certain range of values of . That is, is if and is if . In this case, we write
\[ P(w) = {\begin{cases} 0.50 & \text{if $\enspace ~~~~0 \lt w \le 30$} \\ 1.00 & \text{if $\enspace ~~30 \lt w \le 100$} \\ 1.70 & \text{if $\enspace 100 \lt w \le 200$} \\ 2.45 & \text{if $\enspace 200 \lt w \le 500$} \end{cases}} \]
As you can see, and The range of written as a set, is and the domain of is the interval See Example 2.10.
We may also be able to give different formulas for different ranges of the independent variable. Consider a function defined as follows:
\[ g(s) = {\begin{cases} 3s - 1 & \text{if $\enspace ~~0 \lt s \le 20$} \\ s^2 + 4 & \text{if $\enspace 20 \lt s \lt 50$} \\ 12 & \text{if $\enspace 50 \lt s \le 60$} \end{cases}} \]
First, we notice that the values for $s$ are in the intervals and , that is is the domain of . Then and are not in the domain, in other words there is no value for at or . And we say that is undefined at and . Observe also that is not defined at any number bigger than (e.g., or ), nor is it defined for negative numbers.
James Stewart, the author of your textbook, calls the functions defined in this fashion piecewise functions, and we will adopt this name. See Examples 7 and 8 on pages 14 and 15 of the textbook.
Exercises
- For each of the piecewise functions (i)-(iv), below,
- \( f(x) = {\begin{cases} x & \mbox{if $\enspace x \le 0$} \\ x + 1 & \mbox{if $\enspace x \gt 0$} \end{cases}} \)
- \( f(x) = {\begin{cases} 2x + 3 & \mbox{if $\enspace x \lt -1$} \\ 3 − x & \mbox{if $\enspace x \ge -1$} \end{cases}} \)
- \( f(x) = {\begin{cases} x + 2 & \mbox{if $\enspace x \le -1$} \\ x^2 & \mbox{if $\enspace x \gt -1$} \end{cases}} \)
- \( f(x) = {\begin{cases} -1 & \mbox{if $\enspace x \le -1$} \\ 3x + 2 & \mbox{if $\enspace |x| \lt 1$} \\ 7 - 2x & \mbox{if $\enspace x \ge 1$} \\ \end{cases}} \)
- give the domain of the function .
Hint: For function (iv), see Box on page 341 of the textbook. - give the values of and
Finally, we may not be able to find one given formula for a function, but we may be able to give a table of pairs that belong to the function (see Example 4 on page 12 of the textbook). This is the case when we make a finite number of observations, such as temperature, population, number of consumers of a product, etc.
Example 2.28. The table below shows the population of a certain city recorded every two years for 10 years.
P | Y | |
---|---|---|
56000 | 1990 | |
56800 | 1992 | |
57000 | 1994 | |
57500 | 1996 | |
57850 | 1998 | |
58000 | 2000 |
The variables are the population and the year when the population was recorded. The function is This table indicates that the pairs
$(1990,56000)$, $(1992,56800)$, $(1994,57000)$, $(1996,57500)$, $(1998,57850)$, $(2000,58000)$
are in the function . So , , and so on.
If the data show a certain pattern or uniformity, one would hope to be able to associate a formula to the function. Different techniques are available.
Exercises
- If a metal rod is being heated, its volume depends on the temperature. If denotes the temperature (in °C) and the volume (in m), then and the domain of the function is all possible values of the temperature . We have the following recorded volumes:
Table showing how the volume of metal rod, V, varies with the temperature, T V T 15 70 18 75 21 80 20 78 18 75 16 72 - What do you observe about the volume of the rod with respect to the temperature?
- What is the value of for ?
- Estimate the volume of the rod when the temperature is °C.
So far we have been working with functions for which the variables have a very specific interpretation; however, to get to the problems we want to solve, we must learn to work with functions in a general sense. That is, we must learn to work with functions and their corresponding formulas when the variables do not have any specific meaning. We must learn about the general properties of functions, and we must learn to do different operations with them. Once we can perform these operations, we will be able to solve problems using functions. This learning approach is the same as the one you used when learning to read: you learned the basic alphabet first.
For example, in general terms, we defined the domain of a function as the set of possible values of the independent variable. In Example 2.23, the variables of the function have specific meaning. Therefore, the domain of the function is the interval because represents a positive quantity: the length of one side of a square. However, if we ignore the meaning of as a length, and consider the function in general terms, then we see that we can evaluate the function at any value of including negative numbers:
Hence, the domain of the function in general is all of the real numbers.
Working in general terms has its advantages, because different practical problems can be solved with functions that share the same formula.
Example 2.29. If we consider the function
in general terms, then we can evaluate the function for any value of except . For this value of , the denominator of this expression is zero; that is, the expression is undefined. So, for any value of other than , it is possible to apply the formula of .
You can check that and that
Since is the only value for which is not defined, the domain of is all real numbers except . In interval notation, we would write
in set notation,
If represents the temperature of an object at time , then the possible values of are all positive real numbers except . In interval notation, the domain is
Example 2.30. The domain of the function
consists of all numbers such that (since only positive numbers have real square roots). So, the domain of is all real numbers greater than or equal to 6; that is, , or in interval notation,
We can also write, only for .
Example 2.31. What is the domain of
To find the domain, we look for those values for which we may have problems evaluating either because the denominator is for this particular value, or because the square root is negative. We see that what we need is , so . So the domain of is all values that are strictly greater than 4—in interval notation
Example 2.32. For the function
we see that (the square root must be non-negative), and the divisor must be nonzero.
If then and therefore,
Since , the function is undefined for
We conclude that the domain is all numbers , except
If we have a function with its corresponding formula, we need to understand what we mean by “evaluating the function.”
To evaluate the function
at , we replace the independent variable by in the formula:
We can also evaluate the function at any other expression in the same way. For example, we can evaluate this function at by replacing the independent variable by :
\begin{align*} H(x + h) & = \dfrac{x + h - 6}{\sqrt{2(x + h) - 8}}\\[1em] & = \dfrac{x + h -6}{\sqrt{2x + 2h - 8}}. \end{align*}
Exercises
- Find the domain of each of the functions below.
Express the domain of each of the functions below in interval notation.
- Evaluate the functions in Exercise 23, above, at .
- Give an example of a function such that and are not in its domain.
Footnote
[1] It is customary to write iff instead of “if and only if”.