1.1: Functions and Their Graphs: Learning Objectives
1.1: Functions and Their Graphs: Learning Objectives
We have studied the general characteristics of functions, so now let’s examine some specific classes of functions. We begin by
reviewing the basic properties of linear and quadratic functions, and then generalize to include higher-degree polynomials. By
combining root functions with polynomials, we can define general algebraic functions and distinguish them from the
transcendental functions we examine later in this chapter. We finish the section with examples of piecewise-defined functions
and take a look at how to sketch the graph of a function that has been shifted, stretched, or reflected from its initial form.
Figure 1.1.1 : These linear functions are increasing or decreasing on (∞, ∞) and one function is a horizontal line.
As suggested by Figure, the graph of any linear function is a line. One of the distinguishing features of a line is its slope. The
slope is the change in y for each unit change in x. The slope measures both the steepness and the direction of a line. If the
slope is positive, the line points upward when moving from left to right. If the slope is negative, the line points downward
when moving from left to right. If the slope is zero, the line is horizontal. To calculate the slope of a line, we need to determine
the ratio of the change in y versus the change in x. To do so, we choose any two points (x , y ) and (x , y ) on the line and
1 1 2 2
y2 − y1
calculate . In Figure 1.1.2, we see this ratio is independent of the points chosen.
x2 − x1
y2 − y1 Δy
m = = (1.1.1)
x2 − x1 Δx
We now examine the relationship between slope and the formula for a linear function. Consider the linear function given by
the formula f (x) = ax + b . As discussed earlier, we know the graph of a linear function is given by a line. We can use our
definition of slope to calculate the slope of this line. As shown, we can determine the slope by calculating
(y − y )/(x − x ) for any points (x , y ) and (x , y ) on the line. Evaluating the function f at x = 0 , we see that (0, b) is
2 1 2 1 1 1 2 2
a point on this line. Evaluating this function at x = 1 , we see that (1, a + b) is also a point on this line. Therefore, the slope of
this line is
(a + b) − b
= a. (1.1.2)
1 −0
We have shown that the coefficient a is the slope of the line. We can conclude that the formula f (x) = ax + b describes a line
with slope a . Furthermore, because this line intersects the y -axis at the point (0, b), we see that the y-intercept for this linear
function is (0, b). We conclude that the formula f (x) = ax + b tells us the slope, a, and the y -intercept, (0, b), for this line.
Since we often use the symbol m to denote the slope of a line, we can write
f (x) = mx + b (1.1.3)
slope-intercept form
the equation
f (x) − y1
m = , (1.1.4)
x − x1
ax + by = c , (1.1.6)
standard form
where a, b are both not zero, to denote the standard form of a line.
Definition: point-slope equation, point-slope equation and the standard form of a line
Consider a line passing through the point (x 1, y1 ) with slope m. The equation
y − y1 = m(x − x1 ) (1.1.7)
y = mx + b (1.1.8)
where a and b are both not zero. This form is more general because it allows for a vertical line, x = k .
Figure 1.1.3 : Finding the equation of a linear function with a graph that is a line between two given points.
1. Find the slope of the line.
2. Find an equation for this linear function in point-slope form.
3. Find an equation for this linear function in slope-intercept form.
Solution
1. The slope of the line is
y2 − y1 5 − (−4) 9 3
m = = =− =− .
x2 − x1 −4 − 11 15 5
3. To find an equation for the linear function in slope-intercept form, solve the equation in part b. for f (x). When we do
this, we get the equation
3 13
f (x) = − x+ .
5 5
Exercise 1.1.1
Consider the line passing through points (−3, 2) and (1, 4).
a. Find the slope of the line.
b. Find an equation of that line in point-slope form.
c. Find an equation of that line in slope-intercept form.
Hint
The slope m = Δy/Δx.
Answer a
m = 1/2 .
Answer b
1
The point-slope form is y − 4 = (x − 1) .
2
Answer c
1 7
The slope-intercept form is y = x+ .
2 2
Example 1.1.2 :
Jessica leaves her house at 5:50 a.m. and goes for a 9-mile run. She returns to her house at 7:08 a.m. Answer the following
questions, assuming Jessica runs at a constant pace.
a. Describe the distance D (in miles) Jessica runs as a linear function of her run time t (in minutes).
b. Sketch a graph of D.
c. Interpret the meaning of the slope.
Solution:
a. At time t = 0 , Jessica is at her house, so D(0) = 0 . At time t = 78 minutes, Jessica has finished running 9 mi, so
D(78) = 9 . The slope of the linear function is
9 −0 3
m = = .
78 − 0 26
The y -intercept is (0, 0), so the equation for this linear function is
3
D(t) = t.
26
b. To graph D, use the fact that the graph passes through the origin and has slope m = 3/26.
Polynomials
A linear function is a special type of a more general class of functions: polynomials. A polynomial function is any function
that can be written in the form
n n−1
f (x) = an x + an−1 x + … + a1 x + a0 (1.1.10)
for some integer n ≥ 0 and constants a , a + n − 1, … , a , where a ≠ 0 . In the case when n = 0 , we allow for a = 0 ; if
n 0 n 0
a = 0 , the function f (x) = 0 is called the zero function. The value n is called the degree of the polynomial; the constant an
0
is called the leading coefficient. A linear function of the form f (x) = mx + b is a polynomial of degree 1 if m ≠ 0 and
degree 0 if m = 0 . A polynomial of degree 0 is also called a constant function. A polynomial function of degree 2 is called a
quadratic function. In particular, a quadratic function has the form
2
f (x) = ax + bx + c, (1.1.11)
Power Functions
Some polynomial functions are power functions. A power function is any function of the form f (x) = ax , where a and b
b
are any real numbers. The exponent in a power function can be any real number, but here we consider the case when the
exponent is a positive integer. (We consider other cases later.) If the exponent is a positive integer, then f (x) = ax is a n
polynomial. If n is even, then f (x) = ax is an even function because f (−x) = a(−x ) = ax if n is even. If n is odd,
n n n
then f (x) = ax is an odd function because f (−x) = a(−x ) = −ax if n is odd (Figure 1.1.3).
n n n
Behavior at Infinity
To determine the behavior of a function f as the inputs approach infinity, we look at the values f (x) as the inputs, x, become
larger. For some functions, the values of f (x) approach a finite number. For example, for the function f (x) = 2 + 1/x , the
values 1/x become closer and closer to zero for all values of x as they get larger and larger. For this function, we say “f (x)
approaches two as x goes to infinity,” and we write f (x) → 2 as x → ∞ . The line y = 2 is a horizontal asymptote for the
function f (x) = 2 + 1/x because the graph of the function gets closer to the line as x gets larger.
For other functions, the values f (x) may not approach a finite number but instead may become larger for all values of x as
they get larger. In that case, we say “f (x) approaches infinity as x approaches infinity,” and we write f (x) → ∞ as x → ∞ .
For example, for the function f (x) = 3x , the outputs f (x) become larger as the inputs x get larger. We can conclude that the
2
function f (x) = 3x approaches infinity as x approaches infinity, and we write 3x → ∞ as x → ∞ . The behavior as
2 2
x → −∞ and the meaning of f (x) → −∞ as x → ∞ or x → −∞ can be defined similarly. We can describe what happens
values f (x) → ∞ as x → ±∞ . If a < 0 , the values f (x) → −∞ as x → ±∞ . Since the graph of a quadratic function is a
parabola, the parabola opens upward if a > 0 .; the parabola opens downward if a < 0 (Figure 1.1.4a).
Now consider a cubic function f (x) = ax + bx + cx + d . If a > 0 , then f (x) → ∞ as x → ∞ and f (x) → −∞ as
3 2
x → −∞ . If a < 0 , then f (x) → −∞ as x → ∞ and f (x) → ∞ as x → −∞ . As we can see from both of these graphs, the
leading term of the polynomial determines the end behavior (Figure 1.1.4b).
In some cases, it is easy to factor the polynomial ax + bx + c to find the zeros. If not, we make use of the quadratic formula.
2
where a ≠ 0 . The solutions of this equation are given by the quadratic formula
− − −−−−−
2
−b ± √ b − 4ac
x = . (1.1.13)
2a
If the discriminant b − 4ac > 0 , Equation 1.1.13 tells us there are two real numbers that satisfy the quadratic equation. If
2
b − 4ac = 0 , this formula tells us there is only one solution, and it is a real number. If b − 4ac < 0 , no real numbers
2 2
In the case of higher-degree polynomials, it may be more complicated to determine where the graph intersects the x-axis. In
some instances, it is possible to find the x-intercepts by factoring the polynomial to find its zeros. In other cases, it is
impossible to calculate the exact values of the x-intercepts. However, as we see later in the text, in cases such as this, we can
use analytical tools to approximate (to a very high degree) where the x-intercepts are located. Here we focus on the graphs of
polynomials for which we can calculate their zeros explicitly.
b. f (x) = x − 3x − 4x
3 2
3.To sketch the graph of f ,use the information from your previous answers and combine it with the fact that
the graph is a parabola opening downward.
Hint
Ue the quadric formula
Answer
–
The zeros are x = 1 ± √3/3 . The parabola opens upward.
Mathematical Models
A large variety of real-world situations can be described using mathematical models. A mathematical model is a method of
simulating real-life situations with mathematical equations. Physicists, engineers, economists, and other researchers develop
models by combining observation with quantitative data to develop equations, functions, graphs, and other mathematical tools
to describe the behavior of various systems accurately. Models are useful because they help predict future outcomes. Examples
of mathematical models include the study of population dynamics, investigations of weather patterns, and predictions of
product sales.
As an example, let’s consider a mathematical model that a company could use to describe its revenue for the sale of a
particular item. The amount of revenue R a company receives for the sale of n items sold at a price of p dollars per item is
described by the equation R = p ⋅ n . The company is interested in how the sales change as the price of the item changes.
Suppose the data in Table 1.1.2 show the number of units a company sells as a function of the price per item.
Table 1.1.2 : Number of Units Sold n (in Thousands) as a Function of Price per Unit p (in Dollars)
p 6 8 10 12 14
In Figure, we see the graph the number of units sold (in thousands) as a function of price (in dollars). We note from the shape
of the graph that the number of units sold is likely a linear function of price per item, and the data can be closely approximated
by the linear function n = −1.04p + 26 for 0 ≤ p ≤ 25 , where n predicts the number of units sold in thousands. Using this
linear function, the revenue (in thousands of dollars) can be estimated by the quadratic function
for 0 ≤ p ≤ 25 In Example 1.1.1, we use this quadratic function to predict the amount of revenue the company receives
depending on the price the company charges per item. Note that we cannot conclude definitively the actual number of units
sold for values of p, for which no data are collected. However, given the other data values and the graph shown, it seems
reasonable that the number of units sold (in thousands) if the price charged is p dollars may be close to the values predicted by
the linear function n = −1.04p + 26.
Figure 1.1.6 : The data collected for the number of items sold as a function of price is roughly linear. We use the linear
function n = −1.04p + 26 to estimate this function.
2
R(p) = p ⋅ (−1.04p + 26) = −1.04 p + 26p
for 0 ≤ p ≤ 25 .
a. Predict the revenue if the company sells the item at a price of p = $5 and p = $17 .
b. Find the zeros of this function and interpret the meaning of the zeros.
c. Sketch a graph of R .
d. Use the graph to determine the value of p that maximizes revenue. Find the maximum revenue.
Solution
a. Evaluating the revenue function at p = 5 and p = 17 , we can conclude that
2
R(5) = −1.04(5 ) + 26(5) = 104, sorevenue = $104, 000;
2
R(17) = −1.04(17 ) + 26(17) = 141.44, sorevenue = $144, 440.
b. The zeros of this function can be found by solving the equation −1.04p + 26p = 0 . When we factor the quadratic
2
expression, we get p(−1.04p + 26) = 0. The solutions to this equation are given by p = 0, 25. For these values of p,
the revenue is zero. When p = $0 , the revenue is zero because the company is giving away its merchandise for free.
When p = $25 ,the revenue is zero because the price is too high, and no one will buy any items.
d. The function is a parabola with zeros at p = 0 and p = 25 , and it is symmetric about the line p = 12.5, so the
maximum revenue occurs at a price of p = $12.50 per item. At that price, the revenue is
2
R(p) = −1.04(12.5 ) + 26(12.5) = $162, 500.
Algebraic Functions
By allowing for quotients and fractional powers in polynomial functions, we create a larger class of functions. An algebraic
function is one that involves addition, subtraction, multiplication, division, rational powers, and roots. Two types of algebraic
functions are rational functions and root functions.
Just as rational numbers are quotients of integers, rational functions are quotients of polynomials. In particular, a rational
function is any function of the form f (x) = p(x)/q(x),where p(x) and q(x) are polynomials. For example,
3x − 1 4
f (x) = and g(x) = 2
5x + 2 x +1
are rational functions. A root function is a power function of the form f (x) = x , where n is a positive integer greater than
1/n
−−−− −
compositions of root functions and rational functions, we can create other algebraic functions. For example, f (x) = √4 − x 2
is an algebraic function.
Solution
1.It is not possible to divide by zero, so the domain is the set of real numbers x such that x ≠ −2/5. To find the range, we
need to find the values y for which there exists a real number x such that
When we multiply both sides of this equation by 5x + 2 , we see that x must satisfy the equation
5xy + 2y = 3x − 1.
If y=3/5, this equation has no solution. On the other hand, as long as y ≠ 3/5,
2y + 1
x =
3 − 5y
satisfies this equation. We can conclude that the range of f is y|y ≠ 3/5.
2. To find the domain of f , we need 4 − x ≥ 0 . When we factor, we write 4 − x = (2 − x)(2 + x) ≥ 0 . This inequality
2 2
holds if and only if both terms are positive or both terms are negative. For both terms to be positive, we need to find x such
that
2 −x ≥ 0 and 2 + x ≥ 0.
These two inequalities reduce to 2 ≥ x and x ≥ −2 . Therefore, the set x| − 2 ≤ x ≤ 2 must be part of the domain. For
both terms to be negative, we need
2 −x ≤ 0 and 2 + x ≥ 0.
These two inequalities also reduce to 2 ≤ x and x ≥ −2 . There are no values of x that satisfy both of these inequalities.
Thus, we can conclude the domain of this function is x| − 2 ≤ x ≤ 2.
−−−−−
If −2 ≤ x ≤ 2 , then 0 ≤ 4 − x 2
≤4 . Therefore, 0 ≤ √4 − x2 ≤2 , and the range of f is y|0 ≤ y ≤ 2.
Exercise 1.1.3
Find the domain and range for the function f (x) = (5x + 2)/(2x − 1).
Hint
The denominator cannot be zero. Solve the equation y = (5x + 2)/(2x − 1) for x to find the range.
Answer
The domain is the set of real numbers x such that x ≠ 1/2. The range is the set {y|y ≠ 5/2}.
Solution
a. You cannot divide by zero, so the domain is the set of values x such that x − 1 ≠ 0 . Therefore, the domain is
2
x|x ≠ ±1.
b. You need to determine the values of x for which the denominator is zero. Since 3x + 4 ≥ 4 for all real numbers x, the
2
Exercise 1.1.4
−−−−−
Find the domain for each of the following functions: f (x) = (5 − 2x)/(x 2
+ 2) and g(x) = √5x − 1 .
Hint
Determine the values of x when the expression in the denominator of f is nonzero, and find the values of x when the
expression inside the radical of g is nonnegative.
Answer
The domain of f is (−∞, ∞) . The domain of g is x|x ≥ 1/5.
Transcendental Functions
Thus far, we have discussed algebraic functions. Some functions, however, cannot be described by basic algebraic operations.
These functions are known as transcendental functions because they are said to “transcend,” or go beyond, algebra. The most
common transcendental functions are trigonometric, exponential, and logarithmic functions. A trigonometric function relates
the ratios of two sides of a right triangle. They are sinx, cosx, tanx, cotx, secx, andcscx. (We discuss trigonometric
functions later in the chapter.) An exponential function is a function of the form f (x) = b , where the base b > 0, b ≠ 1 . A
x
b. f (x) = 2 x
c. f (x) = sin(2x)
Solution
a. Since this function involves basic algebraic operations only, it is an algebraic function.
b. This function cannot be written as a formula that involves only basic algebraic operations, so it is transcendental. (Note
that algebraic functions can only have powers that are rational numbers.)
c. As in part b, this function cannot be written using a formula involving basic algebraic operations only; therefore, this
function is transcendental.
Exercise 1.1.5 :
Is f (x) = x/2 an algebraic or a transcendental function?
Answer
Algebraic
Piecewise-Defined Functions
Sometimes a function is defined by different formulas on different parts of its domain. A function with this property is known
as a piecewise-defined function. The absolute value function is an example of a piecewise-defined function because the
formula changes with the sign of x:
−x x <0
f (x) = { . (1.1.15)
x x ≥0
Other piecewise-defined functions may be represented by completely different formulas, depending on the part of the domain
in which a point falls. To graph a piecewise-defined function, we graph each part of the function in its respective domain, on
the same coordinate system. If the formula for a function is different for x < a and x > a , we need to pay special attention to
what happens at x = a when we graph the function. Sometimes the graph needs to include an open or closed circle to indicate
the value of the function at x = a . We examine this in the next example.
x + 3, x < 1
f (x) = { . (1.1.16)
2
(x − 2 ) , x ≥ 1
Solution
Graph the linear function y = x + 3 on the interval (−∞, 1) and graph the quadratic function y = (x − 2) on the interval
2
[1, ∞). Since the value of the function at x = 1 is given by the formula f (x) = (x − 2) , we see that f (1) = 1 . To
2
indicate this on the graph, we draw a closed circle at the point (1, 1). The value of the function is given by f (x) = x + 2
for all x < 1 , but not at x = 1 . To indicate this on the graph, we draw an open circle at (1, 4).
Solution:
⎧ 10, 0 < x ≤ 1
⎪
⎪
⎪
⎪
⎪ 12, 1 < x ≤ 2
⎪
⎪
⎪
14, 2 < x ≤ 3
C (x) = ⎨ . (1.1.17)
16, 3 < x ≤ 4
⎪
⎪
⎪
⎪
⎪
⎪⋮
⎪
⎩
⎪
30, 10 < x ≤ 18
Hint
The piecewise-defined function is constant on the intervals (0,1],(1,2],….
Answer
⎧ 49, 0 < x ≤ 1
Transformations of Functions
We have seen several cases in which we have added, subtracted, or multiplied constants to form variations of simple functions.
In the previous example, for instance, we subtracted 2 from the argument of the function y = x to get the function
2
f (x) = (x − 2) . This subtraction represents a shift of the function y = x two units to the right. A shift, horizontally or
2 2
vertically, is a type of transformation of a function. Other transformations include horizontal and vertical scalings, and
reflections about the axes.
A vertical shift of a function occurs if we add or subtract the same constant to each output y . For c > 0 , the graph of f (x) + c
is a shift of the graph of f (x) up c units, whereas the graph of f (x) − c is a shift of the graph of f (x) down c units. For
example, the graph of the function f (x) = x + 4 is the graph of y = x shifted up 4 units; the graph of the function
3 3
units. Why does the graph shift left when adding a constant and shift right when subtracting a constant? To answer this
question, let’s look at an example.
Consider the function f (x) = |x + 3| and evaluate this function at x − 3 . Since f (x − 3) = |x| and x − 3 < x , the graph of
f (x) = |x + 3| is the graph of y = |x| shifted left 3 units. Similarly, the graph of f (x) = |x − 3| is the graph of y = |x|
Figure 1.1.10 : (a) For c > 0 , the graph of y = f (x + c) is a horizontal shift left c units of the graph of y = f (x). (b) For
c > 0 , the graph of y = f (x − c) is a horizontal shift right c units of the graph of y = f (x).
A vertical scaling of a graph occurs if we multiply all outputs y of a function by the same positive constant. For c > 0 , the
graph of the function cf (x) is the graph of f (x) scaled vertically by a factor of c . If c > 1 , the values of the outputs for the
function cf (x) are larger than the values of the outputs for the function f (x); therefore, the graph has been stretched vertically.
If 0 < c < 1 , then the outputs of the function cf (x) are smaller, so the graph has been compressed. For example, the graph of
the function f (x) = 3x is the graph of y = x stretched vertically by a factor of 3, whereas the graph of f (x) = x /3 is the
2 2 2
− −− −
compressed horizontally. The graph of y = √x/2 is a horizontal stretch of the graph of y = √x (Figure 1.1.12).
Figure 1.1.12 : (a) If c > 1 , the graph of y = f (cx) is a horizontal compression of the graph of y = f (x). (b) If 0 < c < 1 , the
graph of y = f (cx) is a horizontal stretch of the graph of y = f (x).
We have explored what happens to the graph of a function f when we multiply f by a constant c > 0 to get a new function
cf (x). We have also discussed what happens to the graph of a function f when we multiply the independent variable x by
c > 0 to get a new function f (cx). However, we have not addressed what happens to the graph of the function if the constant
c is negative. If we have a constant c < 0 , we can write c as a positive number multiplied by −1; but, what kind of
transformation do we get when we multiply the function or its argument by −1? When we multiply all the outputs by −1, we
get a reflection about the x-axis. When we multiply all inputs by −1, we get a reflection about the y -axis. For example, the
graph of f (x) = −(x + 1) is the graph of y = (x + 1) reflected about the x-axis. The graph of f (x) = (−x ) + 1 is the
3 3 3
Solution:
1.Starting with the graph of y = |x|, shift 2 units to the left, reflect about the x-axis, and then shift down 3 units.
2. Starting with the graph of y=x√, reflect about the y-axis, stretch the graph vertically by a factor of 3, and move up 1 unit.
Exercise 1.1.7
Describe how the function f (x) = −(x + 1 )
2
−4 can be graphed using the graph of y =x
2
and a sequence of
transformations
Answer
Shift the graph y = x to the left 1 unit, reflect about the x -axis, then shift down 4 units.
2
Key Concepts
The power function f (x) = x is an even function if n is even and n ≠ 0 , and it is an odd function if n is odd.
n
The root function f (x) = x has the domain [0, ∞) if n is even and the domain (−∞, ∞) if n is odd. If n is odd, then
1/n
f (x) = x
1/n
is an odd function.
The domain of the rational function f (x) = p(x)/q(x), where p(x) and q(x) are polynomial functions, is the set of x such
that q(x) ≠ 0 .
Functions that involve the basic operations of addition, subtraction, multiplication, division, and powers are algebraic
functions. All other functions are transcendental. Trigonometric, exponential, and logarithmic functions are examples of
transcendental functions.
A polynomial function f with degree n ≥ 1 satisfies f (x) → ±∞ as x → ±∞ . The sign of the output as x → ∞
depends on the sign of the leading coefficient only and on whether n is even or odd.
Key Equations
Point-slope equation of a line
y − y1 = m(x − x1 )
ax + by = c
Polynomial function
n
x n−1
f (x) = an + an−1 x + ⋯ + a1 x + a0
Glossary
algebraic function
a function involving any combination of only the basic operations of addition, subtraction, multiplication, division, powers,
and roots applied to an input variable x
cubic function
a polynomial of degree 3; that is, a function of the form f (x) = ax 3
+ bx
2
+ cx + d , where a ≠ 0
degree
for a polynomial function, the value of the largest exponent of any term
linear function
a function that can be written in the form f (x) = mx + b
logarithmic function
a function of the form f (x) = log b (x) for some base b > 0, b ≠ 1 such that y = log b (x) if and only if by
=x
mathematical model
A method of simulating real-life situations with mathematical equations
piecewise-defined function
a function that is defined differently on different parts of its domain
point-slope equation
equation of a linear function indicating its slope and a point on the graph of the function
polynomial function
a function of the form f (x) = a nx
n
+ an−1 x
n−1
+ … + a1 x + a0
power function
a function of the form f (x) = x for any positive integer n ≥ 1
n
quadratic function
a polynomial of degree 2; that is, a function of the form f (x) = ax 2
+ bx + c where a ≠ 0
rational function
a function of the form f (x) = p(x)/q(x) , where p(x) and q(x) are polynomials
slope
the change in y for each unit change in x
slope-intercept form
equation of a linear function indicating its slope and y-intercept
transcendental function
a function that cannot be expressed by a combination of basic arithmetic operations
transformation of a function
a shift, scaling, or reflection of a function
Contributors
Gilbert Strang (MIT) and Edwin “Jed” Herman (Harvey Mudd) with many contributing authors. This content by OpenStax
is licensed with a CC-BY-SA-NC 4.0 license. Download for free at http://cnx.org.