One of the main concepts in mathematics and in the mathematical modeling of applied processes is that of a function. The formal mathematical definition of a function is abstract and general, but in applied precalculus we can think of a function as a special kind of dependence between two numerical variables.
Suppose you are in Rhode Island and intend to buy a gift from an online store. The amount of money, \(C\text{,}\) that you will have to spend (that is, the total cost to purchase the gift) depends on the list price, \(p\text{,}\) of the item you select. The cost is equal to the list price plus the state of Rhode Islandβs \(7\%\) sales tax plus the rate the store charges for shipping and handling. Assuming that the online store charges a flat rate of \(\$4.95\) for shipping and handling, give a formula for the cost \(C\) to purchase a gift of list price \(p\) dollars.
In the above formula, \(C\) and \(p\) are variablesβtheir values vary based on the item you select. They are both numerical variables as their possible values are numbers. The cost \(C\) depends on \(p\) and, moreover, the cost is uniquely determined by the itemβs list price \(p\text{.}\) We say in this case that \(C\) βis a function of \(p\text{.}\)β Using function notation, we write
\begin{equation*}
C=f(p).
\end{equation*}
The notation \(C=f(p)\) is read as β\(C\) equals \(f\) of \(p\text{.}\)β Note that \(f\) does not stand for the word βfunctionβ here; it is merely a letter used to name the function and another letter could be used instead. The notation \(f(p)\) represents the value of the function \(f\) at a given list price \(p\text{;}\) that is, \(f(p)\) is the cost corresponding to a list price \(p\text{:}\)
For every \(p\text{,}\) the value of the function \(f(p)\) gives the cost \(C\) for a list price \(p\text{.}\) For example, \(f(50)\)βthe value of the function at \(p=50\)βgives the cost corresponding to the list price \(50\) dollars. Similarly, \(f(60)\) gives the cost corresponding to the list price \(60\) dollars.
whose formula was found in ExampleΒ 1.1.1 to determine the total amount you will spend to purchase a gift with a list price of \(p=80\) dollars from the online store.
We are looking for the cost \(C\) when \(p = 80\text{.}\) In other words, we are looking for \(f(80)\)βread aloud as β\(f\) of \(80\text{.}\)β Using the formula for \(f(p)\) with \(p=80\text{,}\) we obtain
If you select an item listed at \(p=80\) dollars, you will pay \(C=90.55\) dollars. In function notation we could write \(90.55=f(80)\) or, equivalently, \(f(80)=90.55\text{.}\)
Above, the cost variable, \(C\text{,}\) is called the dependent variable or the output variable. The list price, \(p\text{,}\) is the independent variable or the input variable. For each list price or input valueβinput for shortβwe have exactly one cost value. So we have exactly one output valueβoutput for shortβfor each input. The formula for the function \(f\) gives the rule of how to obtain the output corresponding to each possible input \(p\text{.}\)
Definition1.1.3.Informal Definition of a Function.
A function is a correspondence between two numerical variables, the input variable and the output variable, that takes input numbers from a certain subset of the real numbers called the domain of the function and prescribes to each exactly one output.
From the mathematical point of view, the domain of the formula for the function \(f(p)=p+0.07p+4.95\) consists of all real numbers \(p\text{.}\) This is because \(f(p)\) is unique and defined for each individual real number inputted for \(p\text{.}\) When we consider the applied context of this formula as presented in ExampleΒ 1.1.1 and ExampleΒ 1.1.2, however, the input \(p\) is a list price and therefore cannot be negative. For practical reasons, we would restrict the domain of \(f\) to positive inputs \(p\text{.}\)
In an abstract setting, when variables are not associated any specific real-life meaning, we commonly denote the independent variable by \(x\text{,}\) the dependent variable by \(y\text{,}\) and a function by \(f\text{:}\)
For every input number \(x\text{,}\) we can multiply \(x\) by \(0.2\) and add \(1\text{.}\) So the output \(f(x)=0.2x+1\) is defined and is a single number for each \(x\text{.}\) Hence, the domain of \(f\) consists of all real numbers \(x\text{.}\)
The quantity \(f(2)\) is the value of the function or the output corresponding to the input \(x=2\text{.}\) Substituting \(x=2\) into the formula for \(f\text{,}\) we find
We are looking for inputs \(x\) for which the output \(y=0\text{.}\) In other words, we are looking for the value (or the values) of \(x\) which are solutions to the equation \(0=0.2x+1\) or equivalently \(0.2x+1=0.\) To find \(x\text{,}\) we use the standard techniques of solving equations: we subtract \(1\) from both sides of the equation and then we divide both sides of the equation by \(0.2\text{.}\) These steps are shown below.
The previous example illustrates that a function need not be associated with an applied scenario. When an application is involved, it is important to be able to interpret the practical meaning.
The amount of nicotine in a personβs bloodstream, \(N=f(t)\text{,}\) in milligrams, is a function of time \(t\text{,}\) in hours, that have passed since the person finished smoking a single cigarette.
Identify the independent variable and the dependent variable of this function.
Here, \(N\) depends on \(t\text{,}\) making \(N\) a function of \(t\text{.}\) Thus \(N\) is the dependent variable and \(t\) is the independent variable.
The number \(3\) is a value of \(t\text{,}\) so its units are hours; \(0.71\) is a value of \(N\text{,}\) so its units are milligrams. In practical terms, \(f(3)=0.71\) means that \(3\) hours after a person finishes smoking a single cigarette there will be \(0.71\) milligrams of nicotine left in their bloodstream.
Similarly to the prior solution, \(f(4)=0.5\) means that \(4\) hours after a person finishes smoking a single cigarette there will be \(0.5\) milligrams of nicotine left in their bloodstream.
In cases of strep throat, a daily pediatric dose of Amoxicillin, \(D\text{,}\) in milligrams, depends on the weight of a child, \(w\text{,}\) in kilograms; that is, \(D\) is a function of \(w\text{.}\) Denoting the function by \(g\) results in
\begin{equation*}
D=g(w).
\end{equation*}
As a general rule, the daily dose should be 50 milligrams for each kilogram of weight.
The value \(g(w)\) represents the dose for the weight of \(w\) kilograms. Since the dose is 50 milligrams for each kilogram, the dose \(g(w)\) is given by
\begin{equation*}
50 \, \dfrac{\text{milligrams}}{\text{kilogram}}\times w \, \text{kilograms}.
\end{equation*}
To answer questions like this, it can be useful to assign the appropriate units to each number. Since \(11\) is a value for \(w\text{,}\) it is measured in kilograms. \(550\) is a value for \(g(w)\) or \(D\text{,}\) so it is measured in milligrams. Combining this information with the fact that \(g(w)\) gives the dose for a child who weighs \(w\) kilograms, we conclude that the practical meaning of the statement \(g(11)=550\) is that a child weighing \(11\) kilograms should receive a daily dose of \(550\) milligrams of Amoxicillin when being treated for strep throat.
A man leaves home and drives at \(40\) miles per hour toward a hospital located \(150\) miles away from his home. At time \(t\) hours after he began driving, his distance from the hospital, \(d\text{,}\) in miles, is given by
\begin{equation*}
d=150-40t.
\end{equation*}
Let \(d=f(t)\text{.}\) What is the formula for the function \(f(t)\text{?}\)
The man will arrive at the hospital when his distance \(d\) from the hospital is 0 miles. We are looking for \(t\) such that \(0=150-40t\) or equivalently \(150-40t=0\text{.}\) Solving for \(t\text{:}\)
In ExampleΒ 1.1.6 we considered the function \(D=g(w)\) that gives the daily dose \(D\) of Amoxicillin for a child weighing \(w\) kilograms. Notice that \(g(w)\) increases as the weight \(w\) increases. In ExampleΒ 1.1.7, the distance \(d=f(t)\) from the hospital decreases as the number of hours \(t\) spent driving toward the hospital increases.
Above, the dose of Amoxicillin would be an illustration of an increasing function of weight while the distance from the hospital would be an illustration of a decreasing function of time. We will see later that many functions are neither increasing nor decreasing through their domain; they may increase on some intervals and decrease on other intervals.
A function that is presented as a formula can be thought of as sequence of operations performed on an input in order to obtain the corresponding output. For example, the function \(f(x)=0.2x+1\) of ExampleΒ 1.1.4 takes an input, multiplies the input by \(0.2\text{,}\) and then adds \(1\) to the result. The function performs this sequence of operations no matter what the input is. We can write this symbolically as
Whatever input we feed into the function \(f\text{,}\) a number, an expression, whatever we like, the function will multiply the input by \(0.2\) and add \(1\text{.}\)
In \(g(2+h)\text{,}\) the input is an algebraic expression: \(2+h\text{.}\) In any given context, \(h\) may stand for a number or for a numerical variable. No matter what \(h\) represents here, the function \(g\) takes the input \(2+h\text{,}\) multiplies it by 4, and then subtracts the result from 3. Thus,
We consider the whole expression all at once below, though you may find it helpful to separately find each of \(g(1-h)\) and \(g(1)\) and then subtract the two results.
We begin with an input \(x\text{.}\) Taking the square root of this input results in \(\sqrt{x}\text{.}\) Multiplying the result by 3 results in \(3\sqrt{x}\text{.}\) Finally, subtracting 1 results in \(3\sqrt{x}-1\text{.}\) Therefore, the formula for \(f\) is
We begin with an input \(x\text{.}\) Squaring the input first results in \(x^{2}\text{.}\) Adding \(2\) next results in \(x^{2}+2\text{.}\) Now, we take the reciprocal of \(x^{2}+2\text{,}\) which is \(\dfrac{1}{x^2+2}\text{.}\) Therefore, the formula for \(f\) is
Note that neither \(f(x)\) and \(g(x)\) are assigned any specific practical applied meaning. This means that the domain of each function will be all inputs \(x\) for which the output is defined.
The function \(f(x)=\dfrac{1}{x^2-1}\) is defined at any input that does not lead to division by zero and undefined at any input that does lead to division by zero. To find the value(s) of \(x\) for which \(f(x)\) is undefined, we set its denominator equal to zero and solve for \(x\text{:}\)
We can now see that \(f(x)\) is undefined when \(x=1\) and when \(x=-1\text{.}\) The domain of \(f(x)\) is all real numbers except for these two values. This can be written in a variety of different ways.
The function \(g(x)=\sqrt{x-3}\) is defined provided the number under the radical is not negative. That is, it is defined for those values of \(x\) satisfying that \(x-3\geq 0\text{.}\) We can isolate \(x\) on one side of the inequality
which allows us to conclude that the domain of \(g(x)\) is all real numbers \(x\) that are greater than or equal to \(3\text{.}\) As before, this can be written in a variety of different ways.
The amount of caffeine, \(C\text{,}\) measured in milligrams, in a personβs body \(t\) hours after drinking a cup of coffee is given by the function \(C=f(t)\text{.}\) What do each of the following statements tell you in practical terms; that is, in terms of time and caffeine? Answer in complete sentences and include units with each number.
The total number of units, \(P\text{,}\) produced after \(t\) hours of production is given by the function \(P=h(t)\text{.}\) What do each of the following statements tell you in practical terms; that is, in terms of units of product produced and time? Answer in complete sentences and include units with each number.
The total cost of a meal in a restaurant, \(C\text{,}\) in dollars, as a function of the menu price of the meal, \(p\text{,}\) also in dollars, is given by
\begin{equation*}
C=p+0.20p
\end{equation*}
where the term \(0.20p\) corresponds to a \(20\%\) tip.
A bakery makes 6 batches of cookies an hour, with a batch typically consisting of 12 cookies. The total number of batches baked, \(B\text{,}\) is measured as function of time \(t\text{,}\) in hours, so that \(B=f(t)=6t\text{.}\)
A driver is heading to a faraway town. The amount of fuel, \(G\text{,}\) in gallons, left in the fuel tank is a function of the number of miles \(m\) driven during the trip; that is, \(G=f(m)\text{.}\)
The value of a car, \(V\text{,}\) in dollars, \(t\) years after purchase is given by the function \(V=g(t)\text{,}\) where \(g(t)=16500-1500t\text{.}\)
Since you see lightning immediately and it takes the sound of thunder about 5 seconds to travel a mile, you can calculate the distance between you and the lightning. Count the number of seconds, \(S\text{,}\) between the flash of lightning and the sound of thunder. Then the distance, \(D\text{,}\) in miles, between you and the lightning is given by the function:
The cost of a medium pizza is \(\$10\) plus \(\$1.75\) per topping. Write a function \(f(x)\) to describe the cost of a medium pizza with \(x\) number of toppings.
A caffeine addict has \(\$20\) and buys \(c\) cups of coffee at \(\$1.25\) per cup. The amount of money that he has left depends on the number of cups that he buys.
This is a function because if they purchase a specific number of cups of coffee, there is exactly one amount of money left. The input is the number of cups of coffee purchased, the output is the amount of money left.
The domain is the set of all possible numbers of cups of coffee they could purchase, which are integers (whole numbers) and specifically must be between \(0\) and \(16\text{.}\)The \(16\) is there because it is the maximum number of cups of coffee they can purchase with \(\$20\). The range is the set of all possible amounts of money they could have left from the initial \(\$20\text{.}\) So numbers from \(0\) to \(20\) spaced by \(1.25\text{.}\)
Let \(f(r)\) be the weight of an astronaut in pounds at a distance \(r\) (in thousands of miles) from the earthβs center. Explain the meaning of each of the following. Write a complete sentence explaining the meaning of \(f(4)=180\text{,}\) including units.
First we have \(\frac{x}{3}\text{,}\) and then subtracting \(4\) yields \(\frac{x}{3}-4\text{.}\) Finally, this is tripled (multiplied by \(3\)) to obtain \(3\pbr{\frac{x}{3}-4} \text{.}\)
Because \(2x+5\) must be nonnegative, we require that \(2x+5\ge 0\text{.}\) Thus \(2x\ge -5\) and so \(x\ge -\frac{5}{2}\text{.}\) That is, the domain is all numbers greater than or equal to \(-\frac{5}{2}\text{.}\)
Because \(7-2x\) cannot be zero (we cannot divide by zero), then \(7-2x\neq 0\) means that \(7\neq 2x\) and so \(x\neq \frac{7}{2}\text{.}\) That is, the domain is all numbers except for\(\frac{7}{2}\text{.}\)