54 Chapter 2. Functions and Graphs
a>0
Figure 2.12(a)
a<0
Figure 2.12(b)
RemarkBesides using the completing square method to find the vertex, we can also usedifferentiation (see Chapter 5).
(4) Polynomial Functions A function f given by
f(x)=anxn+an−1xn−1+· · ·+a1x+a0,
wherea0,a1, . . . ,anare constants withan,0, is called apolynomial functionofdegree n.
Ifn=0, f is a constant function.
Ifn=1, f is a linear function.
Ifn=2, f is a quadratic function.
Example Let f(x)= x3−3x2+x−1.
The graph of f is shown in Figure 2.13.
In Chapter 5, we will discuss how to sketch graphs of poly- nomial functions.
-1 1 2
-6 -4 -2 2
Figure 2.13
The domain of every polynomial function f isR.
There are three possibilities for the range.
(a) If the degree is odd, then ran (f)=R.
(b) If the degree is even and positive, then (i) ran (f)=[k,∞) ifan>0;
(ii) ran (f)=(−∞,k] ifan <0,
wherekis they-coordinate of the lowest point for case (i), or the highest point for case (ii), of the graph.
RemarkThe constant function 0 is also considered to be a polynomial function. However, its degree is assigned to be−∞(for convenience of a rule for degree of product of polynomials).
(5) Rational Functions Arational functionis a function f in the form f(x)= p(x)
q(x), where pandqare polynomial functions.
2.4. Graphs of Functions 55
Example Let f(x)= 1 x. The domain of f isR\ {0}.
The range of f is alsoR\ {0}.
The graph consists of two curves, one in the first quadrant and the other in the third quadrant. It is symmetric about the origin. This is because f(−x)= 1
−x =−f(x).
1 2
-1 -2
1 2
-1
-2
Figure 2.14
Example Let f(x)= 1 x2. The domain of f isR\ {0}.
The range of f is (0,∞).
The graph consists of two curves, one in the first quadrant and the other in the second quadrant. It is symmetric about they-axis. This is because f(−x)= 1
(−x)2 = 1
x2 = f(x). -2 -1 1 2
1 2 3
Figure 2.15
Example Let f(x)= 2x−1 x2+3. The domain of f isR.
The graph of f is shown in Figure 2.16. Note that when x is very large in magnitude, f(x) is very small. This is because the degree of the nu- merator is smaller than that of the denominator.
See Chapter 3 for more details.
-5 5 10
-0.5 0.5
Figure 2.16
The range of f can be found using the method described in Section 2.2. Alternatively, it can be found if thex-coordinates of the highest and lowest point are known. See Chapter 5 for more details.
(6) Square-root Function
Recall that for each positive real number x, there are two real numbers whose square is x. The two numbers are called thesquare rootsofx. Theprinciple square rootofx, denoted by√
x, is defined to be the positive square root ofx.
Example The square roots of 9 are 3 and−3. The principle square root of 9 is 3, that is,√ 9=3.
By convention, the principle square root of 0 is defined to be 0, that is,√ 0=0.
The operation of taking principle square root can be considered as a function. Each nonnegative real numberxcan be used as an input and its corresponding output is√
x.
Definition Theprinciple-square-root function, denoted by sqrt, is the function given by sqrt (x)=√
x.
56 Chapter 2. Functions and Graphs
Remark
• Usually we use a single letter to denote a function. For functions that will be used very often, we create special notations for them. Usually, we use a few letters, taken from the names of the functions, to represent the functions.
• For simplicity, the principle-square-root function is also called thesquare-root function.
• Sometimes, the square-root function is also denoted by √
x. Thus the notation √
x can have two different meanings:
♦ a function (the square-root function)
♦ a real number (the image ofxunder the square-root function)
• Sometimes, the square-root function is also denoted by√
· (a dot inside√ ). Thus,√
·(x) = √ x.
The position of the dot indicates that the variable is put there.
The domain of the square-root function is [0,∞).
The range is also [0,∞).
The following steps describe how to draw the graph ofy=√ x.
(i) Square both sides to gety2= x.
The graph pfy2 = xis a parabola opening to the right. It can be obtained from the parabola given byy = x2 by rotating 90◦ in the clockwise direction. Note that in the two equations, the role ofx andyare interchanged.
(ii) The graph ofy=√
xis the upper half of the parabola obtained in (i).
The lower part is not included because√
xis always non- negative. Squaring introduces extra points.
In the equationy = √
x, it is implied implicitly that x ≥ 0 andy≥0.
The graph of the equation is the following subset ofR2: Graph = {(x,y)∈R2:y=√
x, x≥0, y≥0}
= {(x,y)∈R2:y2= x, x≥0, y≥0}
1 2 3 4
1 2 3 4
-1
-2
Figure 2.17
Example For each of the following equations, sketch its graph.
(a) y=√ x−2 (b) y=√
x−2 (c) y=√
2−x Solution
(a) The graph is a half of a parabola. It is obtained by moving the graph ofy=√
xtwo units down.
1 2 3 4 5 6 7 8
-2 -1 1 2
Figure 2.18
2.4. Graphs of Functions 57
Remark Letabe a positive constant.
• The graph ofy= f(x)+acan be obtained from that ofy= f(x) by moving itaunits up.
• The graph ofy= f(x)−acan be obtained from that ofy= f(x) by moving itaunits down.
(b) Note that √
x−2 is defined for x ≥ 2 only. The graph ofy = √
x−2 is obtained by moving that of y=√
xtwo units to the right.
1 2 3 4 5 6
1 2
Figure 2.19
Remark Letabe a positive constant.
• The graph of y = f(x−a) can be obtained from that ofy = f(x) by moving itaunits to the right.
• The graph ofy= f(x+a) can be obtained from that ofy= f(x) by moving itaunits to the left.
(c) Note that √
2−x is defined for x ≤ 2 only. The graph of y = √
2−x and that of y = √
x−2 are symmetric with respect to the vertical linex=2.
2 4 6 8
-2 -4
1 2
Figure 2.20
In general, two subsets of the plane are said to besymmetric about a line ` if for each point P belonging to any one of the two sets, there is a pointQbelonging to the other set such that either P=Qbelongs to`or
• the line segmentPQis perpendicular to`;
• PandQare equidistant from`.
(7) Exponential Functions Letbbe a positive real number different from 1. The exponential function
with base b, denoted by expb, is the function given by expb(x)=bx. The domain of every exponential function isR.
The range of every exponential function is (0,∞).
They-intercept of the graph of every exponential function is (0,1). This is becauseb0 =1.
Remark
• Because there are infinitely many exponential functions, one for each base, the notation expb, where bis written as a subscript, indicates that the base is b. Thus, for example, exp2 and exp3 are the exponential functions with base 2 and 3 respectively.
• Sometimes, for convenience, we also writebxto denote the exponential function with baseb.
58 Chapter 2. Functions and Graphs
Example Consider exp2, the exponential function with base 2. It is the function fromRtoRgiven by exp2(x)=2x. The graph of exp2 goes up (as x increases) and the rate that the graph goes up increases asxincreases.
-3 -2 -1 1 2 3
2 4 6 8
Figure 2.21
Example Consider exp1
3, the exponential function with base
1
3. It is the function fromRtoRgiven by exp1
3(x)= 1
3
x . The graph of exp1
3 goes down (asxincreases).
-3 -2 -1 1 2 3
5 10 15 20 25
Figure 2.22
In Chapter 8, exponential functions will be discussed in more detail.
(8) Logarithmic Function Recall that for every positive real numberx, there is a unique real numbery such that 10y= x. Different positivexgive different values ofy. In this way, we obtain a function defined for all positive real numbers. This function, denoted by log, is called thecommon logarithmic function.
For each positive real number x, log(x) is defined to be the unique real number such that 10log(x) = x.
That is, log(x)=yif and only ify=10x. For simplicity, log(x) is also written as logx.
RemarkSometimes, for convenience, we also write logxto denote the common logarithmic function. So the notation logxhas two different meanings. It can be a function (the log function) or a number (the image ofxunder the log function).
The domain of log is (0,∞).
The range isR.
The graph of log is shown in Figure 2.23. As xincreases, the graph goes up. The rate that the graph goes up de- creases as x increases. Note that the x-intercept is (1,0).
This is because log 1=0.
20 40 60 80 100
0.5 1 1.5
2
Figure 2.23
Remark In Chapter 8, logarithmic functions with bases other than 10 will be considered. Relation be- tween exponential functions and logarithmic functions will be discussed.
(9) Trigonometric Functions Similar to the common logarithmic function, we use three letters sin, cos and tan to denote the sine, cosine and tangent functions respectively. Recall that sin(x) is defined to be they-coordinate of the point on the unit circlex2+y2 = 1 corresponding to the angle with measure x radians. More details on trigonometric functions can be found in Chapter 7.
2.4. Graphs of Functions 59
For simplicity, we write sin(x)=sinxetc.
• The sine function: sin
The domain of the sine function isR.
The range is [−1,1].
The graph of the sine function has a waveform as shown in Figure 2.24 (the symbolpstands for the numberπ). The graph is symmetric about the origin. This is because sin(−x) =−sinx. The graph crosses thex-axis infinitely often, at points withx-coordinates 0,±π,±2π, . . .
2p 4p
-2p -4p
-1 1
Figure 2.24
The sine function is periodic with period 2π, that is, sin(x+2π)=sinxfor allx∈R.
Definition If f is a function such that f(x+ p) = f(x) for allx ∈ dom (f), where p is a positive constant, then we say that f isperiodic with period p.
• The cosine function: cos
The domain of the cosine function isR.
The range is [−1,1].
The graph of the cosine function has a waveform. It is symmetric about they-axis. This is be- cause cos(−x) = cosx. The graph crosses the x-axis infinitely often, at points with x-coordinates
±π
2,±3π
2, . . .
2p 4p
-2p -4p
-1 1
Figure 2.25
The cosine function is periodic with period 2π, that is, cos(x+2π)=cosxfor allx∈R.
RemarkThe graph of the cosine function can be obtained by shifting the graph of the sine function
π
2units to the left. This is because cosx=sin x+π
2
for allx∈R.
60 Chapter 2. Functions and Graphs
(a) The tangent function: tan Since tanx= sinx
cosx, tanxis undefined atx=±π
2,±3π
2, . . . The domain of the tangent function isR\ {±π2,±3π2, . . .}.
The range isR.
The tangent function is periodic with periodπ, that is, tan(x+π)=tanxfor allxbelonging to the domain.
- p 2
p 2
Figure 2.26
(10) Absolute Value Function The absolute value function, denoted by| · |, is the function from RtoR given by
|x|=
x ifx>0, 0 ifx=0,
−x ifx<0.
For each real numbera, the number|a|is called theabsolute valueofa.
In defining|x|, the domainRis divided into three disjoint subsets, namely (0,∞),{0}and (−∞,0).
(a) Ifx∈(0,∞) which meansx>0, then|x|is defined to bex.
(b) Ifx∈ {0}which meansx=0, then|x|is defined to be 0.
(c) Ifx∈(−∞,0) which meansx<0, then|x|is defined to be−x.
Functions defined in this way are calledpiecewise-defined functions.
Remark Unlike most functions, the image of a real number x under the absolute value function | · |is denoted by|x|. That is,|x|=| · |(x). Readers may compare this with the square-root function√
·, where
√·(x)=√ x.
Example (a) |2|=2
(b) |−3|=−(−3)=3 (c) −|2|=−2 (d) −|−3|=−3
(e) |5−(−7)|=|12|=12
(f) |3−12| − |7+6|=|−9| − |13|=|9−13|=|−4|=4 Remark
(a) |a|is always nonnegative.
(b) |a|=|−a|.
(c) |a|is the distance from the pointato 0 on the real number line.
2.4. Graphs of Functions 61
(d) |a−b|is the distance betweenaandb.
(e) √
a2=|a|.
The domain of| · |isR.
The range is [0,∞).
The graph of the absolute value function aV-shape figure.
It is the union of the following three subsets ofR2.
• {(x,y) ∈ R2 : x > 0 andy = x} which is the half- line in the first quadrant with slope equal to 1, starting from the origin but not including the origin.
• {(x,y) ∈ R2 : x = 0 andy = 0} which is the point {0,0}, that is, the origin.
• {(x,y)∈R2 :x<0 andy=−x}which is the half-line in the second quadrant with slope equal to−1, starting from the origin but not including the origin.
1 2
-1 -2
-2 -1 1 2
Figure 2.27
RemarkWe may also define the absolute value function in the following ways:
(i) |x|=
x ifx≥0,
−x ifx<0.
(ii) |x|=
x ifx>0,
−x ifx≤0.
(iii) |x|=
x ifx≥0,
−x ifx≤0.
In (i) or (ii), the domainRis divided into two disjoint subsets.
In (iii), although Ris the union of (−∞,0] and [0,∞), the two subsets are not disjoint; the number 0 belongs to both. However, this will not cause any problem to define|0|because if we use the first rule, we get|0|=0 and if we use the second rule, we get|0|=−0=0. We say that|0|iswell-definedbecause its value does not depend on the choice of the rule.
Example For each of the following equations, sketch its graph.
(a) y=1− |x|
(b) y=|x−1|
Solution
(a) By the definition of the absolute value function, the equation is
y=
1−x ifx>0, 1−0 ifx=0, 1−(−x) ifx<0.
The graph is shown in Figure 2.28. It consists of the half-liney =1−x,x> 0, the point (0,1) and the half-liney=1+x,x<0.
62 Chapter 2. Functions and Graphs
RemarkAlternatively, the graph can be obtained as follows:
• The graph ofy = −|x| and that of y = |x| are symmetric about the x-axis. So the graph of y=−|x|is an inverted V-shape figure.
• Move the inverted V-shape figure 1 unit up.
1 2
-1 -2
1
-1
-2
Figure 2.28
(b) The graph ofy = |x−1|is a V-shape figure. It can be obtained by moving the graph ofy= |x|one unit to the right.
1 2 3
-1 -2
1 2
Figure 2.29
(11) Piecewise-defined Functions Below we give more examples of piecewise-defined functions.
Example Let f : [−2,6]−→Rbe the function given by f(x)=
x2 if −2≤ x<0 2x if 0≤x<2 4−x if 2≤x≤6.
For each of the following, find its value:
(a) f(−1) (b) f 1
2
(c) f(3)
Sketch the graph of f. Solution
(a) f(−1)=(−1)2=1 (b) f 1
2
=2· 1
2 =1 (c) f(3)=4−3=1
The graph of f consists of three parts:
• the curvey= x2,−2≤ x<0 (part of a parabola);
• the line segmenty= 2x, 0≤ x <2 (excluding the right endpoint);
• the line segmenty=4−x, 2≤ x≤6. -2 2 4 6
-2 2 4
Figure 2.30
RemarkIn the figure, the little circle indicates that the point (2,4) is not included in the graph. The little dot (which can be omitted) emphasizes that the point (2,2) is included.
2.4. Graphs of Functions 63
The next example shows that piecewise-defined functions can be used in daily life. The piecewise-defined function in the example is called astep function. It jumps from one value to another.
Example Suppose the long-distance rate for a telephone call from City A to City B is $1.4 for the first minute and $0.9 for each additional minute or fraction thereof. Ify= f(t) is a function that indicates the total chargeyfor a call oftminutes’ duration, sketch the graph of f for 0<t≤412.
Solution Note that
f(t)=
1.4 if 0<t≤1 2.3 if 1<t≤2 3.2 if 2<t≤3 4.1 if 3<t≤4 5.0 if 4<t≤412. The graph ofy= f(t) is shown in Figure 2.31.
1 2 3 4 4.5
1.4 2.3 3.2 4.1 5
Figure 2.31
RemarkTheceilingof a real numbert, denoted bydte, is defined to be the smallest integer greater than or equal tot. Using this notation, we have
f(t)=1.4+0.9 dte −1 . Exercise 2.4
1. For each of the following equations, sketch its graph.
(a) y=2x−3 (b) y+3=2(x−5) (c) 7x−5y+4=0 (d) y=|2x−1|+5
(e) x2=y2 (f) y=−x2
(g) y−2=−x2 (h) y−2=−(x−3)2 (i) y=x2+2x−3 (j) y=√
1−x2 (k) x=√
y
2. For each of the following equations, use a computer software to sketch its graph.
(a) y=x3 (b) y= x3−2x2−3x+4
(c) y=2x3−x+5 (d) y= x3−3x2+3x−1
(e) y=−x3 (f) y=−x3+2x2+3x−4
(g) y=x4 (h) y= x4−x3−x2+x+1
(i) y=x4−3x3+2x2+x−1 (j) y= x4−4x3+6x2−4x
(k) y=−x4 (l) y=−x4−2x3+3x
64 Chapter 2. Functions and Graphs
Can you generalize the results for graphs of polynomial functions of degree3,4, . . .? 3. Let f(x) = 2x−1
x2+3. The graph of f is shown on page 55. Note that there is a highest point and a lowest point. Find the coordinates of these two points. Hint: consider the range of f
The points are calledrelative extremum points. An easy way to find their coordinates is to usedifferentiation, see Chapter 5.
4. An object is thrown upward and its heighth(t) in meters aftertseconds is given byh(t)=1+4t−5t2. (a) When will the object hit the ground?
(b) Find the maximum height attained by the object.
5. The manager of an 80-unit apartment complex is trying to decide what rent to charge. Experience has shown that at a rent of $20000, all the units will be full. On the average, one additional unit will remain vacant for each $500 increase in rent.
(a) Letnrepresent the number of $500 increases.
Find an expression for the total revenueRfrom all the rented apartments.
What is the domain ofR?
(b) What value ofnleads to maximum revenue?
What is the maximum revenue?