Uploaded by yvonne940717

Notes Chapter1

advertisement
PART
Introduction
I
1 Basic Definition of Functions
In this section, we are introducing basic terminology of functions.
Definition 1.1 (Functions). Given two sets D and E. A function f from D to E is a
rule that assigns to element x in a set D exactly one element called f (x) in a set E.
• The set D is called the domain (定義域) of f , it contains the inputs of the
function f .
• The set E is called the codomain (對應域) of f , it contains the possible
outputs of the function f .
We usually write f : D → E to say that f is a function from domain D to the
codomain E.
In calculus, there is another important set which is related to the codomain. The
range (值域) is the elements y in the codomain such that there is an x in the domain with
f (x) = y. It can be thought of as the actual outcomes of the function.
Usually, we use x to denote the elements in the domain. This variable is called the
independent variable (自變數). On the other hand, the outcome of the function will
change when we change x, we use y = f (x) to denote the outcome. This variable is called
the dependent variable (應變數).
The definition above is the general setting of a function. For now, we only use the
function with specific domains and codomains. There are some examples.
Example. For the function f (x) = 2x, we can put any number in the place of x. The
domain of this function is all real numbers. The outcome of the function are real
numbers, we can choose the codomain to be R as well. Note that for all y ∈ R, we
can set x = y2 such that f (x) = y. The range is R.
1
Example. For the function f (x) = x−1
, observe that since the denominator cannot
be zero. Every number except 1 can be put in the place of x. The domain is {x ∈ R |
x ̸= 1} in this case. We can choose the codomain to be R. Note that we can solve
1
y = x−1
. We obtain x − 1 = y1 . x = y1 + 1. Since the denominator cannot be 0, this
works for all y except 0. The range of the function is {y ∈ R | y ̸= 0}.
√
Example. For the function f (x) = x, we can only put positive numbers or zero in
the square root. The domain is {x ∈ R | x ⩾ 0} in this case. We can choose the
√
codomain to be R. Since the outcome of x is a positive number or 0, the range is
{y ∈ R | y ≥ 0}
From the examples above, we can observe that for now, we usually use real number
(R) or part of it as the domain.
1
Section 1. Basic Definition of
Functions
Section 2. Some Functions We
Use Frequently
Section 3. Arithmetic on Functions
Section 4.
Transformation of
Functions
Section 5. Some Special Kinds of
Functions
Section 6. Inverse Functions
Basic Definition of Functions
Graph of a function
2
• Open interval (a, b) = {x ∈ R | a < x < b}. (Without endpoints)
• Closed interval [a, b] = {x ∈ R | a ⩽ x ⩽ b}. (With endpoints)
Codomain: We usually use real number (R)
Remark. Later in the calculus, we may encounter different domains and codomains.
For example: For a multivariable function, domain may be R2 = {(x, y) | x, y ∈ R} or
R3 = {(x, y, z) | x, y, z ∈ R}. For the vector-valued functions, the codomain may be
R2 and R3 . The codomain tell us which type the outcome of f is. In the precalculus,
we only focus on the function with domain contained in the set of real numbers and
the codomain be the set of real numbers.
1.1 Graph of a function
Usually, it is good to visualize a function, we can draw the graph of a function.
Definition 1.2. The graph of a function f (x) is the set {(x, f (x)) | x ∈ R} ⊆ R2 .
Since the function assumes exactly only one value f (x) in the codomain for each value
x in the domain. A graph of a function should pass through vertical line test:
Vertical Line Test
Every vertical line should only intersect the graph at most once.
10
Example. Plot the graph of the function y = f (x) = x2 .
Solution. First, let us put some value for the independent value x and see what is
the corresponding f (x) value.
f (x) = x2
8
• x = 0, f (x) = 02 = 0. We have (0, 0) on the graph.
6
• x = 1, f (x) = 12 = 1. We have (1, 1) on the graph.
4
• x = 2, f (x) = 22 = 4. We have (2, 4) on the graph.
2
• x = 3, 4, . . .
−4
We can also put negative for x.
• x = −1, f (x) = (−1)2 = 1. We have (−1, 1) on the graph.
• x = −2, f (x) = (−2)2 = 4. We have (−2, 4) on the graph.
• x = −3, −4, . . .
x
f (x)
−3
9
−2
4
−1
1
0
0
1
1
2
4
3
9
Plot the points and connect them with a smooth curve, we can obtain the graph of
the function (Figure 16.2).
Example. Plot the graph of the function y = f (x) = 1.
Solution. Again, we put in some value for x and see what is the corresponding f (x)
value.
• x = 0, f (x) = 1. We have (0, 1) on the graph.
• x = 1, f (x) = 1. We have (1, 1) on the graph.
−2
2
Figure 1.1. f (x) = x2
4
Some Functions We Use Frequently
3
• x = 2, f (x) = 1. We have (2, 1) on the graph.
• x = 3, 4, . . . .
We can also put negative for x.
2
• x = −1, f (x) = 1. We have (−1, 1) on the graph.
f (x) = 1
• x = −2, f (x) = 1. We have (−2, 1) on the graph.
1.5
• x = −3, −4, . . .
1
x
f (x)
-3
1
-2
1
-1
1
0
1
1
1
2
1
3
1
We can obtain the graph of the function (Figure 1.2). Here, we know that the outcome
f (x) = 1 does not change. Note that it satisfy the requirement of the function: For
every element in the domain, assign exactly 1 value (in this case, we always assign 1)
in the codomain. Such function is called a constant function(常數函數).
0.5
−4
−2
2
Figure 1.2. f (x) = 1
Exercise 1.1.
1. Plot the graph of the function f (x) = (x − 1)(x − 2)(x − 3). Determine the
domain, codomain, range of this function.
2. Plot the graph of the function f (x) = sec2 x. Determine the domain, codomain,
range of this function.
3. Plot the graph of the function f (x) = 2x . Determine the domain, codomain,
range of this function.
2 Some Functions We Use Frequently
2.1 Elementary functions
There are some functions we will encounter frequently. We will give a brief description
which include the domain of each function here. Detailed explanation will be postponed
to the later chapters.
2.1.1 Polynomial functions (多項式函數)
The polynomial functions is a function of the form
f (x) = an xn + an−1 xn−1 + · · · + a2 x2 + a1 x + a0 .
Note that we can put any real number x into the polynomial functions. The domain of any
polynomial functions is R.
Example. If we have n = 2, the function will have the form f (x) = a2 x2 + a1 x + a0 .
There are 3 numbers a2 , a1 , a0 we can determine. If we set a2 = 1, a1 = 0, a0 = 0,
this function becomes f (x) = x2 . This is the function we encounter in the example
of previous section.
Example. If we have n = 0, the function will have the form f (x) = a0 . There are
only 1 number a0 we can determine. If we set a0 = 1, this function becomes f (x) = 1.
This is the constant function we encounter in the example of previous section.
Remark. If an ̸= 0, the
number n is called the degree (次 數) of the function f (x).
4
Some Functions We Use Frequently
Elementary functions
Exercise 2.1.
1. Plot the graph of f (x) = 2x + 1 and determine the degree of this function.
2. Plot the graph of f (x) = x3 − x and determine the degree of this function.
2.1.2 Trigonometric functions (三角函數)
These functions come from geometry. In a right triangle, the ratio between edges is
related to the sharp angle θ in the right triangle. We usually use radian (弧度) as the unit
of the angle. Originally the sharp angle θ should be a value in 0, π2 (or from 0 degree
to 90 degree.) We extend the definition of the trigonometric function to all real numbers
except at some points.
There are 6 trigonometric functions: sin x, cos x, tan x, cot x, sec x, csc x. The detailed
properties and the relation will be in the later section. Here, we just focus on the domains
and the points where the function reaches zero. Note that the symbol Z denotes the set of
all integers and the symbol ∅ denotes empty set.
f (x)
Domain of f (x)
sin x
R
cos x
tan x
cot x
sec x
R−
R
1
π k∈Z
k+
2
Set of zeros of f (x)
{kπ | k ∈ Z}
1
k+
π k∈Z
2
{kπ | k ∈ Z}
1
π k∈Z
k+
2
R − {kπ | k ∈ Z}
1
R−
k+
π k∈Z
2
∅
R − {kπ | k ∈ Z}
csc x
∅
The graph of these functions is given below:
3
y = sin x
y = cos x
y = tan x
y = cot x
y = sec x
y = csc x
2
1
−4
−3
−2
−1
1
2
−1
−2
−3
Figure 2.1. Graph of Trigonometric Functions
3
4
4
Some Functions We Use Frequently
Elementary functions
2.1.3 Exponential and Logarithmic functions (指數函數與對數函數)
If we choose a number a > 0, for any positive integer (整數) k, we can define ak as the
number
ak = |a · a ·{z
· · a · a},
k times
where there are k copies of a multiplied together. Even this function is defined only for
positive integer k, the function can be extend to be defined on the real numbers R. For all
a > 0, a ̸= 1, the domain of the function f (x) = ax is the set of all real numbers R and the
range is the set of all positive numbers {x ∈ R | x > 0}.
3
y = ax , a > 1
y = ax , 0 < a < 1
2
1
−4
−3
−2
−1
1
2
3
4
Figure 2.2. Graph of Exponential Functions
For all a > 0, a ̸= 1, the logarithmic function loga (x) with base a is defined as the
inverse of the function ax . If we omit the subscript a, we mean the logarithmic function
with base 10. The domain of f (x) = loga (x) is the set of all positive numbers {x|x > 0}
and the range is R. They are obtained by interchange the domain and range of ax .
4
y = loga x, a > 1
y = loga x, 0 < a < 1
2
1
2
3
4
5
−2
−4
Figure 2.3. Graph of Logarithmic Functions
6
7
8
5
Some Functions We Use Frequently
Piecewise defined functions
6
2.2 Piecewise defined functions
There are some other important functions not listed above. Recall that the definition
of a function is to assign a value in the codomain to every value in the domain. Therefore,
we can separate the domain into several part and define the rule of the function in each
part. There are some examples.
Example (The absolute value function). The absolute value function (絕對值函數)
is defined as f (x) = |x|.
(
x
, x ⩾ 0;
f (x) = |x| =
−x , x < 0.
4
We separate the domain R into two parts. The first part contains the numbers greater
than or equal to zero and the second part contains numbers less than zero.
In order to compute the outcome for any number x, first we check which part of the
real line x belongs to. After that, we can compute f (x) according to the rule for that
part. For example, to compute f (−3), first check which part -3 belongs to. Since
−3 < 0, f (x) = −x = −(−3) = 3. We can plot the graph of a function (Figure 2.4).
2
f (x) = |x|
3
1
−4
Use the same idea, separating the domain into infinitely many parts is allowed, as in
the following example.
Example (The floor function). Define the floor function f (x) = [x] to be the greatest
integer (整數) which is less than or equal to x. This satisfies the definition of the
function because we can assign an integer to any real number x. We can also separate
the domain and define the function as


0 , 0 ⩽ x < 1;




1 , 1 ⩽ x < 2;
f (x) = .
..

..

.




k ,k ⩽ x < k + 1
for all integer k. Now, we can plot the graph of the function (Figure 2.5).
Exercise 2.2.
1. The step function is defined as
(
H(x) =
0
, x < 0;
1
, x ⩾ 1.
Plot the graph of this function.
√
2. Let f (x) = x2 , determine the domain of this function. Simplify the expression
of this function by writing it as a piecewise defined function. Plot the graph of
this function.
3. The ceiling function f (x) = Ceil(x) is defined to be the smallest integer which
is larger than or equal to x. Determine the “piecewise expression” of Ceil(x).
Compare Ceil(x) with the floor function [x].
4. Define the function f (x) = {x} = x − [x]. Determine the “piecewise expression”
of {x} and its range.
−2
2
4
Figure 2.4. f (x) = |x|
2
f (x) = [x]
1
−2
−1
1
−1
−2
Figure 2.5. f (x) = [x]
2
Arithmetic on Functions
7
3 Arithmetic on Functions
Given two functions f and g, we can obtain new functions from them.
3.1 Addition, subtraction, multiplication and division
Remember that to define a function is to assign a value for every elements in the
domain. Let us start with the addition of them.
Definition 3.1 (Addition of functions). Assume the domains of f and g are R. We
can define a new function f + g. It has domain R and codomain R. It is defined as
(f + g)(x) = f (x) + g(x).
Remark. Both sides of the equation
(f + g)(x) = f (x) + g(x)
look similar. Let us think carefully what they means. The left hand side state that
we have a function f + g. For a new function, we don’t know how to assign a value
for each x. The right hand side give us the rule for assigning values. Since f , g are
functions, for each x, we have the numbers f (x) and g(x) assigning to x. Now, since
they are numbers, we can add them together to get f (x) + g(x). This is the number
we assign to the new function f + g.
For a general functions f , g, they may not be defined on the whole real line R. Let the
domain of f and g be Df , Dg respectively. The function f + g is defined similarly but it
may have a different domain.
Definition 3.2 (Addition of functions). The domain of the function f + g is Df ∩ Dg .
It is defined as
(f + g)(x) = f (x) + g(x).
The idea is to compute the value of (f + g)(x), we need to compute f (x) and g(x) first.
Therefore, f and g need to be defined at x. This means x should be in the domain of f
and domain of g.
√
Example. What is the domain of the function f (x) = x + 2x ?
√
Solution. The function is obtained by adding 2 functions x and 2x , we need to
√
consider the domain of these functions. The domain of x is {x ∈ R | x ⩾ 0}. (Note
that it can be defined at 0, we have the equal sign.) The domain of 2x is R. Therefore,
the domain of f (x) is {x ∈ R | x ⩾ 0} ∩ R = {x ∈ R | x ⩾ 0}. We can only plug in
positive number or 0 in f (x).
Now, we can define the subtraction and multiplication similarly.
Definition 3.3 (Subtraction and multiplication of functions). The functions f − g and
f g have domain Df ∩ Dg and codomain R. They are defined as
1. The function f − g is defined as
(f − g)(x) = f (x) − g(x).
Arithmetic on Functions
Addition, subtraction, multiplication and division
8
2. The function f g = f · g is defined as
(f g)(x) = f (x) · g(x).
√
Example. Let f (x) = x, g(x) = log(4 − x). What are the domain of f − g, f g?
√
Solution. We should start with the domain of f and g. For f (x) = x, only positive
number or zero can be put in the square root. The domain is {x ∈ R | x ⩾ 0}. For
g(x) = log(4 − x), only positive number can be put in the logarithm function, we
need 4 − x > 0, this is equivalent to x < 4. For f − g and f g, we need to be able
to compute f (x), g(x). x must be in the domain of f and g and satisfies 0 ⩽ x < 4.
Hence {x ∈ R | 0 ⩽ x < 4} is the domain of f − g and f g.
The division of the function is similar. But there is something we need to be careful.
Since we cannot divide by zero, when g(x) = 0, we can not compute f (x)/g(x). Therefore,
Definition 3.4 (Division of functions). The domain of the function f /g is (Df ∩ Dg ) −
{x ∈ R | g(x) = 0} and codomain R. It is defined as
(f /g)(x) =
f (x)
.
g(x)
Remark. Since we exclude the number x where g(x) = 0 from the domain, we can
(x)
always compute fg(x)
and assign a number to f /g.
Example. Determine the domain of the function f (x) =
they have the same domain?
Solution.
x2 −4
x−2
6
and g(x) = x + 2. Do
f (x) = x + 2
4
• For the function f , it is x2 − 4 divided by x − 2. Since x2 − 4 and x − 2 are
polynomials, their domains are both R. However, we need to be careful that
the denominator cannot be zero. x − 2 = 0 when x = 2. We need to exclude 2
from out domain. The domain is R ∩ R − {2} = {x ∈ R | x ̸= 2}.
2
• For the function g, it is a polynomial. The domain of g(x) is R.
From the above analysis, they do not have the same domain.
−2
Remark. From the knowledge of polynomials, we know that x2 − 4 = (x − 2)(x + 2).
However, when we want to divide both side by x − 2, we need to be careful that we
2
−4
cannot divide by 0. Therefore, we can only obtain xx−2
= x + 2 when x ̸= 2. When
x = 2, f (x) is not defined and g(x) = 2 + 2 = 4. There graph are almost the same
except at x = 2. (Compare Figure 3.1 and Figure 3.2)
2
4
Figure 3.1. g(x) = x + 2
6
f (x) =
x2 −4
x−2
4
Exercise 3.1.
1. Determine the domain of the function f (x) = 3x ·
√
x2 − 4.
2
x
. (Hint. Determine
2. Determine the domain of the function f (x) = √
2
x − 2x − x
whether the denominator of f (x) vanishes).
3. Let D1 , D2 and D3 be the domains of the functions f1 , f2 and f3 , respectively.
Write down the domain of the function f = f1 /(f2 f3 ).
−2
2
Figure 3.2. f (x) =
4
x2 −4
x−2
Arithmetic on Functions
Composition of functions
9
3.2 Composition of functions
Beside the addition, subtraction, multiplication and division, there is one important
way to get new function from functions f and g.
Definition 3.5 (Composition of functions). The composition (合成) of functions f
and g is written as f ◦ g. The rule to assign number to a given x is
(f ◦ g)(x) = f (g(x)).
We use g on x first and use f on the outcome g(x). Here, f is called the outer
function and g is called the inner function. The domain of a composite function
is x in the domain of g such that g(x) is in the domain of f .
Example. Let f (x) = x + 2, g(x) = x2 . Compute (f ◦ g)(1) and (g ◦ f )(1). Plot the
graph of (f ◦ g)(x) and (g ◦ f )(x).
Solution.
20
• To compute (f ◦ g)(1), remember it is defined as f (g(1)). We need to compute
the function g first and put it into the function f . g(1) = 12 = 1. Put it into
the function f . We have f (g(1)) = f (1) = 1 + 2 = 3.
10
• To compute (g ◦ f )(1), remember it is defined as g(f (1)). This time, we need
to compute the function f first and put it into the function g. We have f (1) =
1 + 2 = 3. Put it into the function g. We have g(f (1)) = g(3) = 32 = 9.
Note that (f ◦ g)(1) ̸= (g ◦ f )(1). For the composition, the order we compute is
important and usually f ◦ g and g ◦ f are not the same function. We can observe
this by plotting the graph of these 2 functions. First, we compute some value of the
functions.
x
(f ◦ g)(x)
(g ◦ f )(x)
−3
11
1
−2
6
0
−1
3
1
0
2
4
1
3
9
2
6
16
3
11
25
See Figure 3.3 for an illustration.
√
Example. Determine the domain of the composite function x2 − 1.
√
Solution. This function can be think of f ◦g, where f (x) = x and g(x) = x2 −1. For
g, we can compute the outcome for any real number x. However, not all the outcome
√
can be put in f (x) = x. We know that only positive number or zero can be the
input of the square root function. To compute f (g(x)), we need g(x) = x2 − 1 ≥ 0.
Solve for this inequality, either x ⩾ 1 or x ⩽ −1. The domain of this function is
{x ∈ R | x ⩾ 1} ∪ {x ∈ R | x ⩽ −1}.
Exercise 3.2.
1. Determine the domain of the composite function f ◦ g, where f (x) = g(x) =
log x.
2. Determine the domain of the composite function f ◦ g, where f (x) = sec x,
g(x) = πx2 .
3. Determine the domain of the function f (x) = 2sec x + log cos x.
(f ◦ g)(x) = x2 + 2
(g ◦ f )(x) = (x + 2)2
−4
−2
2
4
Figure 3.3. Graph of (f ◦g)(x) and
(g ◦ f )(x)
Transformation of Functions
10
To understand some complicated functions, we may use composition more than once.
√
Example. Let f (x) = log tan x.
√
• It can be understand as the composition f1 ◦ f , where f1 (x) = x, f (x) =
log tan x. However, the function f is a composition, we can write it as f =
f2 ◦ f3 , where f2 = log x and f3 = tan x. The function f can be written as the
composition of 3 functions: f = f1 ◦ f2 ◦ f3 .
√
• We can also think f (x) = fe ◦ f3 , where fe(x) = log x and f3 = tan x as above.
√
Again, since fe is a composition of functions, let f1 (x) = x, f2 = log x, we have
fe = f1 ◦ f2 . The function f can be written as the composition of 3 functions:
f = f1 ◦ f2 ◦ f3 . We can analyse the composition structure from inside or out
side and obtain the same sequence of basic functions.
Exercise 3.3.
1. Given f (x) = 2sin log x , determine it is the composite of what basic functions.
h
i
2
2. Given f (x) = sin (log x) + 2 log x − 3 , determine it is the composite of what
basic functions.
3. Given f (x) = cos 32 sec x + 3sec x + 5 + sin 32 sec x + 3sec x + 5 , determine it is
the composite of what basic functions.
4 Transformation of Functions
Recall the graph of the function y = f (x) is defined as the set of points {(x, f (x))},
where x belongs to the domain of the function f .
4.1 Translations
Let us start with a simple case: How to move the graph up by h units? To move the
graph up, we increase the y value by h and we obtain a new function
y = f (x) + h.
Similarly, if we want to move the graph down by h units, we decrease the y value by h and
the function becomes
y = f (x) − h.
Remark. For h > 0, if we want to move the graph down by h units, we can think it as
moving the graph up by −h units and the function is f (x) + (−h) = f − h. Therefore,
when we are talking about moving up by h units, we allow h to be either positive,
negative, or zero, where negative h means we move down by |h| units.
Now, let us deal with the case of moving the graph of f (x) to the left or right. What
new function can we obtain by translating to the right by k units?
If (x, y) is on the new graph, we need to find the relation between x and y. Since this
is obtained by translating the old graph to the right by k units, if we translate (x, y) to
the left by k unit, the point (x − k, y) lies on the old graph y = f (x). Hence, it satisfies
y = f (x − k).
Transformation of Functions
Similarly, if we want to move the graph to the left by k units, the new functions is y =
f (x + k). Note that we can think “moving to the left by k unit” as “moving to the right
by −k units”. Therefore, from now on, we can say moving to the right by k units, where k
can be positive, negative, or zero. Here, negative k means we are moving the graph to the
left by |k| units.
Remark. We can use the same point of view for the case of translating upward by h
units. If (x, y) is on the new graph, translate (x, y) downward by h unit, the point
(x, y − h) lies on the old graph y = f (x). Hence, it satisfies y − h = f (x) and it is
equivalent to y = f (x) + h.
Remark. Since the translation will preserve the shape of a function, it will be used
very often in calculus.
Example. If f (x) = x2 , what function f¯ do we obtain if we translate the graph by
(2, 1)?
Solution.
• Move right 2 units: Replace x by x − 2.
• Move up 1 unit: Add 1 to the function. (Replace y by y − 1.)
We obtain the new function
f¯(x) = (x − 2)2 + 1.
Note that after the operation, we can organize the functions into the common form.
In this case, we can write it in the standard form of polynomial.
f (x) = (x − 2)2 + 1 = (x2 − 4x + 4) + 1 = x2 − 4x + 5.
Example. Let f (x) = |x|, which function f¯ do we obtain after moving the graph left
by 1 unit and move down 2 units?
Solution. It can be thought of as moving right by −1 unit and moving up by −2
units.
• Moving right by −1 unit: Replace x by x − (−1) = x + 1.
• Moving down by −2 units: Add −2 to the function.
The result is
f¯(x) = f (x + 1) − 2 = |x + 1| − 2.
Exercise 4.1.
1. For a function f (x) = 2x2 + 5x + 2, what new function do we obtain if we move
the graph right by 2 units?
2. For a function f (x) = ex +4 log x, what new function do we obtain if we translate
the graph by (5, 3)?
3. Define the functions f (x) = 6(x + 2)2 + 5 cos(x + 2) + 2ex+3 − 3 and g(x) =
6(x − 1)2 + 5 cos(x − 1) + 2ex + 4. How can we transform the graph of f (x) into
the graph of g(x) via translation?
Translations
11
Transformation of Functions
Scaling
4.2 Scaling
Now, fix a real number a > 0. How to make the graph {(x, f (x)) | x ∈ R} a times
wider? Sometimes we also say expand the graph in the x-direction by a when a > 1.
Use the same idea as in the translation part. If (x, y) is on the new graph, (x/a, y) is
on the old graph. Put (x/a, y) in the equation y = f (x), we obtain y = f (x/a).
Remark. When a > 1, we say the graph expands/dilates. When 0 < a < 1, we say
the graph shrinks/contracts. In order to simplify the terminology, from now on, we
just say “scale the graph by factor a”.
Similarly, for b > 0, how do we scale the graph {(x, f (x))|x ∈ R} the y-direction by
b? If (x, y) on the new graph, (x, y/b) is on the old graph. Put (x, y/b) in the equation
y = f (x), we obtain y/b = f (x) or equivalently y = b · f (x). This is the same as multiply
the function by b.
Example. If f (x) = |x|, what function do we obtain if
1. We first translate the function 2 units to the right and scale in the x-direction
by 1/2?
2. We first scale in the x-direction by 1/2 and translate the function 2 units to the
right.
Solution.
• Translate the function 2 units to the right: Replace x by x − 2.
• Scale in the x-direction by 1/2: Replace x by 2x.
Now, we need to careful of the order of translation and scaling.
1. If we first translate the function 2 units to the right and scale in the x-direction
by 1/2, we replace x by x − 2 first and obtain f (x) = |x − 2|. After that, we
replace x by 2x and the result is f (x) = |2x − 2|.
4
4
4
3
3
3
2
2
2
1
1
1
−4 −2
2
4
f (x) = |x|
−4 −2
2
4
f (x) = |x − 2|
−4 −2
2
4
f (x) = |2x − 2|
2. If we first scale in the x-direction by 1/2 and translate the function 2 units to
the right, we replace x by 2x first and obtain f (x) = |2x|. After that, we replace
x by x − 2 and the result is f (x) = |2(x − 2)| = |2x − 4|.
−4 −2
4
4
4
3
3
3
2
2
2
1
1
1
2
f (x) = |x|
4
−4 −2
2
f (x) = |2x|
4
−4 −2
2
f (x) = |2x − 4|
4
12
Transformation of Functions
Reflection
Example. Let f (x) = sin x, which function f do we obtain if we scale in the x-direction
by 1/2 and scale in the y-direction by 3. Plot the graph to see if the frequency of the
function goes up or down, the amplitude of the function goes up or down.
Solution:
• Scale in the x-direction by 1/2: Replace x by
x
1
2
= 2x.
• Scale in the y-direction by 3: Multiply the function by 3.
The resulting function is f¯(x) = 3 sin(2x). It has higher frequency and higher amplitude then the original function.
2
−4 −2
2
2
−2
f (x) = sin x
4
−4 −2
2
2
4
−2
f (x) = sin(2x)
−4 −2
2
4
−2
f (x) = 3 sin(2x)
Exercise 4.2.
1. If f (x) = log x, which function f do we obtain if
(a) We first translate the function 3 units up and scale in y-direction by 4?
(b) We first scale in y-direction by 4 and translate the function 3 units up?
Sketch the graph of these functions.
2. If f (x) = 4 sec(2x + 4) − 3 and g(x) = sec x. How can we transform the graph
of g(x) into the graph of f (x) via translation and scaling? (Hint: From sec x
construct sec(x + 4), sec(2x + 4), 4 sec(2x + 4), and finally f (x). Identify each
step as a translation or a scaling. )
4.3 Reflection
The last topic in this section is reflection. We want to reflect the graph of the function
with respect to x-axis, with respect to y-axis or with respect to the origin.
• If (x, y) lies on the graph after reflected with respect to x-axis, (x, −y) lies on the
original graph and it must satisfy y = f (x). Therefore, we have −y = f (x) or
equivalently y = −f (x).
• If (x, y) lies on the graph after reflected with respect to y-axis, (−x, y) lies on the
original graph and it must satisfy y = f (x). Therefore, we have y = f (−x).
• If (x, y) lies on the graph after reflected with respect to the origin, (−x, −y) lies on
the original graph and it must satisfy y = f (x). Therefore, we have −y = f (−x) or
equivalently y = −f (−x).
Remark. You may observe that reflection with respect to y-axis is done by allowing
the scaling factor in the x-direction be a negative number −1. Similarly, reflection
with respect to x-axis is done by allowing the scaling factor in the y-direction be a
negative number −1. Since reflection changes the direction of the function, to avoid
confusion, we will separate the reflection case from the scaling case.
13
Some Special Kinds of Functions
Example. Let the function f (x) =
x
2
14
+ 1.
1. Which function f do we obtain if we reflect the graph with respect to x-axis?
2. Which function fe do we obtain if we reflect the graph with respect to y-axis?
Solution.
1. Reflect the graph with respect to x-axis: Multiply by −1,
x
x
f (x) = −1 ·
+ 1 = − − 1.
2
2
2. Reflect the graph with respect to y-axis: Replace x by −x,
−x
x
fe(x) =
+ 1 = − + 1.
2
2
4
4
4
2
2
2
−4 −2
−2
2
−4
x
f (x) = + 1
2
4
−4 −2
−2
2
4
−4
x
f¯(x) = − − 1
2
−4 −2
−2
2
4
−4
x
f˜(x) = − + 1
2
Exercise 4.3.
1. Let f (x) = sin x, which function f do we obtain if we reflect the graph with
respect to x-axis? What function fe do we obtain if we reflect the graph with
respect to y-axis? Compare f and fe.
2. Let f (x) = cos x, which function f do we obtain if we reflect the graph with
respect to x-axis? What function fe do we obtain if we reflect the graph with
respect to y-axis? Compare f and fe.
3. Let f (x) = 2x , which function do we obtain it we transform the graph of f by
the following:
(i) Reflect the graph with respect to x-axis.
(ii) Translate the graph 3 units to the right.
(iii) Reflect the graph with respect to y-axis.
(iv) Scale the function in the y-direction by 2.
5 Some Special Kinds of Functions
5.1 Periodic, even, odd functions
In the previous section, we introduce translation and reflection. Some functions remain the same after being translated or reflected. We are introducing such functions in
the section.
Recall that if we want to translate a function f (x) to the right by T , we replace x by
x − T . The function remain the same under translation is called periodic.
Some Special Kinds of Functions
Periodic, even, odd functions
Definition 5.1 (Periodic Function). If a function f : R → R satisfies
f (x) = f (x − T )
for every x. The function f is a periodic function (週期函數) with period T .
Most common periodic functions we will encounter are the trigonometric functions.
Example. For the trigonometric functions, we have the following properties:
• sin x, cos x are periodic with period 2π.
• tan x is periodic with period π.
1
f (x) = sin x
0.5
−2π
− 3π
2
π
− π2
−0.5
π
2
π
3π
2
2π
−1
1
f (x) = cos x
0.5
−2π
− 3π
2
π
− π2
−0.5
π
2
π
3π
2
2π
−1
f (x) = tan x
−2π
− 3π
2
π
− π2
π
2
π
3π
2
2π
Exercise 5.1. Plot the graph of f (x) = x − [x] and determine the period of this
function. (See Subsection 2.2 for the definition of the floor function [x])
Now, let us consider the functions which remain the same under reflection. Recall that
if we reflect a function with respect to y-axis, we replace (x, y) by (−x, y) in the equation.
Similarly, if we reflect a function with respect to the origin, we replace (x, y) by (−x, −y).
There are functions remain the same under reflection.
Definition 5.2 (Even and Odd Function).
1. A function is even if the graph remain the same after reflection with respect
to y-axis, this is equivalent to say
f (x) = f (−x).
2. A function is odd if the graph remain the same after reflection with respect to
the origin, this is equivalent to say
f (x) = −f (−x).
This definition is related to the polynomials, as illustrated in the following example.
15
Some Special Kinds of Functions
Periodic, even, odd functions
Example. Determine f1 (x) = |x|, f2 (x) = x2 , f3 (x) = x3 are even, odd or neither.
Solution.
1. For f1 (x), if we replace x by −x, we have f1 (−x) = | − x| = |x| = f1 (x). It is
an even function.
2. For f2 (x), if we replace x by −x, we have f2 (−x) = (−x)2 = x2 = f2 (x). It is
an even function.
3. For f3 (x), if we replace x by −x, we have f3 (−x) = (−x)3 = −x3 = −f3 (x). It
is an odd function.
4
4
4
2
2
2
−4 −2
−2
2
−4 −2
−2
4
−4
2
−4 −2
−2
4
f2 (x) = x
4
−4
−4
f1 (x) = |x|
2
2
f3 (x) = x3
Remark. From the example above, we observe that the function xk is even if k is an
even integer. The function xk is odd if k is an odd integer.
One of the interesting fact is: For a function f defined on R, we can always find an
even function feven and an odd function fodd such that f = feven + fodd . The functions
are given by
1
(f (x) + f (−x)),
2
1
fodd (x) = (f (x) − f (−x)).
2
feven (x) =
Example. Let f (x) = 2x , find an even function feven and an odd function fodd such
that f = feven + fodd . Plot the graph of f , feven , fodd .
Solution.
1
(f (x) + f (−x)) =
2
1
fodd (x) = (f (x) − f (−x)) =
2
feven (x) =
1 x
(2 + 2−x ),
2
1 x
(2 − 2−x ).
2
4
4
4
2
2
2
−4 −2
−2
−4
f (x) = 2x
2
4
−4 −2
−2
2
4
−4
1
feven (x) = (2x + 2−x )
2
−4 −2
−2
2
4
−4
fodd (x) =
1 x
(2 − 2−x )
2
16
Some Special Kinds of Functions
One-to-one function and onto function
17
5.2 One-to-one function and onto function
Definition 5.3 (One-to-one function). If there are no different x corresponding to
the same y, the function is called injective, or one-to-one (一對一). To be more
precise, f (x1 ) = f (x2 ) implies x1 = x2 .
By the definition of one-to-one function, we can observe whether a function is one-toone from the graph.
Horizontal Line Test
If every horizontal line intersect the graph at most once, the function is injective.
Remark. The horizontal line test seems similar to the vertical line test. Recall the
vertical line test: If every vertical line intersect the set at most once, it is a graph
of a function. Note that the vertical line test must be satisfied by any graph of a
function. The horizontal line test only need to be satisfied by one-to-one functions.
4
Example. Show that the function f (x) = x2 is not one-to-one.
Solution. To show a function is not one-to-one, we need to find different x values
such that the outcome is the same. Observe that
f (x) = x2
y = 1
3
f (1) = 1 · 1 = 1,
2
f (−1) = (−1) · (−1) = 1.
Therefore, f (1) = f (−1). It is not one-to-one. We can also observe it from the graph
(Figure 5.1), the horizontal line y = 1 intersect the graph twice, it does not pass
through the horizontal line test.
Example. Is the function f : R → R, f (x) = 2x + 1 one-to-one?
Solution. This is asking for all y in the range, can we find multiple x such that
y = f (x) = 2x + 1? Fix a y0 . From the equation y0 = 2x + 1, we can solve for x. The
required input for x is y02−1 and we have only one solution. Therefore, given any y0
in the range, there is only one corresponding x. The function is one-to-one. (Figure
5.2)
Definition 5.4. If every y in the codomain is the outcome of the function f , the
function f is called surjective, or onto (映成).
Example. Is the function f : R → R, f (x) = x3 onto?
Solution. This is asking for all y ∈ R (codomain), can we find a number x such that
√
y = f (x) = x3 ? For all y ∈ R, set x = 3 y, note that cubic root can be used on any
real numbers. We have y = x3 , the required x for any y can always be found this
way. The function is onto.
The proof in the previous example does not work for even power, as illustrated in the
following example.
Example. Is the function f : R → R, f (x) = x2 onto?
Solution. This is asking for all y ∈ R (codomain), can we find a number x such that
y = f (x) = x2 ? Since the square of any real number is positive, if y = −1, it is
impossible to find real number x such that x2 = y. It is not onto.
1
−2
−1
1
2
Figure 5.1. f (x) = x2 is not injective
2
f (x) = 2x + 1
1
−2
−1
1
2
−1
−2
Figure 5.2. f (x) = 2x + 1 is injective
Some Special Kinds of Functions
Increasing function and decreasing function
5.3 Increasing function and decreasing function
Some function preserves the order of the numbers. Larger value will still be larger after
using the function. Such function is said to be increasing.
Definition 5.5 (Increasing Function). Assume x1 , x2 are in the domain of f .
• If f (x1 ) ⩽ f (x2 ) for all x1 < x2 , f is an increasing function.
• If f (x1 ) < f (x2 ) for all x1 < x2 , f is a strictly increasing function.
Similarly, there are functions which makes larger value smaller. Such function is said
to be decreasing.
Definition 5.6 (Decreasing Function). Assume x1 , x2 are in the domain of f .
• If f (x1 ) ⩾ f (x2 ) for all x1 < x2 , f is a decreasing function.
• If f (x1 ) > f (x2 ) for all x1 < x2 , f is a strictly decreasing function.
Example. If a > 1, the exponential function ax and the logarithmic function loga x
are strictly increasing functions, as illustrated in the following graph.
4
f (x) = ax , a > 1
f (x) = loga x, a > 1
2
−8
−6
−4
−2
2
4
6
8
−2
On the other hand, if 0 < a < 1, the exponential function ax and the logarithmic
function loga x are strictly decreasing functions, as illustrated in the following graph.
4
f (x) = ax , 0 < a < 1
f (x) = loga x, 0 < a < 1
2
−8
−6
−4
−2
2
4
6
8
−2
Exercise 5.2. Is the floor function f (x) = [x] strictly increasing? Is it increasing?
Give your reasoning.
18
Inverse Functions
6 Inverse Functions
6.1 Inverse for one-to-one functions
Sometimes we want to use the function backward. Let us consider
• Question. For a function y = f (x), given y, when can we find x such y = f (x)?
• Answer. This is equivalent to y is in the range of f .
Now, let us consider the further question:
• Question. For a function y = f (x), for y in the range of f , we can find x such
y = f (x). When is the relation from a given y to find a corresponding x a function?
By the definition of a function, this means for each y, only one x is assigned to this y. The
function should be one-to-one. The function we find in this case if the inverse function of
f , which is denoted by f −1 .
Example. Let f : R → R be f (x) = x + 1, what is the inverse of f ?
Solution. In the equation y = f (x) = x+1, let us solve for x for any given y. We have
y − 1 = x. For all y, we can find the x by subtracting 1. The relation between y and x
is x = y − 1. Therefore, the inverse function is given by x = f −1 (y) = y − 1. Usually
we use x as the independent variable and y as the dependent variable. Therefore, we
will write f −1 (x) = x − 1.
6.2 Inverse for general functions
For the general function like f (x) = x2 , it is not one-to-one. Can we find the inverse
function of such function f ? Since some y may correspond to more than one x, this is
not a function relation. However, we can choose smaller domain such that the function is
one-to-one and we can find the inverse function.
Example. Let f : R → R be f (x) = x2 , what is the inverse of f ?
Solution. From the previous section, we know f is not one-to-one. We need to choose
smaller domain such that f is one-to-one.
• If we only use the part on {x ∈ R | x ⩾ 0}, f is one-to-one on that domain and
the range is also {y ∈ R | y ⩾ 0}. We can find the inverse for this part. For any
√
√
y ⩾ 0, solve for y = x2 , x ⩾ 0. We have x = y. Therefore f −1 (y) = y or we
√
can change the variable back to x such that f −1 (x) = x.
• What about the part {x ∈ R | x ⩽ 0}? f is also one-to-one on that domain and
the range is {y ∈ R | y ⩾ 0}. We can also find the inverse for this part. For any
√
√
y ⩾ 0, solve for y = x2 , x ⩽ 0. We have x = − y. Therefore f −1 (y) = − y or
√
we can change the variable back to x such that f −1 (x) = − x.
Therefore, we can conclude the function f (x) = x2 does not have a inverse since it is
not one-to-one. However, If we restrict it to the set {x ∈ R | x ⩾ 0} or {x ∈ R | x ⩽ 0},
it becomes one-to-one and it has a inverse.
Remark. In the example above, f (x) = x2 is symmetric with respect to the y-axis.
√
Therefore, the two inverses are related. Sometimes we just write f −1 (x) = x but
we need to remember this only works for the positive x or 0. This property also hold
for any even power such as x4 , x6 .
19
Inverse Functions
Inverse for general functions
The general procedure we will use to construct an inverse function is
Constructing Inverse Function
1. Choose the domain such that the function is one-to-one on this domain.
2. Determine the range corresponding to the new domain. For any y in the range,
we can find the x. This will be the domain of the inverse function.
3. Solve x in terms of y, we can obtain the function.
4. Usually, we swap the variable x and y to make x the independent variable and
write the function as f −1 (x).
Now, let us take a look at some important inverses.
Example (Inverse for basic polynomials). Fix an integer k. If f (x) = xk , what is the
inverse of f ?
Solution.
• When k is odd, f : R → R, it is one-to-one and the range is the same as the
√
codomain R. The inverse function, which is f −1 : R → R, f −1 (x) = k x is
defined on the real line.
• When k is even, f is not one-to-one on the real line R. To make it one-toone, restrict f to the domain {x ∈ R | x ⩾ 0}. The range of this part is
{y ∈ R | y ⩾ 0} and we can define the inverse function. The inverse function
√
is f −1 : {x ∈ R | x ⩾ 0} → R, f −1 (x) = k x and it is only defined on {x ∈ R |
x ⩾ 0}.
Example (Inverse for exponential functions). Fix a positive real number a ̸= 1. If
f (x) = ax , what is the inverse of f ?
Solution. First, we know that f is one-to-one. We need to find the domain and range
for this function. The exponential function is defined on the whole real line R and
the outcome should be positive. The range of this function is {y ∈ R | y > 0}. For
the inverse function, the domain is the new range and the range is the new domain.
The inverse function f −1 : {x ∈ R | x > 0} → R and it has range R. This function is
usually denoted by f −1 (x) = loga x.
Exercise 6.1.
1. The graph of f (x) = sin x is given in the following picture. Find a domain
such that f (x) is one-to-one on that domain. Sketch the inverse function which
corresponds the domain you choose.
1
f (x) = sin x
0.5
−2π
− 3π
2
π
− π2
π
2
−0.5
−1
π
3π
2
20
Inverse Functions
Inverse for general functions
2. The graph of f (x) = tan x is given in the following picture. Find a domain
such that f (x) is one-to-one on that domain. Sketch the inverse function which
corresponds the domain you choose.
f (x) = tan x
−2π
− 3π
2
π
− π2
π
2
π
3π
2
3. Let f (x) = 2x−1
x+3 , determine its domain and range. Compute the inverse function
f −1 (x) for f (x) explicitly. What is the domain and the range of the inverse
function?
21
Download