Subsection 5.1.1 Definitions and Notation
We often want to predict values of one variable from the values of a related variable. For example, when a physician prescribes a drug in a certain dosage, she needs to know how long the dose will remain in the bloodstream. A sales manager needs to know how the price of his product will affect its sales. A function is a special type of relationship between variables that allows us to make such predictions.
We have already seen some examples of functions. For instance, suppose it costs $800 for flying lessons, plus $30 per hour to rent a plane. If we let \(C\) represent the total cost for \(t\) hours of flying lessons, then
\begin{equation*}
C=800+30t ~~~~ (t\ge 0)
\end{equation*}
The variable \(t\) is called the input variable, and \(C\) is the output variable. Given a value of the input, we can calculate the corresponding output value using the formula for the function. Thus, for example
when |
\(t=\alert{0}\text{,}\) |
\(C=800+30(\alert{0})=800\) |
when |
\(t=\alert{4}\text{,}\) |
\(C=800+30(\alert{4})=920\) |
when |
\(t=\alert{10}\text{,}\) |
\(C=800+30(\alert{10})=1100\) |
We can display the relationship between two variables by a table or by ordered pairs. The input variable is the first component of the ordered pair, and the output variable is the second component. For the example above we have:
\(t\) |
\(C\) |
\((t,C)\) |
\(0\) |
\(800\) |
\((0, 800)\) |
\(4\) |
\(920\) |
\((4, 920)\) |
\(10\) |
\(1100\) |
\((10,1100)\) |
Note that there can be only one value of \(C\) for each value of \(t\text{.}\) We say that "\(C\) is a function of \(t\text{.}\)"
Definition 5.1.1. Definition of Function.
A function is a relationship between two variables for which exactly one value of the output variable is determined by each value of the input variable.
Checkpoint 5.1.2. QuickCheck 1.
What distinguishes a function from other variable relationships?
There cannot be two output values for a single input value.
We can display the variables as ordered pairs.
The variables are related by a formula.
The values of the input and output variables must be different
Example 5.1.3.
The distance, \(d\text{,}\) traveled by a car in 2 hours is a function of its speed, \(r\text{.}\) If we know the speed of the car, we can determine the distance it travels by the formula \(d = r \cdot 2\text{.}\)
The cost of a fill-up with unleaded gasoline is a function of the number of gallons purchased. The gas pump represents the function by displaying the corresponding values of the input variable (number of gallons) and the output variable (cost).
Score on the Scholastic Aptitude Test (SAT) is not a function of score on an IQ test, because two people with the same score on an IQ test may score differently on the SAT; that is, a person’s score on the SAT is not uniquely determined by his or her score on an IQ test.
Checkpoint 5.1.4. Practice 1.
As part of a project to improve the success rate of freshmen, the counseling department studied the grades earned by a group of students in English and algebra. Do you think that a student’s grade in algebra is a function of his or her grade in English? Explain why or why not.
Phatburger features a soda bar, where you can serve your own soft drinks in any size. Do you think that the number of calories in a serving of Zap Kola is a function of the number of fluid ounces? Explain why or why not.
Solution.
No, students with the same grade in English can have different grades in algebra.
Yes, the number of calories is proportional to the number of fluid ounces.
A function can be described in several different ways. In the following examples, we consider functions defined by tables, by graphs, and by equations.
Subsection 5.1.3 Functions Defined by Graphs
We can also use a graph to define a function. The input variable is displayed on the horizontal axis, and the output variable on the vertical axis.
Example 5.1.9.
The graph shows the number of hours, \(H\text{,}\) that the sun is above the horizon in Peoria, Illinois, on day \(t\text{,}\) where \(t = 0\) on January 1.
Which variable is the input, and which is the output?
How many hours of sunlight are there in Peoria on day 150?
On which days are there 12 hours of sunlight?
What are the maximum and minimum values of \(H\text{,}\) and when do these values occur?
Solution.
The input variable, \(t\text{,}\) appears on the horizontal axis. The number of daylight hours, \(H\text{,}\) is a function of the date. The output variable appears on the vertical axis.
The point on the curve where \(t = 150\) has \(H \approx 14.1\text{,}\) so Peoria gets about 14.1 hours of daylight when \(t = 150\text{,}\) which is at the end of May.
\(H = 12\) at the two points where \(t \approx 85\) (in late March) and \(t \approx 270\) (late September).
The maximum value of 14.4 hours occurs on the longest day of the year, when \(t \approx 170\text{,}\) about three weeks into June. The minimum of 9.6 hours occurs on the shortest day, when \(t \approx 355\text{,}\) about three weeks into December.
Checkpoint 5.1.10. Practice 3.
The graph shows the elevation in feet, \(a\text{,}\) of the Los Angeles Marathon course at a distance \(d\) miles into the race. (Source: Los Angeles Times, March 3, 2005)
Which variable is the input, and which is the output?
What is the elevation at mile 20?
At what distances is the elevation 150 feet?
What are the maximum and minimum values of \(a \text{,}\) and when do these values occur?
The runners pass by the Los Angeles Coliseum at about 4.2 miles into the race. What is the elevation there?
Solution.
The input variable is \(d \text{,}\) and the output variable is \(a \text{.}\)
Approximately 210 feet
Approximately where \(d\approx 5 \text{,}\) \(d\approx 11 \text{,}\) \(d\approx 12 \text{,}\) \(d\approx 16 \text{,}\) \(d\approx 17.5 \text{,}\) and \(d\approx 18 \)
The maximum value of 300 feet occurs at the start, when \(d = 0 \text{.}\) The minimum of 85 feet occurs when \(d\approx 15 \text{.}\)
Approximately 165 feet
Subsection 5.1.5 Function Notation
There is a convenient notation for discussing functions. First, we choose a letter, such as \(f\text{,}\) \(g\text{,}\) or \(h\) (or \(F\text{,}\) \(G\text{,}\) or \(H\)), to name a particular function. (We can use any letter, but these are the most common choices.)
For instance, in
Example 5.1.11, the height,
\(h\text{,}\) of a falling algebra book is a function of the elapsed time,
\(t\text{.}\) We might call this function
\(f\text{.}\) In other words,
\(f\) is the name of the relationship between the variables
\(h\) and
\(t\text{.}\) We write
\begin{equation*}
h = f (t)
\end{equation*}
which means "\(h\) is a function of \(t\text{,}\) and \(f\) is the name of the function."
With this new notation we may write
\begin{equation*}
h = f (t) = 1776 - 16t^2
\end{equation*}
or just
\begin{equation*}
f (t) = 1776 - 16t^2
\end{equation*}
instead of
\begin{equation*}
h = 1776 - 16t^2
\end{equation*}
to describe the function.
Example 5.1.16.
In
Example 5.1.11, the height of an algebra book dropped from the top of One World Trade Center is given by the equation
\begin{equation*}
h = 1776 - 16t^2
\end{equation*}
We see that
\begin{gather*}
\text{when } t=1, \quad h=1760\\
\text{when } t=2, \quad h=1712
\end{gather*}
Using function notation, these relationships can be expressed more concisely as
\begin{equation*}
f(1)=1760 \quad\text{ and } \quad f(2)=1712
\end{equation*}
which we read as "\(f\) of 1 equals 1760" and "\(f\) of 2 equals 1712." The values for the input variable, \(t\text{,}\) appear inside the parentheses, and the values for the output variable, \(h\text{,}\) appear on the other side of the equation.
Remember that when we write \(y = f(x)\text{,}\) the symbol \(f(x)\) is just another name for the output variable. \(~\alert{\text{[TK]}}\)
Function Notation.
Checkpoint 5.1.17. QuickCheck 4.
True or False.
The notation \(f(t)\) indicates the product of \(f\) and \(t\text{.}\)
If \(y=f(x)\text{,}\) then \(f(x)\) gives the value of the input variable.
If \(Q\) is a function of \(M\text{,}\) we may write \(M=f(Q)\text{.}\)
In the equation \(d=g(n)\text{,}\) the letters \(d\text{,}\) \(g\text{,}\) and \(n\) are variables.
Checkpoint 5.1.18. Practice 5.
Let
\(F\) be the name of the function defined by the graph in
Example 5.1.9, the number of hours of daylight in Peoria
\(t\) days after January 1.
Use function notation to state that \(H\) is a function of \(t\text{.}\)
What does the statement \(F(15) = 9.7\) mean in the context of the problem?
Solution.
\(\displaystyle H = F(t)\)
The sun is above the horizon in Peoria for 9.7 hours on January 16.
Checkpoint 5.1.19. QuickCheck 5.
Use function notation to write the statement "\(L\) defines \(w\) as a function of \(p\text{.}\)"
\(\displaystyle L=w(p)\)
\(\displaystyle w=L(p)\)
\(\displaystyle p=L(w)\)
\(\displaystyle L=p(w)\)
Subsection 5.1.6 Using Function Notation
Finding the value of the output variable that corresponds to a particular value of the input variable is called evaluating the function.
Example 5.1.20.
Let
\(g\) be the name of the postage function defined by the table in
Example 5.1.5 b. Find
\(g(1)\text{,}\) \(g(3)\text{,}\) and
\(g(6.75\)).
Solution.
According to the table,
when \(w=1\text{,}\)
|
|
\(p=0.60\) |
so |
\(g(1)=0.60\) |
when \(w=3\text{,}\)
|
|
\(p=1.00\) |
so |
\(g(3)=1.08\) |
when \(w=6.75\text{,}\)
|
|
\(p=2.04\) |
so |
\(g(6.75)=2.04\) |
Thus, a letter weighing 1 ounce costs $0.60 to mail, a letter weighing 3 ounces costs $1.08, and a letter weighing 6.75 ounces costs $1.04.
We can also find the input (or inputs) corresponding to a given output. For example, if
\(p=g(w)\) is the postage function, we solve the equation
\(g(w)=0.84\) by finding all input values,
\(w\text{,}\) that correspond to the output $0.84. According to the table in
Example 5.1.5 part (b), any value of
\(w\) greater than 1 but less than or equal to 2 is a solution.
Checkpoint 5.1.21. Practice 6.
When you exercise, your heart rate should increase until it reaches your target heart rate. The table shows target heart rate, \(r = f(a) \text{,}\) as a function of age.
\(a \) |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
\(r \) |
150 |
146 |
142 |
139 |
135 |
131 |
127 |
124 |
120 |
116 |
112 |
Find \(f(25) \) and \(f(50) \text{.}\)
Find a value of \(a \) for which \(f(a) = 135 \text{.}\)
Solution.
\(f (25) = 146 \text{,}\) \(f(50) = 127 \)
\(\displaystyle a = 40 \)
Checkpoint 5.1.22. QuickCheck 6.
If \(n=f(a)\text{,}\) what are the input and output variables?
\(f\) is the output and \(n\) is the input
\(a\) is the input and \(f\) is the output
\(a\) is the input and\(n\) is the output
\(f(a)\) is the input and \(n\) is the output
To evaluate a function described by an equation, we simply substitute the given input value into the equation to find the corresponding output, or function value.
Example 5.1.23.
The function \(H\) is defined by \(~H=f(s) = \dfrac{\sqrt{s+3}}{s}.~~\) Evaluate the function at the following values.
\(\displaystyle s=6\)
\(\displaystyle s=-1\)
Solution.
\(f(\alert{6})=\dfrac{\sqrt{\alert{6}+3}}{\alert{6}}=
\dfrac{\sqrt{9}}{6}=\dfrac{3}{6}=\dfrac{1}{2}\text{.}\) Thus, \(f(6)=\dfrac{1}{2}\text{.}\)
\(f(\alert{-1})=\dfrac{\sqrt{\alert{-1}+3}}{\alert{-1}}=
\dfrac{\sqrt{2}}{-1}=-\sqrt{2}\text{.}\) Thus, \(f(-1)=-\sqrt{2}\text{.}\)
Checkpoint 5.1.24. Practice 7.
Complete the table displaying ordered pairs for the function \(f(x) = 5 - x^3\text{.}\) Evaluate the function to find the corresponding \(f(x)\)-value for each value of \(x\text{.}\)
\(x\) |
\(f(x)\) |
|
\(-2\) |
\(\hphantom{000}\) |
\(f(\alert{-2})=5-(\alert{-2})^3=~\) |
\(0\) |
\(\hphantom{000}\) |
\(f(\alert{0})=5-\alert{0}^3=\) |
\(1\) |
\(\hphantom{000}\) |
\(f(\alert{1})=5-\alert{1}^3=\) |
\(3\) |
\(\hphantom{000}\) |
\(f(\alert{3})=5-\alert{3}^3=\) |
Solution.
\(x\) |
\(f(x)\) |
\(-2\) |
\(13 \) |
\(0\) |
\(5\) |
\(1\) |
\(4\) |
\(3\) |
\(-22\) |