Expressing Functions

Learning Outcomes

  • Use functional notation to evaluate a function
  • Determine the domain and range of a function
  • Draw the graph of a function
  • Find the zeros of a function
  • Recognize a function from a table of values

Functions

Given two sets AA and BB, a set with elements that are ordered pairs (x,y)(x,y), where xx is an element of AA and yy is an element of BB, is a relation from AA to BB. A relation from AA to BB 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.

Definition


function ff 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 ff, where the domain is the set of all real numbers and the rule is to square the input. Then, the input x=3x=3 is assigned to the output 32=932=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 ff with domain DD, we often use xx to denote the input and yy to denote the output associated with xx. When doing so, we refer to xx as the independent variable and yy as the dependent variable, because it depends on xx. Using function notation, we write y=f(x)y=f(x), and we read this equation as “yy equals ff of xx.” For the squaring function described earlier, we write f(x)=x2f(x)=x2.

The concept of a function can be visualized using Figures 1, 2, and 3.

An image with three items. The first item is text that reads “Input, x”. An arrow points from the first item to the second item, which is a box with the label “function”. An arrow points from the second item to the third item, which is text that reads “Output, f(x)”.

Figure 1. A function can be visualized as an input/output device.

 

An image with two items. The first item is a bubble labeled domain. Within the bubble are the numbers 1, 2, 3, and 4. An arrow with the label “f” points from the first item to the second item, which is a bubble labeled “range”. Within this bubble are the numbers 2, 4, and 6. An arrow points from the 1 in the domain bubble to the 6 in the range bubble. An arrow points from the 1 in the domain bubble to the 6 in the range bubble. An arrow points from the 2 in the domain bubble to the 4 in the range bubble. An arrow points from the 3 in the domain bubble to the 2 in the range bubble. An arrow points from the 4 in the domain bubble to the 2 in the range bubble.

Figure 2. A function maps every element in the domain to exactly one element in the range. Although each input can be sent to only one output, two different inputs can be sent to the same output.

 

An image of a graph. The y axis runs from 0 to 3 and has the label “dependent variable, y = f(x)”. The x axis runs from 0 to 5 and has the label “independent variable, x”. There are three points on the graph. The first point is at (1, 2) and has the label “(1, f(1)) = (1, 2)”. The second point is at (2, 1) and has the label “(2, f(2))=(2,1)”. The third point is at (3, 2) and has the label “(3, f(3)) = (3,2)”. There is text along the y axis that reads “range = {1, 2}” and text along the x axis that reads “domain = {1,2,3}”.

Figure 3. In this case, a graph of a function ff has a domain of {1,2,3}{1,2,3} and a range of {1,2}{1,2}. The independent variable is xx and the dependent variable is yy.

We can also visualize a function by plotting points (x,y)(x,y) in the coordinate plane where y=f(x)y=f(x). The graph of a function is the set of all these points. For example, consider the function ff, where the domain is the set D={1,2,3}D={1,2,3} and the rule is f(x)=3xf(x)=3x. In Figure 4, we plot a graph of this function.

An image of a graph. The y axis runs from 0 to 5. The x axis runs from 0 to 5. There are three points on the graph at (1, 2), (2, 1), and (3, 0). There is text along the y axis that reads “range = {0,1,2}” and text along the x axis that reads “domain = {1,2,3}”.

Figure 4. Here we see a graph of the function ff with domain {1,2,3}{1,2,3} and rule f(x)=3xf(x)=3x. The graph consists of the points (x,f(x))(x,f(x)) for all xx in the domain.

Every function has a domain. However, sometimes a function is described by an equation, as in f(x)=x2f(x)=x2, with no specific domain given. In this case, the domain is taken to be the set of all real numbers xx for which f(x)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)=x2f(x)=x2 to be the set of all real numbers. On the other hand, the square root function f(x)=xf(x)=x only gives a real output if xx is nonnegative. Therefore, the domain of the function f(x)=xf(x)=x is the set of nonnegative real numbers, sometimes called the natural domain.

For the functions f(x)=x2f(x)=x2 and f(x)=xf(x)=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|xhas some property}{x|xhas some property}

 

We read this as the set of real numbers xx such that xx 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

[latex]\{x|1

A set such as this, which contains all numbers greater than aa and less than bb, can also be denoted using the interval notation (a,b)(a,b). Therefore,

[latex](1,5)=\{x|1

 

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|1x5}[1,5]={x|1x5}

 

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|0x}{x|0x}

 

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|0x}[0,)={x|0x}

 

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|x0}(,0]={x|x0}

 

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

(,)={x|xis any real number}(,)={x|xis any real number}

 

refers to the set of all real numbers.

Try It

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 ff with a domain that is the set of all real numbers such that f(x)=3x+1f(x)=3x+1 for x2x2 and f(x)=x2f(x)=x2 for x<2x<2. We denote this function by writing

f(x)={3x+1,x2x2,x<2f(x)={3x+1,x2x2,x<2

 

When evaluating this function for an input xx, the equation to use depends on whether x2x2 or x<2x<2. For example, since 5>25>2, we use the fact that f(x)=3x+1f(x)=3x+1 for x2x2 and see that f(5)=3(5)+1=16f(5)=3(5)+1=16. On the other hand, for x=1x=1, we use the fact that f(x)=x2f(x)=x2 for x<2x<2 and see that f(1)=1f(1)=1.

Example: Evaluating Functions

For the function f(x)=3x2+2x1f(x)=3x2+2x1, evaluate

  1. f(2)f(2)
  2. f(2)f(2)
  3. f(a+h)f(a+h)

Watch the following video to see the worked solution to Example: Evaluating Functions

Try It

For f(x)=x23x+5f(x)=x23x+5, evaluate f(1)f(1) and f(a+h)f(a+h).

 

 

Example: Finding Domain and Range

For each of the following functions, determine the i. domain and ii. range.

  1. f(x)=(x4)2+5f(x)=(x4)2+5
  2. f(x)=3x+21f(x)=3x+21
  3. f(x)=3x2f(x)=3x2

Try It

Find the domain and range for f(x)=42x+5f(x)=42x+5.

 

 

Try It

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 xx be the time after midnight, measured in hours, and the output variable yy be the temperature xx hours after midnight, measured in degrees Fahrenheit. We record our data in Table 1.

Table 1. Temperature as a Function of Time of Day
Hours after Midnight Temperature (°F)(°F) Hours after Midnight Temperature (°F)(°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.

Try It

Graphs

Given a function ff 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 1 can give us a better idea of their fluctuation throughout the day. Figure 5 shows the plot of the temperature function.

An image of a graph. The y axis runs from 0 to 90 and has the label “Temperature in Fahrenheit”. The x axis runs from 0 to 24 and has the label “hours after midnight”. There are 24 points on the graph, one at each increment of 1 on the x-axis. The first point is at (0, 58) and the function decreases until x = 4, where the point is (4, 52) and is the minimum value of the function. After x=4, the function increases until x = 13, where the point is (13, 85) and is the maximum of the function along with the point (14, 85). After x = 14, the function decreases until the last point on the graph, which is (23, 58).

Figure 5. The graph of the data from Table 1 shows temperature as a function of time.

From the points plotted on the graph in Figure 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 6.

An image of a graph. The y axis runs from 0 to 90 and has the label “Temperature in Fahrenheit”. The x axis runs from 0 to 24 and has the label “hours after midnight”. There are 24 points on the graph, one at each increment of 1 on the x-axis. The first point is at (0, 58) and the function decreases until x = 4, where the point is (4, 52) and is the minimum value of the function. After x=4, the function increases until x = 13, where the point is (13, 85) and is the maximum of the function along with the point (14, 85). After x = 14, the function decreases until the last point on the graph, which is (23, 58). A line connects all the points on the graph.

Figure 6. Connecting the dots in Figure 5 shows the general pattern of the data.

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 rr is given by the formula A(r)=πr2A(r)=πr2. When an object is thrown upward from the ground with an initial velocity v0v0 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)=16t2+v0ts(t)=16t2+v0t. When PP dollars are invested in an account at an annual interest rate rr compounded continuously, the amount of money after tt years is given by the formula A(t)=PertA(t)=Pert. 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 ff, the graph of ff is the set of points (x,f(x))(x,f(x)), where xx is in the domain of ff and f(x)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 ff 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 xx where f(x)=0f(x)=0 are called the zeros of a function. For example, the zeros of f(x)=x24f(x)=x24 are x=±2x=±2. The zeros determine where the graph of ff intersects the xx-axis, which gives us more information about the shape of the graph of the function. The graph of a function may never intersect the xx-axis, or it may intersect multiple (or even infinitely many) times.

Another point of interest is the yy-intercept, if it exists. The yy-intercept is given by (0,f(0))(0,f(0)).

Recall: Given a function f(x)f(x), find the y– and x-intercepts

  1. Evaluate f(0)f(0) to find the y-intercept.
  2. Solve the equation f(x)=0f(x)=0 to find the x-intercepts.

Since a function has exactly one output for each input, the graph of a function can have, at most, one yy-intercept. If x=0x=0 is in the domain of a function ff, then ff has exactly one yy-intercept. If x=0x=0 is not in the domain of ff, then ff has no yy-intercept. Similarly, for any real number cc, if cc is in the domain of ff, there is exactly one output f(c)f(c), and the line x=cx=c intersects the graph of ff exactly once. On the other hand, if cc is not in the domain of ff, f(c)f(c) is not defined and the line x=cx=c does not intersect the graph of ff. This property is summarized in the vertical line test.

Vertical Line Test


Given a function ff, every vertical line that may be drawn intersects the graph of ff no more than once. If any vertical line intersects a set of points more than once, the set of points does not represent a function.

We can use this test to determine whether a set of plotted points represents the graph of a function (Figure 7).

An image of two graphs. The first graph is labeled “a” and is of the function “y = f(x)”. Three vertical lines run through 3 points on the function, each vertical line only passing through the function once. The second graph is labeled “b” and is of the relation “y not equal to f(x)”. Two vertical lines run through the relation, one line intercepting the relation at 3 points and the other line intercepting the relation at 3 different points.

Figure 7. (a) The set of plotted points represents the graph of a function because every vertical line intersects the set of points, at most, once. (b) The set of plotted points does not represent the graph of a function because some vertical lines intersect the set of points more than once.

Example: Finding Zeros and yy-Intercepts of a Function

Consider the function f(x)=4x+2f(x)=4x+2.

  1. Find all zeros of ff.
  2. Find the yy-intercept (if any).
  3. Sketch a graph of ff.

Watch the following video to see the worked solution to Example: Finding Zeros and yy-Intercepts of a Function

Example: Using Zeros and yy-Intercepts to Sketch a Graph

Consider the function f(x)=x+3+1f(x)=x+3+1.

  1. Find all zeros of ff.
  2. Find the yy-intercept (if any).
  3. Sketch a graph of ff.

Try It

Find the zeros of f(x)=x35x2+6xf(x)=x35x2+6x.

 

 

Example: Finding the Height of a Free-Falling Object

If a ball is dropped from a height of 100 ft, its height ss at time tt is given by the function s(t)=16t2+100s(t)=16t2+100, where ss is measured in feet and tt is measured in seconds. The domain is restricted to the interval [0,c][0,c], where t=0t=0 is the time when the ball is dropped and t=ct=c  is the time when the ball hits the ground.

  1. Create a table showing the height s(t)s(t) when t=0,0.5,1,1.5,2,t=0,0.5,1,1.5,2, and 2.52.5. Using the data from the table, determine the domain for this function. That is, find the time cc when the ball hits the ground.
  2. Sketch a graph of ss.

Try It

Note that for this function and the function f(x)=4x+2f(x)=4x+2 graphed in Figure 8, the values of f(x)f(x) are getting smaller as xx is getting larger. A function with this property is said to be decreasing. On the other hand, for the function f(x)=x+3+1f(x)=x+3+1 graphed in Figure 9, the values of f(x)f(x) are getting larger as the values of xx are getting larger. A function with this property is said to be increasing. It is important to note, however, that a function can be increasing on some interval or intervals and decreasing over a different interval or intervals. For example, using our temperature function in Figure 5, we can see that the function is decreasing on the interval (0,4)(0,4), increasing on the interval (4,14)(4,14), and then decreasing on the interval (14,23)(14,23). We make the idea of a function increasing or decreasing over a particular interval more precise in the next definition.

Definition


We say that a function ff is increasing on the interval II if for all x1,x2Ix1,x2I,

[latex]f(x_1)\le f(x_2) \, \text{when} \, x_1

 

We say ff is strictly increasing on the interval II if for all x1,x2Ix1,x2I,

[latex]f(x_1)

 

We say that a function ff is decreasing on the interval II if for all x1,x2Ix1,x2I,

[latex]f(x_1)\ge f(x_2) \, \text{ if } \, x_1

 

We say that a function ff is strictly decreasing on the interval II if for all x1,x2Ix1,x2I,

[latex]f(x_1)>f(x_2) \, \text{ if } \, x_1

For example, the function f(x)=3xf(x)=3x is increasing on the interval (,)(,) because 3x1<3x23x1<3x2 whenever [latex]x_1-(x_2)^3[/latex] whenever [latex]x_1

An image of two graphs. The first graph is labeled “a” and is of the function “f(x) = 3x”, which is an increasing straight line that passes through the origin. The second graph is labeled “b” and is of the function “f(x) = -x cubed”, which is curved function that decreases until the function hits the origin where it becomes level, then decreases again after the origin.

Figure 11. (a) The function f(x)=3xf(x)=3x is increasing on the interval (,). (b) The function f(x)=x3 is decreasing on the interval (,).