Section 1.2 Functions
Motivating Questions
What makes a relationship a function?
What are different ways we can describe a function?
What does it mean when there are letters in a model?
What are different ways that we can combine functions?
What does it mean for a function to be invertible?
How can we describe how a function changes over time?
Functions are a core concept in the study of calculus. In this section we outline common representations of functions and some general properties that we will use throughout future sections.
WarmUp 1.2.1.
Consider the following equations:
\(\displaystyle y = x + 1 \)
\(\displaystyle y^2 = x +1\)
For each equation above, fill in the following tables:
Subsection 1.2.1 Functions and their Representations
Understanding systems is all about being able to describe the relationship between the quantities involved. The population of a species is related to time, the energy an animal exerts when running is related to its speed, and the growth of a plant is related to its exposure to sunlight. Equations, tables, and graphs are all mathematical objects that help us represent relationships between quantities, and it is beneficial to be able to represent a single relationship in multiple different ways.
The systems we are typically interested in are a special type of relationship called a function:
Definition 1.2.1. Function.
Given two related quantities \(x\) and \(y\text{,}\) we say \(y\) is a function of \(x\) if every \(x\) value in the relationship is related to exactly one \(y\) value.
Using this terminology with our previous illustrations, we would say a population is a function of time, energy is a function of speed, and the height of a plant is a function of sunlight exposure. Notice that there is an ordering implied when we talk about function relationships. When we say “\(y\) is a function of \(x\)”, we call \(x\) the input (or independent variable) and \(y\) the output (or dependent variable).
Example 1.2.2.
Looking at WarmUp 1.2.1, one equation represents \(y\) as a function of \(x\) and one does not.

In
\(y = x+1\text{,}\) \(y\) is a function of
\(x\text{.}\) Our reasoning will sound different depending on whether you are looking at the equation, table, or graph, but in all cases our reasoning is based on
Definition 1.2.1:
Equation: For an \(x\) value, the corresponding \(y\) value is obtained by adding one. This gives a unique \(y\) value for every \(x\) value.

Table: Every \(x\) value in the table is listed exactly once. This means each \(x\) value in the table is associated with exactly one \(y\) value.
Warning: When relationships are represented via tables, it is possible you have limited information about the relationship. Unless you are told that the table shows every \(x,y\) pair in the relationship, you should assume there may be other \(x,y\) pairs in the relationship not listed in the table.
Graph: If you pick an \(x\) value and draw a vertical line at that \(x\) value, you will intersect the graph exactly once. This means each \(x\) value corresponds to exactly one \(y\) value. This is known as the vertical line test to determine if the graph of a relationship represents a function relationship.

In
\(y^2 = x+1\text{,}\) \(y\) is
not a function of
\(x\text{.}\) Our reasoning will sound different depending on whether you are looking at the equation, table, or graph, but in all cases our reasoning is based on
Definition 1.2.1:
Equation: For an \(x\) value, the corresponding \(y\) value is obtained by the rule \(\pm \sqrt{x+1}\text{.}\) This means that when \(x=0\text{,}\) for example, the associated \(y\) values are \(\pm 1\text{.}\) This means there is an \(x\) value associated to more than one \(y\) value, and so this relationship is not a function.
Table: There are \(x\) values in the table listed more than once, and associated with different \(y\) values. This means there are \(x\) values in the relationship associated with more than one \(y\) value.
Graph: You can pick an \(x\) value and draw a vertical line at that \(x\) value such that you intersect the graph more than once. This means you have found an \(x\) value which corresponds to more than one \(y\) value. This is known as the vertical line test to determine if the graph of a relationship represents a function relationship.
Activity 1.2.2. Function Relationships.
Practice using
Definition 1.2.1 by answering each question below. Focus on verbalizing your thought process. Your reasoning is more important than your final answer.
In the equation \(y^2 = x+1\text{,}\) is \(x\) a function of \(y\text{?}\)
Is student height a function of student name?

For each graph below, is \(y\) a function of \(x\text{?}\)
The graphs in
Activity 1.2.2 are very similar, but they all represent different relationships. Of those that are functions, they differ in their domain and range, which we define below:
Definition 1.2.3. Domain and Range.
Subsection 1.2.2 Explicit and Recursive Functions
When given a function relationship, there are two main ways we might express that relationship:
Explicit Function: An explicit function describes the output (or dependent variable) explicitly in terms of the input (or independent variable). For example, \(y=x+1\) is an explicit function. However, moving forward we will most often write explicit functions using function notation, which means we write the output (dependent variable) as \(f(x)\) instead of \(y\text{.}\) The function \(y=x+1\) is written using function notation as \(f(x) = x+1\text{.}\) Note that we may name the function whatever we’d like (it does not have to be “\(f\)”). For example, if the output was “population” and the input was “time”, we might call our function \(p(t)\text{.}\)
Recursive Function: A recursive function is typically used when modeling discrete systems, and describes the next output (or dependent variable) in terms of the current output (or dependent variable). For example, \(p_{t+1} = p_t +2 \) is a recursive function. In words, this function says “the next output is equal to the current output plus two.” Notice that this relationship does have an independent variable \(t\text{,}\) it is just not used in describing the relationship like in an explicit function.
Subsection 1.2.3 Variables and Parameters
As illustrated in
Exercise 1.1.4.2, modeling real systems typically involves representing quantities with letters and numbers. It is important that we know how to interpret the letters that we see in function representations.
Definition 1.2.5. Variable and Parameter.
Example 1.2.6. Variables and Parameters.
The function \(h(t)=mt+b\) describes a relationship whose graph looks like a straight line. One benefit of using function notation is that it clearly indicates to us which letters represent variables. The notation “\(h(t)\)” tells us that \(t\) is the input (or independent variable), and \(h(t)\) is the output (or dependent variable). This means that for a fixed line, the input value \(t\) can change, and \(h(t)\) changes along with it.
Once we identify the independent and dependent variable, every other letter represents a parameter. In this example, \(m\) and \(b\) are parameters. This means that for a fixed line, \(m\) and \(b\) are constant values.
One benefit of using parameters is that it allows us to describe many models at once, and we can then analyze how a specific system behaves based on its parameter values.
Subsection 1.2.4 Combinations of Functions
Just as there are ways to combine two numbers to get a new number, we can also combine two functions to get a new function. Given two functions
\(g(x)\) and
\(k(x)\text{,}\) we can define the following combinations:
Definition 1.2.7. Combining Functions.
Sum: \((g+k)(x) = g(x) + k(x)\)
Difference: \((gk)(x) = g(x)  k(x)\)
Product: \((g\cdot k)(x) = g(x) \cdot k(x)\)
Quotient: \(\left(\dfrac{g}{k}\right)(x) = \dfrac{g(x)}{k(x)}\)
Composition: \((g \circ k)(x) = g(k(x))\)
Example 1.2.8. Combining Functions.
Let \(f(x) = x^2 +1\) and \(g(x)=2x  3\text{.}\)
\begin{align*}
(f+g)(x) \amp= f(x) + g(x) \\
\amp= (x^2+1) + (2x3) \\
\amp= x^2 + 2x 2
\end{align*}
^{ 1 }
\begin{align*}
(fg)(x) \amp= f(x)  g(x) \\
\amp= (x^2+1)  (2x3) \\
\amp= x^2  2x +4
\end{align*}
\begin{align*}
(f \cdot g)(x) \amp= f(x) \cdot g(x) \\
\amp= (x^2+1) \cdot (2x3) \\
\amp= 2x^3 3x^2 + 2x 3
\end{align*}
\begin{align*}
\left(\dfrac{f}{g}\right)(x) \amp= \dfrac{f(x) }{ g(x)} \\
\amp= \dfrac{(x^2+1)}{ (2x3)}
\end{align*}
\begin{align*}
(f \circ g)(x) \amp= f(g(x)) \\
\amp= g(x)^2+1 \\
\amp= (2x3)^2 +1\\
\amp= 4x^212x+10
\end{align*}
\begin{align*}
(g \circ f)(x) \amp= g(f(x)) \\
\amp= 2f(x)3 \\
\amp= 2(x^2+1)3\\
\amp= 2x^2 1
\end{align*}
Composition is a way to combine functions that we cannot do with numbers, and allows us to “chain” multiple relationships together.
Activity 1.2.3. Composition.
Let \(m(w)\) be the number of mosquitos entering a house if \(w\) windows are open, and \(b(m)\) be the number of mosquito bites someone gets if there are \(m\) mosquitos in a house.
In this context, which composition makes sense: \(b \circ m\) or \(m \circ b\text{?}\)
In words, what relationship does the composition that makes sense describe?
Subsection 1.2.5 Inverse Functions
We noticed in
Definition 1.2.1 that there is an order implied in a function relationship. Depending on the question you would like to answer, the ordering of the function may or may not be desirable. For example, if you had a model where population was a function of time, and you wanted to know when the population would reach
\(1,000\text{,}\) this ordering would be desirable. However, if the population was decreasing and you wanted to know after how many years the population would become extinct, it may be desirable to have a model expressing time as a function of population. The property of being able to switch input and output and still have a function relationship is what we define below:
Definition 1.2.9. Inverse Function.
Let \(f(x)=y\) be a function of \(x\text{.}\) If \(x\) is also a function of \(y\text{,}\) we say that \(f\) is invertible. We denote \(x\) as a function of \(y\) as \(f^{1}\text{,}\) and call it the inverse function of \(f\).
Example 1.2.10. Inverse Functions as Graphs.
To determine if this function has an inverse function, we must determine if the relationship obtained by swapping input and output is also a function. We can test this directly on the graph of
\(f\) by remembering the vertical line test used in
Example 1.2.2, and thinking about how vertical lines change when we swap input and output.
A vertical line in the \(x,y\) plane is a line whose points have a constant \(x\) value. For example, the points \((1,0), (1,1), (1,2), (1,3)\) all lie on the vertical line \(x=1\text{.}\) When we swap input and output, those points become \((0,1), (1,1), (2,1), (3,1)\) , which all lie on the horizontal line \(y=1\text{.}\) So we can determine if the function \(f\) is invertible by drawing horizontal lines on the graph of \(f\text{.}\) If every horizontal line intersects the graph at most once, then \(f\) is invertible. Otherwise, the function \(f\) is not invertible.
This is known as the horizontal line test for testing invertibility. In this example we see the function is invertible, and we can visualize the graph of \(f^{1}\) by reflecting the graph of \(f\) over the diagonal line \(y=x\text{:}\)
Example 1.2.11. Inverse Functions as Equations.

Let \(f(x)= 3x + 1\text{.}\) If \(f\) has an inverse function, \(x\) would be the output and \(f(x)\) would be the input. As an equation, this means we will try to rewrite the function relationship as “\(x=\)”. For notational purposes, before we start the computation we’ll write the function as \(y=3x+1\) instead of using function notation.
\begin{align*}
y \amp=3x+1\\
y1 \amp= 3x\\
\dfrac{y1}{3}\amp= x\\
x \amp= \dfrac{y1}{3}
\end{align*}
This shows us that \(f\) is invertible, and also what the rule is for the inverse function. Instead of using \(x\) as the output variable, we switch back to the standard notation and write \(f^{1}\) as a function of \(x\text{:}\) \(f(x)=3x+1\) and \(f^{1}(x) = \dfrac{x1}{3}\text{.}\)

Let \(g(x) = x^2 + 1\text{.}\) We’ll try the same process as above to determine if there is an inverse function, \(g^{1}\text{.}\)
\begin{align*}
y \amp= x^2+1\\
y 1 \amp= x^2\\
\pm \sqrt{y 1} \amp= x\\
x \amp= \pm \sqrt{y 1}
\end{align*}
Note that \(x\) is not a function of \(y\text{,}\) and so our original function \(g(x)\) is not invertible.
Invertible functions and their inverse functions have a special property under composition. As illustrated in
Example 1.2.8, the order of composition matters. That is, for two functions
\(f(x)\) and
\(g(x)\text{,}\) the compositions
\(f(g(x))\) and
\(g(f(x))\) are, in general, different. However, composition with an invertible function and its inverse function is an example of a special case when the order does not matter. Even more, the composition will always result in the same function:
Fact 1.2.12.
For an invertible function \(f(x)\) and its inverse function \(f^{1}(x)\text{,}\)
\begin{equation*}
f(f^{1}(x)) = f^{1}(f(x)) = x\text{.}
\end{equation*}
Subsection 1.2.6 Average Rate of Change
We mentioned in
Section 1.1 that a main goal in mathematical modeling is to study how systems
change. Given a function, one way we can describe how the function changes over time is by computing an
average rate of change. This is also a foundational concept that will be used to extend our tools for describing change in
Chapter 2.
Definition 1.2.13. Average Rate of Change.
Given a function \(f(x)\) and \(x\) values \(a\) and \(b\text{,}\) the average rate of change between \(a\) and \(b\) is the number
\begin{equation*}
AROC_{[a,b]}= \dfrac{f(b)  f(a)}{ba}\text{.}
\end{equation*}
Being able to compute an average rate of change is necessary, but understanding what an average rate of change represents graphically will be even more important for our future developments in describing how functions change. Use the interactive provided to complete the statements below before viewing the answers.
The value of
\(AROC_{[3,2]}\) is
Answer.
The line connecting the points
\((3,f(3))\) and
\((2,f(2))\) (
increases/
decreases/
stays the same).
Answer.
The value of
\(AROC_{[1,1]}\) is
Answer.
The line connecting the points
\((1,f(1))\) and
\((1,f(1))\) (
increases/
decreases/
stays the same).
Answer.
The value of
\(AROC_{[2,2]}\) is
Answer.
The line connecting the points
\((2,f(2))\) and
\((2,f(2))\) (
increases/
decreases/
stays the same).
Answer.
Graphically, the value of
\(AROC_{[a,b]}\) describes
Answer.whether the line connecting the two points \((a,f(a))\) and \((b,f(b))\) increases, decreases, or stays the same. Further, the larger the average rate of change is in absolute value, the steeper the line will increase or decrease. The line connecting the two points is called the secant line.
Activity 1.2.4. AROC.
Sketch the graph of a function \(f\) such that \(AROC_{[0,2]} \gt 0\) and \(f\) is increasing on the interval \((0,2)\text{.}\)
Sketch the graph of a function \(f\) such that \(AROC_{[0,2]} \gt 0\) and \(f\) increases and decreases on the interval \((0,2)\text{.}\)
Sketch the graph of a function \(f\) such that \(AROC_{[0,2]} \gt 0\) and \(f\) is decreasing on the interval \((0,2)\text{.}\)
Subsection 1.2.7 Summary
Question 1.2.14.
What makes a relationship a function? Answer.A quantity \(y\) is a function of a quantity \(x\) when each \(x\) value is associated with exactly one \(y\) value.
Question 1.2.15.
What are different ways we can describe a function? Answer.We can describe function relationships using equations, tables, and graphs. Function relationships can also be described explicitly or recursively.
Question 1.2.16.
What does it mean when there are letters in a model? Answer.A letter in function may represent a variable (a changing quantity) or a parameter ( a constant quantity). Function notation is useful for helping us recognize the variables in a model.
Question 1.2.17.
What are different ways that we can combine functions? Answer.We can combine functions like numbers using addition, subtraction, multiplication, and division. We can also put functions inside of other functions using composition.
Question 1.2.18.
What does it mean for a function to be invertible? Answer.A function is invertible if swapping domain and range results in another function relationship.
Question 1.2.19.
How can we describe how a function changes over time? Answer.We can describe how a function changes over a specific time interval by computing the average rate of change over that time interval. Graphically, this number tells us the steepness of the secant line connecting the two end points, and if the secant line is increasing or decreasing.
Exercises 1.2.8 Exercises
1.
Give an example of a relationship in which \(y\) is not a function of \(x\text{.}\) Represent your example as an equation, table, and graph.2.
Give an example of a relationship in which \(y\) is a function of \(x\) but is not an invertible function. Represent your example as an equation, table, and graph.3.
Consider the equation \(h= kt^2 m^2t + cm\text{.}\)
Write the equation using function notation if \(t\) is the independent variable and \(h\) is the dependent variable. What are the parameters?
Write the equation using function notation if \(m\) is the independent variable and \(h\) is the dependent variable. What are the parameters?
4.
Sketch the graph of a single function \(q(x)\) that meets all of the following criteria:

The domain of \(q(x)\) is \([1,0) \cup (0,4]\text{.}\)
Note: This notation means the domain is between \(1\) and \(4\text{,}\) not including \(0\text{.}\)
The range of \(q(x)\) is \([0,3]\text{.}\)
\(q(1) > q(4)\text{.}\)
Is your function from the previous part invertible? Explain why or why not.
5.
The functions \(g(x)\) and \(h(x)\) are defined on the domain \((\infty, \infty)\text{.}\) Compute the following values given that
\(g(1)=2\) and \(h(1)=10\text{,}\) and
\(g(x)\) and \(h(x)\) are inverse functions of each other (i.e., \(g(x)=h^{1}(x)\) and \(h(x) = g^{1}(x)\)).
\(\displaystyle (g+h)(1)\)
\(\displaystyle (gh)(1)\)
\(\displaystyle (g \cdot h)(1)\)
\(\displaystyle (h \circ g)(10)\)
\(\displaystyle (g \circ h)(5)\)
6.
Let \(\sigma(x) = x^2 +1\text{.}\) Calculate each average rate of change below. Then use the graph provided to illustrate what each calculation represents graphically.
\(\displaystyle AROC_{[0,3]}\)
\(\displaystyle AROC_{[2,2]}\)
\(\displaystyle AROC_{[3,1]}\)
Note the importance in using parentheses!