英文翻译原文数学系
-
英文翻译
专业:数学与应用数学
学号:
081106117
姓名:毛赛武
Chapter2
Functions and
Relations
The
idea
of
associating
an
element
from
one
set
with
an
element
(or
elements)
from
another
is
a
fundamental
one
in
are
many
different
kinds
of
associations
and
a
wide
variety
of
notations used for
expressing will examine two
kinds
of
associations:functions
and
relations,both
of
which
have
significant
applications
in
computer
begin
with
functions,since
you
are
more
familiar
with them, before considering the more
general
idea of relations.
Recall
that
a
function
from
A
to
B
is
a
mapping
from one set (the
domain of the function) to another (the
range of the function) where each
element of the domain
is
mapped to one element of the range. For
example,we
could map each element in
the set of integers to twice its
this
case,if
we
call
the
function
ƒ
,one
way
of
expressing the mapping is to write
f
(
x
)
2
x
.It is
important
to
specify
the
domain
and
range
of
a
example,if
we
wanted
to
restrict
the
preceding
example
to
the
integers,we
could
write
f
:
Z
such
that
f
(
x
)
2
x
.Here,
p>
Z
stands
for
the
set
of
integers.
On
the
g
:
R
R
other hand, we
could have a function
g
(
x
)
2
x
defined by
. (
R
is the set of real numbers.) The
functions
g
and ƒ
are different but they agree on the set
of integers.
The
critical
idea
is
that
a
function
maps
each
element
in
its
domain
to
a
unique
element
in
its
is
not
allowed
is
for
an
element
in
the
domain
to
be
mapped
to
more
than
one
element
in
the
range. An
example of a mapping that is not a function is
not
a
function
is
one
that
maps
each
non-
negative
real
number
ɑ
to
the
numbers
x
such
x
2
.
This
mapping
is
not a function since, for example, 4 would get
mapped
to
2
and
to
-2.
(There
are
many
examples
where
this
mapping
fails
to
be
a
function.
If
it
fails
for
just
one
value
in
the
domain,
we
cannot
call
the
mapping
a
function.)
We
illustrate
a
mapping
that
is
a
function
and
one
that in not in the
following diagrams:
A
B
A
B
。
。
。
。
。
。
。
。
。
。
。
A function from A to B
Not a function from A
to B
Give
three
representations
for
the
idea
of
associating
any
given real
number with that number squared plus this
Association a function?
There are so
many functions that are important to us
in computer science that we cannot
possibly list them all.
We will give a
few examples of the most important ones
used not only for carrying out
computations, but also for
analyzing
the performance of programs.
Exponential and Log
Functions
An
important
class
of
functions
for
us
are
the
exponential functions:
f
(
x
)
b
. We call
b
the base of the
x
exponential.
Two
bases
are
of
particular
importance
for
us:e(Euler
s
const
ant
≈
2.7182818...)
and
2.
When
you
graph
x
or
2
(or
any
exponential
with
base
larger
x
than
1),
you
should
notice
that
the
function
grows
very
rapidly after a short while. The graphs
of all exponential
functions, with base
greater than 1, have similar shapes.
Use a symbolic computation software
package
or
a
graphing
calculator
to
compare
the
graphs
of
the
identity
function,
the
function
that
takes a
real
number
and
squares
it,
and
an
exponential
function
that
takes
any real
number and raises 2 to that power.
Recall
that
a
polynomial
over
the
reals,
p
,in
the
variable
x
can
be
though
of
as
a
function
of
the
form
p
(
x
)
a
0
a
1
x
a
2
x
..
.
2
a
x<
/p>
n
n
,where
the
coefficients
a
p
(
x
)<
/p>
0
,...,
a
n
are
real
numbers.
The
degree
of
such
that
a
n
is
the
largest
n
p
(
p>
x
)
0
.
(If
p
(
p>
x
)
0
then
we
say
has
degree
,then
.
-1.)
As
mentioned,exponential
functions
grow
very
rapidly.
Indeed,
if
there
is
a
number
regardless
of
p
p>
(
x
)
is
any
polynomial
and
x
N
b
1
x<
/p>
N
x
such
that
if
degree
,
then
b
p
(
x
)
That
is,eventually
b
is
greater
than
the
of
p
(
x
)
.
This
is
true
or
its
p
(
x
)
coefficients
,although
for
polynomials
of
particularly
large degree, the first time
b
exceeds
x
p
(
x
)
(that is, the
value of the smallest
N
mentioned
previously)might be
a rather larger
number. For example,
e
x
45
x
1000
x
10
3
x
3
for all
.(You
can
check
that
45
is
the
smallest
such
value
where
this is true.)
Another
important
class
of
functions
is
the
collection
of
logarithm
(or
log)
functions.
The
log
functions
the
mappings
of
the
exponential
functions. We
need to make this idea of
inverse,precise.
The
inverse
of
a
function
ƒ
is
another
function,
denoted
by
f
,
such
that
f
1
1
< br>
1
(
f
(
x
))
x
for
all
x
in
the
domain
of
ƒ
.
Since
f
must
itself
be
a
function,
ƒ
has
an
inverse
only
if
ƒ
is
one-to-one;
that
is,
only
if
f
(
x
)
f
(
y
)
implies
x
y
.
The following are two functions;
the
first one is not one-to-one and but the second one
is.
A
B
A
B
。
。
。
。
。
。
。
。
。
。
。
Find the inverse of
f(x)=3x+5.
The
inverse
of
the
exponential
functions
are
the
logarithm
functions.
The
logarithm
base
b
is
written
log
3
b
(
x
)
y
if
and
only
if
b
y
x
.
Thus
log
2
p>
(
8
)
3
,
since
2
=8.
Note
that
since
the
range
of
an
exponential
function
(with
positive
base)
is
the
set
of
positive
reals
and the domain
is the set of all reals, the domain of
the
corresponding log function is the
set of positive reals and
the range is
the set of all reals. The logarithm base
e
is
called
the
natural
logarithm
and
usually
written
subscript.
Notice how slowly the log
functions
grow, in sharp
contrast
to
the
exponential
Indeed,
lim
log
(
x
)
,but
lim
(slope of
log<
/p>
x
b
x
ln
and
the
logarithm
base
2
will
be
written
simply
log
with
no
b
functions.
(
x
)
)=
other
words,the value of
log
b
(
x
)
p>
gets as large as you wish,
but
at
a
progressively
slower
rate.
Contrast
this
with
the
exponential functions, which
go to
at a progressively
faster
rate.
Using
computer
software,
compare
the
graphs
of
the
linear functions ax+b for
various a´
s and b´
s with the
log
functions a
l
og
(
x
)
for various a´
s and
b´
s.
b
Since
logs
and
exponentials
are
inverses
of
each
other,we have that
b
log
b
b
(
x
p>
)
x
, for
x
0
and
log
(
b
)
x
, for all
x
.
x
b<
/p>
x
y
x
y
Recall the following
properties of exponential:
x
y
b
b<
/p>
,
p>
b
x
y
b
/
b
, and
(
b
p>
)
b
,
x
y
xy
Which
give
rise
to
the
corresponding
properties
of
logarithms:
log
b
(
xy
p>
)
log
b
p>
(
x
)
log
(
y
)
b
,
l
o
p>
g
(
x
/
y
)
l
o
g
(
x
< br>)
l
o
g
(
y
)
,
and
b
b
b
l
p>
o
g
(
x
b
y
)
y
l
o
g
< br>(
x
)
.
b
Changing
bases
of
logarithms
is
simply
a
matter
of
dividing by a contrast:
l
o
g
p>
(
x
)
.
l
o
g
(
x
)
l
o
g
(
b
)
a
b
a
That
is,
to
change
from
log
to
log
,
simply
divide
by
a
b
log
a
(
b
)
.
So,
log
3
(
x
)
log
2
(
x
)
/
log
(
3
)
2
.This
last
property
is
.Then
b
log
log
a
easily
shown
from
the
definition
and
elementary
properties
of
log:Suppose
lo
g
a
y
lo
g
b
(
x
)<
/p>
y
x
and
so
(
x
)
log
(
b
a
y
)
y
log
(
b
)
a
.T
herefore ,
y
(
x
)
(
b
)
.
a
Note
that
log
10
(
n
)
is
approximately
the
number
of
digits
in
n
.With the help of the floor
or ceiling function
(given
in
the
following
section
),you
should
be
able
to
come up with an exact
formula .(See the Exercises.)
Floor and
Ceiling Functions
Two other
examples of useful functions are the floor
and
ceiling
functions,
written
x
and
x
,
respectively,
which are
defined for all real
x
as follows:
x
the largest
integer less than or equal to
x
x
p>
the smallest
integer greater than or equal to
x
Thus,
if
x
2
.
7
2
and
2
.
7
3<
/p>
. Note that
x
x
if and only
is
an
integer,
in
which
case
the
value
of
both
of
these
functions
is
x
.
Note
the
following
for
integer
n
and real
x
:
p>
x
n
x
n
< br>
x
n
x
n
if
and only if
if and only if
if and only if
if and only
if
n
x
n
1
x<
/p>
1
n
x
n
1
x
n
x
n
x
1
,
,
,
.
x
Sometimes
we
call
the
floor
of
portion
of
x
and
< br>x
x
the
integer
the fractional portion of
x
. Note
that
the
truncation
function
available
in
most
programming languages (for instance,
the trunc function
in Pascal) is the
floor function.
Neither
the
floor
nor
the
ceiling
function
is
additive or multiplicative. That is,it
is not always the case