We will primarily work with functions defined in one of two ways. One way is graphically. That is, we are given a curve that satisfies the definition of a function (i.e., the vertical line test). Such a function does not need to have any explicit formula. The second way is through functions defined by equations. Linear functions provide the simplest example of both of these representations for a function.
A linear function is characterized geometrically by a graph that is a straight line. This corresponds to an algebraic attribute that the slope, or rate of change, between any two points on the line is a constant. Understanding the equation of a line is a standard element of every algebra course, and a review of those principles are summarized in Appendix A.2.1. This section emphasizes how to apply these ideas to the notion of a function and in applications.
Subsection2.4.2Linear Functions
The most elementary class of functions that we will consider involves linear functions. A linear function is the function whose graph is a non-vertical line in the plane. The independent variable corresponds to the horizontal axis of the plane; the dependent variable corresponds to the vertical axis. By definition, a line is straight. Consequently, for every non-vertical line, we can define a number called the slope, which is traditionally assigned the symbol \(m\).
As reviewed in the Appendix (see Definition A.2.4), the slope of a line joining two points \((x_1,y_1)\) and \((x_2,y_2)\) is a rate (or ratio) of change defined by the equation \begin{equation*}m = \frac{\Delta y}{\Delta x} = \frac{y_2-y_1}{x_2-x_1}.\end{equation*} For a line, the slope does not depend on which points are chosen.
The change in \(y\), written \(\Delta y = y_2-y_1\), is called the rise; if it is negative, then the second point is lower than the first. The change in \(x\), written \(\Delta x = x_2-x_1\), is called the run; if it is negative, then the second point is to the left of the first. We say the line is increasing if \(\Delta y\) and \(\Delta x\) have the same sign, or in other words, \(m \gt 0\). We say the line is decreasing if \(\Delta y\) and \(\Delta x\) have different signs, or in other words, \(m \lt 0\). If \(m=0\), the line is horizontal and the function is called a constant function.
We can write down the equation of a line immediately if we know the slope and a point on the line. Most students were taught to focus on the slope-intercept equation for a line, which requires knowing the slope \(m\) and the \(y\)-intercept \((0,b)\), given by \begin{equation}y=mx+b.\label{eqn-slope-intercept-line}\tag{2.4.1}\end{equation} However, it is more common to know a different point than the intercept \((a,b)\) where \(a \ne 0\). In that case, you should really learn to use the point-slope equation of a line, given by \begin{equation}y=m(x-a)+b.\label{eqn-point-slope-line}\tag{2.4.2}\end{equation}
Example2.4.1
Find the linear functions described by each of the statements.
\(f : u \mapsto x\) is linear with slope \(m=2\) and \(f(1)=3\).
The mapping notation shows that \(u\) is the input and \(x\) is the output. So this function is based on the \((u,x)\)-plane. The slope \(m=2\) needs to be interpreted in this context, the change in output (rise) over the change in input (run): \begin{equation*} m = \frac{\Delta x}{\Delta u} = 2. \end{equation*} The given data \(f(1)=3\) means an input \(u=1\) maps to an output \(x=3\), or we know a point \((u,x) = (1,3)\). The slope equation can then be interpreted as saying: \begin{equation*} \frac{\Delta x}{\Delta u} = \frac{x-3}{u-1} = 2 \quad \Leftrightarrow \quad x-3 = 2(u-1). \end{equation*} The point–slope form is found by adding 3: \begin{equation*}f(u) = x = 2(u-1) + 3. \end{equation*} Observe how the equation is of the form \begin{equation*}\hbox{output} = \hbox{slope}(\hbox{input}-\hbox{given input}) + \hbox{given output}.\end{equation*}
The radius \(r\) of a circle (measured in meters) is a linear function of the time \(t\) (measured in seconds) with the following data provided.
\(t\) (seconds)
\(r\) (meters)
0
3
5
2
We introduce a function \(g\) with mapping notation \(g : t \mapsto r\) to emphasize that the time is the independent variable and the radius is the dependent variable. The slope is not provided, so we must compute it directly, remembering to compute the change in output over the change in input: \begin{equation*} m = \frac{\Delta r}{\Delta t} = \frac{2-3}{5-0} = \frac{-1}{5}. \end{equation*} Be careful that the order of differences is the same. In this case, we used the second data point minus the first data point. This negative slope means that the radius is a decreasing function of time (i.e., the circle is getting smaller).
Once we have the slope, we can use either data point to find the equation. If we use \((t,r) = (0,3)\), we have the slope–intercept form \begin{equation*} g(t) = r = -\frac{1}{5} t + 3. \end{equation*} If we use \((t,r) = (5,2)\), we have the point–slope form \begin{equation*} g(t) = r = -\frac{1}{5}(t-5) + 2. \end{equation*} These equations are really the same. (You can verify it by multiplying out the second equation and comparing.)
A spring hanging vertically stretches depending on on much mass is attached at the end. The resting height of the mass is recorded for several values. If the resting height is a linear function of the mass, find this function.
index
mass (g)
height (cm)
1
20
82
2
50
70
3
100
50
We start by defining variables. Let \(m\) be the mass attached to the spring and let \(h\) be the resting height of the mass. To say the height is a linear function of the mass means there is a linear function \(f : m \mapsto h\). The index entry in the table is a label to order the data (i.e., first, second or third).
Because we are using \(m\) as a variable, we should not use that as our slope parameter. Instead, we'll just use the rise over run representation. The data support the hypothesis of a linear function if the slope is the same for any two points. We verify this directly. \begin{align*}
\frac{\Delta h}{\Delta m} &= \frac{h_2-h_1}{m_2-m_1} = \frac{70-82}{50-20} \\
&= \frac{-12}{30} = -\frac{2}{5} \\
\frac{\Delta h}{\Delta m} &= \frac{h_3-h_1}{m_3-m_1} = \frac{50-82}{100-20} \\
&= \frac{-32}{80} = -\frac{2}{5} \\
\frac{\Delta h}{\Delta m} &= \frac{h_3-h_2}{m_3-m_2} = \frac{50-70}{100-50} \\
&= \frac{-20}{50} = -\frac{2}{5}
\end{align*} Once we have the slope, we could use any single data point to find the equation. If we use \((m,h) = (20,82)\), we have the point–slope form \begin{equation*} f(m) = h = -\frac{2}{5}(m-20)+82. \end{equation*} It is not necessary to rewrite the equation in slope–intercept form.
Subsection2.4.3Rate of Change
The slope that appears in the equation of a line is a rate of change. The idea of rate of change is one of the most fundamental ideas in calculus. Rate really means ratio, so a rate of change for a function gives the ratio of changes in the output of function to a corresponding change in the input of the function. For a line, the rate of change between any two points is always the same. For other functions (not linear), the rate of change depends on which points are chosen. We call this slope the average rate of change, and it requires have two different points.
Definition2.4.2Average Rate of Change
Given any function \(f\) and two distinct points \(a \ne b\) in the domain of \(f\), we define the average rate of change of \(f\) from \(a\) to \(b\) as \begin{equation} \left. \frac{\Delta f}{\Delta x} \right|_{a,b} = \frac{f(b)-f(a)}{b-a}.\label{equation-average-rate-of-change}\tag{2.4.3}\end{equation}
One of the primary goals of calculus is to define an instantaneous rate of change for a function at a single point. When two variables are related by a function \(y=f(x)\), the instantaneous rate of change of \(y\) with respect to \(x\) is represented by a new variable called the derivative and a name \(\frac{dy}{dx}\). Although this looks like a fraction, the fraction itself is meant to be one symbol. The tangent line of \(f\) at \(x=a\) is the line passing through the point \((a, f(a))\) with a slope given by \(m=\frac{dy}{dx}\).
We will learn later how to find the value of the derivative when the function \(f\) is defined algebraically. For now, we will use technology to give us the value of the instantaneous rate of change.
Example2.4.3
We wish to find the instantaneous rate of change for \(y=x^2\) at a point \(x=3\) using technology and use it to graph the corresponding tangent line. First, steps are given for evaluating this using a TI-83/84 graphing calculator. This is followed by a call to WolframAlpha that computes the same derivative.
In the prompt box, just type “derivative of x^2 at x=3”. The interpretation shows \(\frac{\partial x^2}{\partial x}\) where \(x=3\). The curly d (\(\partial\)) is used because WolframAlpha is capable of finding derivatives involving multiple variables and this symbol is used for that context. (Partial derivatives are formally taught in Calculus 3.) The result shows that the value is 6.
Now that technology has told us that \(\frac{dy}{dx}=6\) when \(x=3\), we can find the equation of the tangent line. Using the original equation, we find \(y=3^2=9\) when \(x=3\). Consequently, because we know a point \((3,9)\) and a slope \(\frac{dy}{dx}=6\) for the tangent line, the equation of the line must be \begin{equation*}y=6(x-3)+9.\end{equation*} A graph of the original function and the tangent line together are shown below.
An alternative way to think about a function graphically is to imagine the function as a mapping between two parallel number lines. The top number line will represent the domain (input) and the bottom number line will represent the co-domain (output). By mapping, we mean that the function associates every point in the domain with the corresponding point in the co-domain, illustrated by an arrow.
Consider the linear function \(f(x)=-2x+5\) and the two values \(f(1)=3\) and \(f(2)=1\). As a mapping between number lines, we will have the points \(x=1\) and \(x=2\) (inputs) identified on the top number line (domain); the bottom number line (co-domain) will have the corresponding points \(y=3\) and \(y=1\) (outputs). The change in input \(\Delta x = 2-1=1\) is represented by the change vector in the domain. The corresponding change in output \(\Delta y = 1-3 = -2\) is also represented by a change vector, which is pointing left because of the negative sign.
The slope or rate of change is the ratio of the change in output to the change in input. Using the mapping representation, the rate of change represents an amplification factor (stretching) of the change in input to the corresponding change in output. A negative rate of change means that the direction is also reversed. If we considered \(\Delta x = 2\), the slope \(m=-2\) would mean that \(\Delta y = -4\), illustrated above with the dashed line.
An important interpretation of rate of change is as a sensitivity in the relationship between variables. As discussed in Section 2.1.3, measurements of physical quantities are always associated with uncertainty, particularly in measurement error. Suppose that in an experiment, two quantities \(P\) and \(Q\) are related by a function \(f : P \mapsto Q\). If we can set the value of \(P\) experimentally, then this relationship will lead to a corresponding assignment for the value of \(Q\) as well. However, uncertainty in the value of \(P\) will lead to uncertainty in the value of \(Q\). This sensitivity is measured by the rate of change (derivative) \(\frac{dQ}{dP}\).
Example2.4.4
From thermodynamics (often introduced in chemistry), the temperature \(T\) (kelvins) and pressure \(P\) (pascals) of for a fixed number of moles \(n\) of an ideal gas in a constant volume \(V\) (cubic meters) are related through the ideal gas law \begin{equation*}PV = nRT\end{equation*} where \(R\) is the universal gas constant \(R\approx 8.314\). For a particular experiment involving 1 mole of a gas in 1 cubic meter, this reduces to \begin{equation*}P = 8.314 T\end{equation*} which is a linear equation with rate of change \(\frac{dP}{dT}=8.314\).
Suppose that you can control the temperature but with a margin of error of \(\pm0.05\) kelvins. What is the resulting margin of error in the pressure?
The sensitivity (slope) gives the ratio of the margins of error. An error in temperature \(\Delta T = 0.05\) kelvins results in an error in pressure \begin{equation*}\frac{\Delta P}{\Delta T} = 8.314 \quad \Rightarrow \quad \Delta P = 8.314 \Delta T = 8.314(0.05) = 0.4157.\end{equation*} So the margin of error in the pressure given the uncertainty in temperature is \(\Delta P = \pm 0.4157\) pascals.