## Section1.2Functions: Modeling Relationships

A mathematical model is an abstract concept through which we use mathematical language and notation to describe a phenomenon in the world around us. One example of a mathematical model is found in Dolbear's Law 1 . In the late 1800s, the physicist Amos Dolbear was listening to crickets chirp and noticed a pattern: how frequently the crickets chirped seemed to be connected to the outside temperature. If we let $T$ represent the temperature in degrees Fahrenheit and $N$ the number of chirps per minute, we can summarize Dolbear's observations in the following table.

You can read more in the Wikipedia entry for Dolbear's Law, which has proven to be remarkably accurate for the behavior of snowy tree crickets. For even more of the story, including a reference to this phenomenon on the popular show The Big Bang Theory, see this article.

For a mathematical model, we often seek an algebraic formula that captures observed behavior accurately and can be used to predict behavior not yet observed. For the data in Table 1.2.1, we observe that each of the ordered pairs in the table make the equation

$$T = 40 + 0.25N\label{eq-functions-Dolbear}\tag{1.2.1}$$

true. For instance, $70 = 40 + 0.25(120)\text{.}$ Indeed, scientists who made many additional cricket chirp observations following Dolbear's initial counts found that the formula in Equation (1.2.1) holds with remarkable accuracy for the snowy tree cricket in temperatures ranging from about $50^\circ$ F to $85^\circ$ F.

###### Preview Activity1.2.1.

Use Equation (1.2.1) to respond to the questions below.

1. If we hear snowy tree crickets chirping at a rate of $92$ chirps per minute, what does Dolbear's model suggest should be the outside temperature?

2. If the outside temperature is $77^\circ$ F, how many chirps per minute should we expect to hear?

3. Is the model valid for determining the number of chirps one should hear when the outside temperature is $35^\circ$ F? Why or why not?

4. Suppose that in the morning an observer hears $65$ chirps per minute, and several hours later hears $75$ chirps per minute. How much has the temperature risen between observations?

5. Dolbear's Law is known to be accurate for temperatures from $50^\circ$ to $85^\circ\text{.}$ What is the fewest number of chirps per minute an observer could expect to hear? the greatest number of chirps per minute?

### Subsection1.2.1Functions

The mathematical concept of a function is one of the most central ideas in all of mathematics, in part since functions provide an important tool for representing and explaining patterns. At its core, a function is a repeatable process that takes a collection of input values and generates a corresponding collection of output values with the property that if we use a particular single input, the process always produces exactly the same single output.

For instance, Dolbear's Law in Equation (1.2.1) provides a process that takes a given number of chirps between $40$ and $180$ per minute and reliably produces the corresponding temperature that corresponds to the number of chirps, and thus this equation generates a function. We often give functions shorthand names; using “$D$” for the “Dolbear” function, we can represent the process of taking inputs (observed chirp rates) to outputs (corresponding temperatures) using arrows:

\begin{align*} 80 &\xrightarrow{D} 60\\ 120 &\xrightarrow{D} 70\\ N &\xrightarrow{D} 40 + 0.25 N \end{align*}

Alternatively, for the relationship “$80 \xrightarrow{D} 60$” we can also use the equivalent notation “$D(80) = 60$” to indicate that Dolbear's Law takes an input of $80$ chirps per minute and produces a corresponding output of $60$ degrees Fahrenheit. More generally, we write “$T = D(N) = 40 + 0.25N$” to indicate that a certain temperature, $T\text{,}$ is determined by a given number of chirps per minute, $N\text{,}$ according to the process $D(N) = 40 + 0.25N\text{.}$

Tables and graphs are particularly valuable ways to characterize and represent functions. For the current example, we summarize some of the data the Dolbear function generates in Table 1.2.2 and plot that data along with the underlying curve in Figure 1.2.3.

When a point such as $(120,70)$ in Figure 1.2.3 lies on a function's graph, this indicates the correspondence between input and output: when the value $120$ chirps per minute is entered in the function $D\text{,}$ the result is $70$ degrees Fahrenheit. More concisely, $D(120) = 70\text{.}$ Aloud, we read “$D$ of $120$ is $70$”.

For most important concepts in mathematics, the mathematical community decides on formal definitions to ensure that we have a shared language of understanding. In this text, we will use the following definition of the term “function”.

###### Definition1.2.4.

A function is a process that may be applied to a collection of input values to produce a corresponding collection of output values in such a way that the process produces one and only one output value for any single input value.

If we name a given function $F$ and call the collection of possible inputs to $F$ the set $A$ and the corresponding collection of potential outputs $B\text{,}$ we say “$F$ is a function from $A$ to $B\text{,}$” and sometimes write “$F : A \to B\text{.}$” When a particular input value to $F\text{,}$ say $t\text{,}$ produces a corresponding output $z\text{,}$ we write “$F(t) = z$” and read this symbolic notation as “$F$ of $t$ is $z\text{.}$” We often call $t$ the independent variable and $z$ the dependent variable , since $z$ is a function of $t\text{.}$

###### Definition1.2.5.

Let $F$ be a function from $A$ to $B\text{.}$ The set $A$ of possible inputs to $F$ is called the domain of $F\text{;}$ the set $B$ of potential outputs from $F$ is called the codomain of $F\text{.}$

For the Dolbear function $D(N) = 40 + 0.25N$ in the context of modeling temperature as a function of the number of cricket chirps per minute, the domain of the function is $A = [40,180]$ 2  and the codomain is “all Fahrenheit temperatures”. The codomain of a function is the collection of possible outputs, which we distinguish from the collection of actual ouputs.

The notation “$[40,180]$” means “the collection of all real numbers $x$ that satisfy $40 \le x \le 80$” and is sometimes called “interval notation”.
###### Definition1.2.6.

Let $F$ be a function from $A$ to $B\text{.}$ The range of $F$ is the collection of all actual outputs of the function. That is, the range is the collection of all elements $y$ in $B$ for which it is possible to find an element $x$ in $A$ such that $F(x) = y\text{.}$

In many situations, the range of a function is much more challenging to determine than its codomain. For the Dolbear function, the range is straightforward to find by using the graph shown in Figure 1.2.3: since the actual outputs of $D$ fall between $T = 50$ and $T = 85$ and include every value in that interval, the range of $D$ is $[50,80]\text{.}$

The range of any function is always a subset of the codomain. It is possible for the range to equal the codomain.

###### Activity1.2.2.

Consider a spherical tank of radius $4$ m that is filling with water. Let $V$ be the volume of water in the tank (in cubic meters) at a given time, and $h$ the depth of the water (in meters) at the same time. It can be shown using calculus that $V$ is a function of $h$ according to the rule

\begin{equation*} V = f(h) = \frac{\pi}{3} h^2(12-h)\text{.} \end{equation*}
1. What values of $h$ make sense to consider in the context of this function? What values of $V$ make sense in the same context?

2. What is the domain of the function $f$ in the context of the spherical tank? Why? What is the corresponding codomain? Why?

3. Determine and interpret (with appropriate units) the values $f(2)\text{,}$ $f(4)\text{,}$ and $f(8)\text{.}$ What is important about the value of $f(8)\text{?}$

4. Consider the claim: “since $f(9) = \frac{\pi}{3} 9^2(12-9) = 81\pi \approx 254.47\text{,}$ when the water is $9$ meters deep, there is about $254.47$ cubic meters of water in the tank”. Is this claim valid? Why or why not? Further, does it make sense to observe that “$f(13) = -\frac{169\pi}{3}$”? Why or why not?

5. Can you determine a value of $h$ for which $f(h) = 300$ cubic meters?

### Subsection1.2.2Comparing models and abstract functions

Again, a mathematical model is an abstract concept through which we use mathematical language and notation to describe a phenomenon in the world around us. So far, we have considered two different examples: the Dolbear function, $T = D(N) = 40 + 0.25N\text{,}$ that models how Fahrenheit temperature is a function of the number of cricket chirps per minute and the function $V = f(h) = \frac{\pi}{3}h^2(12-h)$ that models how the volume of water in a spherical tank of radius $4$ m is a function of the depth of the water in the tank. While often we consider a function in the physical setting of some model, there are also many occasions where we consider an abstract function for its own sake in order to study and understand it.

###### Example1.2.7.A parabola and a falling ball.

Calculus shows that for a tennis ball tossed vertically from a window $48$ feet above the ground at an initial vertical velocity of $32$ feet per second, the ball's height above the ground at time $t$ (where $t = 0$ is the instant the ball is tossed) can be modeled by the function $h = g(t) = -16t^2 + 32t + 48\text{.}$ Discuss the differences between the model $g$ and the abstract function $f$ determined by $y = f(x) = -16x^2 + 32x + 48\text{.}$

Solution

We start with the abstract function $y = f(x) = -16x^2 + 32x + 48\text{.}$ Absent a physical context, we can investigate the behavior of this function by computing function values, plotting points, and thinking about its overall behavior. We recognize the function $f$ as quadratic 3 , noting that it opens down because of the leading coefficient of $-16\text{,}$ with vertex located at $x = \frac{-32}{2(-16)} = 1\text{,}$ $y$-intercept at $(0,48)\text{,}$ and with $x$-intercepts at $(-1,0)$ and $(3,0)$ because

\begin{equation*} -16x^2 + 32x + 48 = -16(x^2 - 2x - 3) = -16(x-3)(x+1)\text{.} \end{equation*}

Computing some additional points to gain more information, we see both the data in Table 1.2.8 and the corresponding graph in Figure 1.2.9.

We will engage in a brief review of quadratic functions in Section 1.5

For this abstract function, its domain is “all real numbers” since we may input any real number $x$ we wish into the formula $f(x) = -16x^2 + 32x + 48$ and have the result be defined. Moreover, taking a real number $x$ and processing it in the formula $f(x) = -16x^2 + 32x + 48$ will produce another real number. This tells us that the codomain of the abstract function $f$ is also “all real numbers.” Finally, from the graph and the data, we observe that the largest possible output of the function $f$ is $y = 64\text{.}$ It is apparent that we can generate any $y$-value less than or equal to $64\text{,}$ and thus the range of the abstract function $f$ is all real numbers less than or equal to $64\text{.}$ We denote this collection of real numbers using the shorthand interval notation $(-\infty, 64]\text{.}$ 4

The notation $(-infty,64]$ stands for all the real numbers that lie to the left of an including $64\text{.}$ The “$-\infty$” indicates that there is no left-hand bound on the interval.

Next, we turn our attention to the model $h = g(t) = -16t^2 + 32t + 48$ that represents the height of the ball, $h\text{,}$ in feet $t$ seconds after the ball in initially launched. Here, the big difference is the domain, codomain, and range associated with the model. Since the model takes effect once the ball is tossed, it only makes sense to consider the model for input values $t \ge 0\text{.}$ Moreover, because the model ceases to apply once the ball lands, it is only valid for $t \le 3\text{.}$ Thus, the domain of $g$ is $[0,3]\text{.}$ For the codomain, it only makes sense to consider values of $h$ that are nonnegative. That is, as we think of potential outputs for the model, then can only be in the interval $[0, \infty)\text{.}$ Finally, we can consider the graph of the model on the given domain in Figure 1.2.11 and see that the range of the model is $[0,64]\text{,}$ the collection of all heights between its lowest (ground level) and its largest (at the vertex).

###### Activity1.2.3.

Consider a spherical tank of radius $4$ m that is completely full of water. Suppose that the tank is being drained by regulating an exit valve in such a way that the height of the water in the tank is always decreasing at a rate of $0.5$ meters per minute. Let $V$ be the volume of water in the tank (in cubic meters) at a given time $t$ (in minutes), and $h$ the depth of the water (in meters) at the same time. It can be shown using calculus that $V$ is a function of $t$ according to the model

\begin{equation*} V = p(t) = \frac{256\pi}{3} - \frac{\pi}{24} t^2(24-t)\text{.} \end{equation*}

In addition, let $h = q(t)$ be the function whose output is the depth of the water in the tank at time $t\text{.}$

1. What is the height of the water when $t = 0\text{?}$ When $t = 1\text{?}$ When $t = 2\text{?}$ How long will it take the tank to completely drain? Why?

2. What is the domain of the model $h = q(t)\text{?}$ What is the domain of the model $V = p(t)\text{?}$

3. How much water is in the tank when the tank is full? What is the range of the model $h = q(t)\text{?}$ What is the range of the model $V = p(t)\text{?}$

4. We will frequently use a graphing utility to help us understand function behavior, and strongly recommend Desmos because it is intuitive, online, and free. 5

In this prepared Desmos worksheet, you can see how we enter the (abstract) function $V = p(t) = \frac{256\pi}{3} - \frac{\pi}{24} t^2(24-t)\text{,}$ as well as the corresponding graph the program generates. Make as many observations as you can about the model $V = p(t)\text{.}$ You should discuss its shape and overall behavior, its domain, its range, and more.

5. How does the model $V = p(t) = \frac{256\pi}{3} - \frac{\pi}{24} t^2(24-t)$ differ from the abstract function $y = r(x) = \frac{256\pi}{3} - \frac{\pi}{24} x^2(24-x)\text{?}$ In particular, how do the domain and range of the model differ from those of the abstract function, if at all?

6. How should the graph of the height function $h = q(t)$ appear? Can you determine a formula for $q\text{?}$ Explain your thinking.

To learn more about Desmos, see their outstanding online tutorials.

### Subsection1.2.3Determining whether a relationship is a function or not

To this point in our discussion of functions, we have mostly focused on what the function process may model and what the domain, codomain, and range of a model or abstract function are. It is also important to take note of another part of Definition 1.2.4: “$\ldots$ the process produces one and only one output value for any single input value”. Said differently, if a relationship or process ever associates a single input with two or more different outputs, the process cannot be a function.

###### Example1.2.12.

Is the relationship between people and phone numbers a function?

Solution. No, this relationship is not a function. A given individual person can be associated with more than one phone number, such as their cell phone and their work telephone. This means that we can't view phone numbers as a function of people: one input (a person) can lead to two different outputs (phone numbers). We also can't view people as a function of phone numbers, since more than one person can be associated with a phone number, such as when a family shares a single phone at home.

###### Example1.2.13.

The relationship between $x$ and $y$ that is given in the following table where we attempt to view $y$ as depending on $x\text{.}$

Solution. The relationship between $y$ and $x$ in Table 1.2.14 allows us to think of $y$ as a function of $x$ since each particular input is associated with one and only one output. If we name the function $f\text{,}$ we can say for instance that $f(4) = 11\text{.}$ Moreover, the domain of $f$ is the set of inputs $\{1,2,3,4,5\}\text{,}$ and the codomain (which is also the range) is the set of outputs $\{10,11,13\}\text{.}$

###### Activity1.2.4.

Each of the following prompts describes a relationship between two quantities. For each, your task is to decide whether or not the relationship can be thought of as a function. If not, explain why. If so, state the domain and codomain of the function and write at least one sentence to explain the process that leads from the collection of inputs to the collection of outputs.

1. The relationship between $x$ and $y$ in each of the graphs below (address each graph separately as a potential situation where $y$ is a function of $x$). In Figure 1.2.15, any point on the circle relates $x$ and $y\text{.}$ For instance, the $y$-value $\sqrt{7}$ is related to the $x$-value $-3\text{.}$ In Figure 1.2.16, any point on the blue curve relates $x$ and $y\text{.}$ For instance, when $x = -1\text{,}$ the corresponding $y$-value is $y = 3\text{.}$ An unfilled circle indicates that there is not a point on the graph at that specific location.

2. The relationship between the day of the year and the value of the S&P500 stock index (at the close of trading on a given day), where we attempt to consider the index's value (at the close of trading) as a function of the day of the year.

3. The relationship between a car's velocity and its odometer, where we attempt to view the car's odometer reading as a function of its velocity.

4. The relationship between $x$ and $y$ that is given in the following table where we attempt to view $y$ as depending on $x\text{.}$

For a relationship or process to be a function, each individual input must be associated with one and only one output. Thus, the usual way that we demonstrate a relationship or process is not a function is to find a particular input that is associated with two or more outputs. When the relationship is given graphically, such as in Figure 1.2.15, we can use the vertical line test to determine whether or not the graph represents a function.

###### Vertical Line Test.

A graph in the plane represents a function if and only if every vertical line intersects the graph at most once. When the graph passes this test, the vertical coordinate of each point on the graph can be viewed as a function of the horizontal coordinate of the point.

Since the vertical line $x = -3$ passes through the circle in Figure 1.2.15 at both $y = -\sqrt{7}$ and $y = \sqrt{7}\text{,}$ the circle does not represent a relationship where $y$ is a function of $x\text{.}$ However, since any vertical line we draw in Figure 1.2.16 intersects the blue curve at most one time, the graph indeed represents a function.

We conclude with a formal definition of the graph of a function.

###### Definition1.2.18.

Let $F : A \to B\text{,}$ where $A$ and $B$ are each collections of real numbers. The graph of $F$ is the collection of all ordered pairs $(x,y)$ that satisfy $y = F(x)\text{.}$

When we use a computing device such as Desmos to graph a function $g\text{,}$ the program is generating a large collection of ordered pairs $(x,g(x))\text{,}$ plotting them in the $x$-$y$ plane, and connecting the points with short line segments.

### Subsection1.2.4Summary

• A function is a process that generates a relationship between two collections of quantities. The function associates each member of a collection of input values with one and only one member of the collection of output values. A function can be described or defined by words, by a table of values, by a graph, or by a formula.

• Functions may be viewed as mathematical objects worthy of study for their own sake and also as models that represent physical phenomena in the world around us. Every function or model has a domain (the set of possible or allowable input values), a codomain (the set of possible output values), and a range (the set of all actual output values). Both the codomain and range depend on the domain. For an abstract function, the domain is usually viewed as the largest reasonable collection of input values; for a function that models a physical phenomenon, the domain is usually determined by the context of possibilities for the input in the phenomenon being considered.

### Exercises1.2.5Exercises

###### 7.

Consider an inverted conical tank (point down) whose top has a radius of $3$ feet and that is $2$ feet deep. The tank is initially empty and then is filled at a constant rate of $0.75$ cubic feet per minute. Let $V=f(t)$ denote the volume of water (in cubic feet) at time $t$ in minutes, and let $h= g(t)$ denote the depth of the water (in feet) at time $t\text{.}$

1. Recall that the volume of a conical tank of radius $r$ and depth $h$ is given by the formula $V = \frac{1}{3} \pi r^2 h\text{.}$ How long will it take for the tank to be completely full and how much water will be in the tank at that time?

2. On the provided axes, sketch possible graphs of both $V = f(t)$ and $h = g(t)\text{,}$ making them as accurate as you can. Label the scale on your axes and points whose coordinates you know for sure; write at least one sentence for each graph to discuss the shape of your graph and why it makes sense in the context of the model.

3. What is the domain of the model $h = g(t)\text{?}$ its range? why?

4. It's possible to show that the formula for the function $g$ is $g(t) = \left( \frac{t}{\pi} \right)^{1/3}\text{.}$ Use a computational device to generate two plots: on the axes at left, the graph of the model $h = g(t) = \left( \frac{t}{\pi} \right)^{1/3}$ on the domain that you decided in (c); on the axes at right, the graph of the abstract function $y = p(x) = \left( \frac{t}{\pi} \right)^{1/3}$ on a wider domain than that of $g\text{.}$ What are the domain and range of $p$ and how do these differ from those of the physical model $g\text{?}$

###### 8.

A person is taking a walk along a straight path. Their velocity, $v$ (in feet per second), which is a function of time $t$ (in seconds), is given by the graph in Figure 1.2.19.

1. What is the person's velocity when $t = 2\text{?}$ when $t = 7\text{?}$

2. Are there any times when the person's velocity is exactly $v = 3$ feet per second? If yes, identify all such times; if not, explain why.

3. Describe the person's behavior on the time interval $4 \le t \le 5\text{.}$

4. On which time interval does the person travel a farther distance: $[1,3]$ or $[6,8]\text{?}$ Why?

###### 9.

A driver of a new car periodically keeps track of the number of gallons of gas remaining in their car's tank, while simultaneously tracking the trip odometer mileage. Their data is recorded in the following table. Note that at mileages where they add fuel to the tank, they record the mileage twice: once before fuel is added, and once afterward.

Use the table to respond to the questions below.

1. Can the amoung of fuel in the gas tank, $G\text{,}$ be viewed as a function of distance traveled, $D\text{?}$ Why or why not?

2. Does the car's fuel economy appear to be constant or does it appear to vary? Why?

3. At what odometer reading did the driver put the most gas in the tank?