Notes 1.2 Function Graphs
Notes 1.2 Function Graphs
2 Graphs of functions
1.2.1 Using ordered pairs to draw functions
If we describe our function using an equation y = f (x) with inputs x and outputs y, then we may view
the inputs, x, as elements of a horizontal line in the plane and record outputs y on a vertical line. The
graph of a function in the Cartesian plane is the set of values (x, f (x)).
Combining functions with the geometry of the plane gives us a nice visual way to see and understand
a function. This idea was first introduced in the 17th century by (among others) Rene Descartes and so
the plane in which we draw our graph is called the Cartesian plane.
We graph the function f with x values increasing along a horizontal axis and y values increasing along
a vertical axis. It is customary to draw the x-axis along the horizontal line where y = 0 and draw the
y-axis along the vertical line where x = 0.
Most graphs of functions y = f (x) can be sketched by creating a table of values (x, y) and then
making some reasonable assumptions as to how these points should be connected. For example, consider
the function f (x) = x2 . We can create a table of values. (Notice that we input some values which are not
integers!)
x f (x)
−2 4
−1 1
−0.5 0.25
0 0
0.5 0.25
1 1
2 4
We can then plot the points (−2, 4), (−1, 1), (−0.5, 0.25), ... on the Cartesian plane and use these points
to guide us on filling in the rest of the curve. Of course modern software (and graphing calculators) can
do this for us, plotting hundreds of points and connecting the dots....
17
Some worked examples.
For each function, create a table of values (with at least 5 points, where at least one of which does
not have integer value for x) and then graph the function.
1. f (x) = x3 − x
2. f (x) = |x|.
√
3. f (x) = 3 x
Solutions. (The graphs in this section were generated by the author using Sage.)
1. Here is a table of a few values for the function f (x) = x3 − x
x f (x) = x3 − x
−2 −6
−1 0
−0.5 −0.625
0 0
1 0
2 6
If we connect the dots, we should get something like this:
x f (x) = |x|
−2 2
−1 1
−0.5 0.5
0 0
1 1
2 2
18
√
3
3. Here is a table of values for the function f (x) = x
√
3
x f (x) = x
−8 −2
−1 −1
− 18 − 12
0 0
1 1
8 2
19
Examples.
Find the intercepts of the following functions
1. f (x) = x2 − 2x − 3.
(x + 1)(x2 − 6x + 8)
2. g(x) = .
x+2
1 2x − 3
3. h(x) = + + x − 5.
x + 2 2x + 1
Solutions.
1. f (x) = x2 − 2x − 3 has y-intercept (0, −3) since f (0) = −3. To find the x-intercepts of the function,
we need to solve the equation 0 = x2 − 2x − 3. We may factor x2 − 2x − 3 = (x − 3)(x + 1) and
solve 0 = (x − 3)(x + 1). The product of two expressions is zero if and only if one of the expressions
is zero so either 0 = x − 3 or 0 = x + 1. Thus the x-intercepts occur where x = 3 or x = −1. So the
x-intercepts are (−1, 0) and (3, 0).
2. The function g(x) is a “rational function”, that is, a ratio of two polynomials. We should take a
moment and consider the denominator of this function. The denominator is zero when x = −2 and
so the function g(x) is undefined at x = −2. x = −2 cannot then give us any point on the graph,
much less an intercept.
(x + 1)(x2 − 6x + 8) (1)(8)
To find the y-intercept of g(x) = , merely plug in 0: g(0) = = 4 so the
x+2 2
y-intercept is (0, 4).
(x + 1)(x2 − 6x + 8)
To find the x-intercept of g(x) = , we set the function equal to zero and solve:
x+2
(x + 1)(x2 − 6x + 8)
0= .
x+2
Multiply both sides by the numerator x + 2
0 = (x + 1)(x2 − 6x + 8)
0 = (x + 1)(x − 2)(x − 4)
The expression on the right is zero whenever any of its terms are zero, so the x-intercepts are
(−1, 0), (2, 0) and (4, 0).
1 2x−3
3. The y intercepts of the function h(x) = x+2 + 2x+1 + x − 5 occur where x = 0 so
1 0−3 1 15
y= + +0−5= −3−5=− .
0+2 0+1 2 2
15
Thus the y-intercept is (0, − ).
2
The x-intercept is where y = 0 so we examine the equation
1 2x − 3
0= + +x−5
x + 2 2x + 1
and solve for x.
20
Multiply both sides by the denominators x + 2 and 2x + 1 to clear denominators and we have
so
0 = 2x3 − 3x2 − 20x − 15.
A graphing calculator helps us find that x = −1 is one of the solutions to this equation; there are
two more solutions which are a bit more complicated, involving the quadratic formula; these are
1 √
(5 ± 3 5). We will look more at this problem later.
4
Example.
Consider the function f (x) = x4 − 8x2 with graph given below:
Where is this function increasing? Where is it decreasing? What are the low points on the curve (local
minimums)? What are the high points on the curve (local maximums)?
From the picture we can see that the function drops to the point (−2, −16), rises to the origin (0, 0),
drops again to the point (2, −16) and then rises after that. So the function is decreasing for x-values in
the region (−∞, −2) ∪ (0, 2), and rising in the region (−2, 0) ∪ (2, ∞).
The local minimums are (−2, −16) and (2, −16); a local maximum occurs at the point (0, 0).
21
1.2.4 The vertical line test definition of a function
In the definition of function, we require that a function have a unique output for each input. The
geometric version of this requirement is the “vertical line test”. The points in the plane corresponding to
a fixed x-value form a vertical line. For example, the line x = 3 is a vertical line consisting of all points
of the form (3, y) for any value of y.
If our graph is the graph of a function then each vertical line will touch the graph in exactly one
point, at the y value y = f (x). So to see if our graph is the graph of a function, draw vertical lines and
see if these lines intersect the graph exactly once.
In the image below (figure 7), a vertical line (in yellow) corresponding to a particular x-value hits the
curve at exactly one point. This should be true for all the elements in the domain of the function.
22
Figure 8. Cost of mailing a letter (December 2012.)
The leftmost column describes an input variable, the weight of the letter in ounces. The second
column gives the cost if the first-class mail is an ordinary letter. One should interpret this information
as follows:
If the letter is more than 1 ounce in weight, but no more than 2 ounces, the cost is 65 cents.
If the letter is more than 2 ounces in weight, but no more than 3 ounces, the cost is 85 cents.
If the letter is more than 3 ounces in weight, but no more than 3.5 ounces, the cost is $1.05. (105
cents)
If the letter is more than 3.5 ounces in weight (but less than 4 ounces), then one should use a large
envelope and the cost is $1.50.
(Although the USPS chart described mail costs for mail up to 13 ounces, for convenience, I have assumed
that we are not mailing anything heavier than 4 ounces.)
We can describe this “cost of first-class” function as follows. Here the input x,is weight in ounces, and
45, if 0 ≤ x ≤ 1
65, if 1 < x ≤ 2
the output f (x) is cost in cents. The cost of a letter of weight x is then f (x) = 85, if 2 < x ≤ 3
105, if 3 < x ≤ 3.5
150, if 3.5 < x ≤ 4
Below is the graph of this function. Note the use of open circles to describe points not part of the
function graph and closed dark circles to describe points that are on the function graph, at the end of a
curve.
23
Figure 9. Graph of the piecewise function defined by postal rates.
Solution.
Here, if x ≤ 0 then the function obeys the rule f (x) = 2x + 1. Thus f (−2) = 2(−2) + 1 = −3 and
f (0) = 2(0) + 1 = 1. But if x > 0 then f (x) = x2 + 1 and so f (2) = 22 + 1 = 5. The graph of the function
appears in figure 10. Notice how the two “pieces” are glued together; we can see the line y = 2x + 1 in
the region where x ≤ 0 and the parabola y = x2 + 1 in the region to the right of the y-axis.
24
Example 2. Another example: graph the function
2x + 2, if x ≤ 1
f (x) =
4, if x > 1
Solution. Since x = 0 and x = 1 both fall in the region where x ≤ 1, we have that f (0) = 2(0) + 2 = 2
and f (1) = 2(1) + 2 = 4. Since x = 2 and x = 100 both fall in the region where x > 1 then f (2) = 4 and
f (100) = 4.
Here is the graph:
Solution. f (−1) = (−1)2 = 1 since x = −1 ≤ 0. But f (−0.5) = 0 since 0 ≤ 0.5 < 1 Similarly
f (1.5) = 1, f (2.5) = 2 and f (3.5) = 3.5. The graph is:
25
Note in Figure 12 the use of closed dark circle to indicate that the point (such as (1, 1)) is on the graph
and the use of light, open circles to indicate that a point (such as (1, 0) or (2, 1)) is not on the graph.)
In the free textbook, Precalculus, An Investigation of Functions, by Lippman and Rassmussen (Edition
1.3, available at www.opentextbookstore.com) this material is covered in section 1.3.
In the textbook by Ratti & McWaters, Precalculus, A Unit Circle Approach, 2nd ed., c. 2014,
here at Amazon.com this material appears in section 1.4. In the textbook by Stewart, Precalculus,
Mathematics for Calculus, 6th ed., c. 2012, (here at Amazon.com) this material appears in sections 2.2
and 2.3. (In July 2013 the first textbook was $147 at Amazon.com and the second textbook was $136 at
Amazon.com They are even more expensive in campus bookstores.)
There are lots of online resources for learning about graph of elementary functions. Here are some I
recommend.
Homework.
As class homework, please complete Worksheet 1.2, Functions and their graphs, available
through the class webpage.
26