7.1: Introduction to Modeling
- Page ID
- 93900
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Students will be able to:
- Express the relationship between the input and output variable for a function
- Use function notation to evaluate a function for a given input
- Represent a function as a table, graph, or formula
in order to apply mathematical modeling to solve real-world applications.
In this section, we will introduce the basics for creating mathematical models which enable us to make predictions and understand the relationships that exist between two different factors called variables. We will first discuss functions which give us the tools needed to describe relationships between two variables, and we will then introduce key concepts such as correlation which enable us to create our models.
Functions
Given two sets \(A\) and \(B\) a set with elements that are ordered pairs \((x,y)\) where \(x\) is an element of \(A\) and \(y\) is an element of \(B,\) is a relation from \(A\) to \(B\). A relation from \(A\) to \(B\) defines a relationship between those two sets. A function is a special type of relation in which each element of the first set is related to exactly one element of the second set. The element of the first set is called the input; the element of the second set is called the output. Functions are used all the time in mathematics to describe relationships between two sets. For any function, when we know the input, the output is determined, so we say that the output is a function of the input. For example, the area of a square is determined by its side length, so we say that the area (the output) is a function of its side length (the input). The velocity of a ball thrown in the air can be described as a function of the amount of time the ball is in the air. The cost of mailing a package is a function of the weight of the package. Since functions have so many uses, it is important to have precise definitions and terminology to study them.
A function \(f\) consists of a set of inputs, a set of outputs, and a rule for assigning each input to exactly one output. The set of inputs is called the domain of the function. The set of outputs is called the range of the function.
For example, consider the function \(f\), where the domain is the set of all real numbers and the rule is to square the input. Then, the input \(x=3\) is assigned to the output \(3^2=9\).
Since every nonnegative real number has a real-value square root, every nonnegative number is an element of the range of this function. Since there is no real number with a square that is negative, the negative real numbers are not elements of the range. We conclude that the range is the set of nonnegative real numbers.
For a general function \(f\) with domain \(D\), we often use \(x\) to denote the input and \(y\) to denote the output associated with \(x\). When doing so, we refer to \(x\) as the independent variable and \(y\) as the dependent variable, because it depends on \(x\). Using function notation, we write \(y=f(x)\), and we read this equation as “\(y\) equals \(f\) of \(x.”\) For the squaring function described earlier, we write \(f(x)=x^2\).
The concept of a function can be visualized using Figures \(\PageIndex{1}\) - \(\PageIndex{3}\).
We can also visualize a function by plotting points \((x,y)\) in the coordinate plane where \(y=f(x)\). The graph of a function is the set of all these points. For example, consider the function \(f\), where the domain is the set \(D=\{1,2,3\}\) and the rule is \(f(x)=3−x\). In Figure \(\PageIndex{4}\), we plot a graph of this function.
Every function has a domain. However, sometimes a function is described by an equation, as in \(f(x)=x^2\), with no specific domain given. In this case, the domain is taken to be the set of all real numbers \(x\) for which \(f(x)\) is a real number. For example, since any real number can be squared, if no other domain is specified, we consider the domain of \(f(x)=x^2\) to be the set of all real numbers. On the other hand, the square root function \(f(x)=\sqrt{x}\) only gives a real output if \(x\) is nonnegative. Therefore, the domain of the function \(f(x)=\sqrt{x}\) is the set of nonnegative real numbers, sometimes called the natural domain.
For the functions \(f(x)=x^2\) and \(f(x)=\sqrt{x}\), the domains are sets with an infinite number of elements. Clearly we cannot list all these elements. When describing a set with an infinite number of elements, it is often helpful to use set-builder or interval notation. When using set-builder notation to describe a subset of all real numbers, denoted \(R\), we write
\[\{x\,|\,\textit{x has some property}\}.\]
We read this as the set of real numbers \(x\) such that \(x\) has some property. For example, if we were interested in the set of real numbers that are greater than one but less than five, we could denote this set using set-builder notation by writing
\[\{x\,|\,1<x<5\}.\]
A set such as this, which contains all numbers greater than \(a\) and less than \(b,\) can also be denoted using the interval notation \((a,b)\). Therefore,
\[(1,5)=\{x\,|\,1<x<5\}.\]
The numbers \(1\) and \(5\) are called the endpoints of this set. If we want to consider the set that includes the endpoints, we would denote this set by writing
\[[1,5]=\{x\,|\,1<x<5\}.\]
We can use similar notation if we want to include one of the endpoints, but not the other. To denote the set of nonnegative real numbers, we would use the set-builder notation
\[\{x\,|\,x\ge 0\}.\]
The smallest number in this set is zero, but this set does not have a largest number. Using interval notation, we would use the symbol \(∞,\) which refers to positive infinity, and we would write the set as
\[[0,∞)=\{x\,|\,x\ge 0\}.\]
It is important to note that \(∞\) is not a real number. It is used symbolically here to indicate that this set includes all real numbers greater than or equal to zero. Similarly, if we wanted to describe the set of all nonpositive numbers, we could write
\[(−∞,0]=\{x\,|\,x≤0\}.\]
Here, the notation \(−∞\) refers to negative infinity, and it indicates that we are including all numbers less than or equal to zero, no matter how small. The set
\[(−∞,∞)=\{\textit{x} \,|\, \textit{x is any real number}\}\]
refers to the set of all real numbers.Some functions are defined using different equations for different parts of their domain. These types of functions are known as piecewise-defined functions. For example, suppose we want to define a function \(f\) with a domain that is the set of all real numbers such that \(f(x)=3x+1\) for \(x≥2\) and \(f(x)=x^2\) for\( x<2\).We denote this function by writing
\[f(x)=\begin{cases} 3x+1, & \text{if } x≥2 \\ x^2, & \text{if } x<2 \end{cases}\]
When evaluating this function for an input \(x\),the equation to use depends on whether \(x≥2\) or \(x<2\). For example, since \(5>2\), we use the fact that \(f(x)=3x+1\) for \(x≥2\) and see that \(f(5)=3(5)+1=16\). On the other hand, for \(x=−1\), we use the fact that \(f(x)=x^2\) for \(x<2\) and see that \(f(−1)=1\).
For the function \(f(x)=3x^2+2x−1\), evaluate:
- \(f(−2)\)
- \(f(3)\)
Solution
Substitute the given value for \(x\) in the formula for \(f(x)\).
- \(f(−2)=3(−2)^2+2(−2)−1=12−4−1=7\)
- \(f(3)=3(3)^2+2(3)−1=18+6−1=23\)
For \(f(x)=x^2−3x+5\), evaluate \(f(1)\) and \(f(-1)\).
- Hint
-
Substitute \(1\) and \(-3\) for \(x\) in the formula for \(f(x)\).
- Answer
-
\(f(1)=(1)^2-3(1)+5=1-3+5=3\) and \(f(-1)=(-1)^2-3(-1)+5=1+3+5=9\)
Representing Functions
Typically, a function is represented using one or more of the following tools:
- A table
- A graph
- A formula
We can identify a function in each form, but we can also use them together. For instance, we can plot on a graph the values from a table or create a table from a formula.
Tables
Functions described using a table of values arise frequently in real-world applications. Consider the following simple example. We can describe temperature on a given day as a function of time of day. Suppose we record the temperature every hour for a 24-hour period starting at midnight. We let our input variable \(x\) be the time after midnight, measured in hours, and the output variable \(y\) be the temperature \(x\) hours after midnight, measured in degrees Fahrenheit. We record our data in Table \(\PageIndex{1}\).
Hour After Midnight | Temperature(°F) | Hour After Midnight | Temperature(°F) |
---|---|---|---|
0 | 58 | 12 | 84 |
1 | 54 | 13 | 85 |
2 | 53 | 14 | 85 |
3 | 52 | 15 | 83 |
4 | 52 | 16 | 82 |
5 | 55 | 17 | 80 |
6 | 60 | 18 | 77 |
7 | 64 | 19 | 74 |
8 | 72 | 20 | 69 |
9 | 75 | 21 | 65 |
10 | 78 | 22 | 60 |
11 | 80 | 23 | 58 |
We can see from the table that temperature is a function of time, and the temperature decreases, then increases, and then decreases again. However, we cannot get a clear picture of the behavior of the function without graphing it.
Graphs
Given a function \(f\) described by a table, we can provide a visual picture of the function in the form of a graph. Graphing the temperatures listed in Table \(\PageIndex{1}\) can give us a better idea of their fluctuation throughout the day. Figure \(\PageIndex{5}\) shows the plot of the temperature function.
From the points plotted on the graph in Figure \(\PageIndex{5}\), we can visualize the general shape of the graph. It is often useful to connect the dots in the graph, which represent the data from the table. In this example, although we cannot make any definitive conclusion regarding what the temperature was at any time for which the temperature was not recorded, given the number of data points collected and the pattern in these points, it is reasonable to suspect that the temperatures at other times followed a similar pattern, as we can see in Figure \(\PageIndex{6}\).
Algebraic Formulas
Sometimes we are not given the values of a function in table form, rather we are given the values in an explicit formula. Formulas arise in many applications. For example, the area of a circle of radius \(r\) is given by the formula \(A(r)=πr^2\). When an object is thrown upward from the ground with an initial velocity \(v_{0}\) ft/s, its height above the ground from the time it is thrown until it hits the ground is given by the formula \(s(t)=−16t^2+v_{0}t\). When \(P\) dollars are invested in an account at an annual interest rate \(r\) compounded continuously, the amount of money after \(t\) years is given by the formula \(A(t)=Pe^{rt}\). Algebraic formulas are important tools to calculate function values. Often we also represent these functions visually in graph form.
Given an algebraic formula for a function \(f\), the graph of \(f\) is the set of points \((x,f(x))\), where \(x\) is in the domain of \(f\) and \(f(x)\) is in the range. To graph a function given by a formula, it is helpful to begin by using the formula to create a table of inputs and outputs. If the domain of \(f\) consists of an infinite number of values, we cannot list all of them, but because listing some of the inputs and outputs can be very useful, it is often a good way to begin.
When creating a table of inputs and outputs, we typically check to determine whether zero is an output. Those values of \(x\) where \(f(x)=0\) are called the zeros of a function. For example, the zeros of \(f(x)=x^2−4\) are \(x=±2\). The zeros determine where the graph of \(f\) intersects the \(x\)-axis, which gives us more information about the shape of the graph of the function. The graph of a function may never intersect the \(x\)-axis, or it may intersect multiple (or even infinitely many) times.
Another point of interest is the \(y\) -intercept, if it exists. The \(y\)-intercept is given by \((0,f(0))\).
Since a function has exactly one output for each input, the graph of a function can have, at most, one \(y\)-intercept. If \(x=0\) is in the domain of a function \(f,\) then \(f\) has exactly one \(y\)-intercept. If \(x=0\) is not in the domain of \(f,\) then \(f\) has no \(y\)-intercept. Similarly, for any real number \(c,\) if \(c\) is in the domain of \(f\), there is exactly one output \(f(c),\) and the line \(x=c\) intersects the graph of \(f\) exactly once. On the other hand, if \(c\) is not in the domain of \(f,\) \(f(c)\) is not defined and the line \(x=c\) does not intersect the graph of \(f\).
If a ball is dropped from a height of 100 ft, its height s at time \(t\) is given by the function \(s(t)=−16t^2+100\), where s is measured in feet and \(t\) is measured in seconds. The domain is restricted to the interval \([0,c],\) where \(t=0\) is the time when the ball is dropped and \(t=c\) is the time when the ball hits the ground.
- Create a table showing the height s(t) when \(t=0,\, 0.5,\, 1,\, 1.5,\, 2,\) and \(2.5\). Using the data from the table, determine the domain for this function. That is, find the time \(c\) when the ball hits the ground.
- Sketch a graph of \(s\).
Solution
\(t\) | 0 | 0.5 | 1 | 1.5 | 2 | 2.5 |
\(s(t)\) | 100 | 96 | 84 | 64 | 36 | 0 |
Since the ball hits the ground when \(t=2.5\), the domain of this function is the interval \([0,2.5]\).
2.