SOLUTION

In this case f is not a function. For many people have no brother (so the rule

makes no sense for them) and many people have several brothers (so the rule

is ambiguous for them).

EXAMPLE 1.23

Let S be the set of all people and T be the set of all strings of letters not

exceeding 1500 characters (including blank spaces). Let f be the rule that

assigns to each person his or her legal name. (Some people have rather

long names; according to the Guinness Book of World Records, the longest

has 1063 letters.) Determine whether f : S ’ T is a function.

SOLUTION

This f is a function because every person has one and only one legal name.

Notice that several people may have the same name (such as “JackArmstrong”),

but that is allowed in the de¬nition of function.

You Try It: Let f be the rule that assigns to each real number its cube root. Is this

a function?

In calculus, the set S (called the domain of the function) and the set T (called

the range of the function) will usually be sets of numbers; in fact they will often

consist of one or more intervals in R. The rule f will usually be given by one or

several formulas. Many times the domain and range will not be given explicitly.

These ideas will be illustrated in the examples below.

You Try It: Consider the rule that assigns to each real number its absolute value.

Is this a function? Why or why not? If it is a function, then what are its domain and

range?

1.8.1 EXAMPLES OF FUNCTIONS OF A REAL

VARIABLE

EXAMPLE 1.24

Let S = R, T = R, and let f (x) = x 2 . This is mathematical shorthand for

the rule “assign to each x ∈ S its square.” Determine whether f : R ’ R

is a function.

SOLUTION

We see that f is a function since it assigns to each element of S a unique

element of T ”namely its square.

32 CHAPTER 1 Basics

Math Note: Notice that, in the de¬nition of function, there is some imprecision

in the de¬nition of T . For instance, in Example 1.24, we could have let T = [0, ∞)

or T = (’6, ∞) with no signi¬cant change in the function. In the example of the

“name” function (Example 1.23), we could have let T be all strings of letters not

exceeding 5000 characters in length. Or we could have made it all strings without

regard to length. Likewise, in any of the examples we could make the set S smaller

and the function would still make sense.

It is frequently convenient not to describe S and T explicitly.

EXAMPLE 1.25

√

Let f (x) = + 1 ’ x 2 . Determine a domain and range for f which make

f a function.

SOLUTION

Notice that f makes sense for x ∈ [’1, 1] (we may not take the square root

of a negative number, so we cannot allow x > 1 or x < ’1). If we understand

f to have domain [’1, 1] and range R, then f : [’1, 1] ’ R is a function.

Math Note: When a function is given by a formula, as in Example 1.25, with no

statement about the domain, then the domain is understood to be the set of all x for

which the formula makes sense.

You Try It: Let

x

g(x) = .

x 2 + 4x + 3

What are the domain and range of this function?

EXAMPLE 1.26

Let

’3 if x ¤ 1

f (x) =

2x 2 if x > 1

Determine whether f is a function.

SOLUTION

Notice that f unambiguously assigns to each real number another real num-

ber. The rule is given in two pieces, but it is still a valid rule. Therefore it is

a function with domain equal to R and range equal to R. It is also perfectly

correct to take the range to be (’4, ∞), for example, since f only takes values

in this set.

Math Note: One point that you should learn from this example is that a function

may be speci¬ed by different formulas on different parts of the domain.

CHAPTER 1 Basics 33

You Try It: Does the expression

4 if x < 3

g(x) =

x2 ’ 7 if x ≥ 2

de¬ne a function? Why or why not?

EXAMPLE 1.27

√

Let f (x) = ± x. Discuss whether f is a function.

SOLUTION

This f can only make sense for x ≥ 0. But even then f is not a function

since it is ambiguous. For instance, it assigns to x = 1 both the numbers 1

and ’1.

1.8.2 GRAPHS OF FUNCTIONS

It is useful to be able to draw pictures which represent functions. These pictures,

or graphs, are a device for helping us to think about functions. In this book we will

only graph functions whose domains and ranges are subsets of the real numbers.

We graph functions in the x-y plane. The elements of the domain of a function

are thought of as points of the x-axis. The values of a function are measured on the

y-axis. The graph of f associates to x the unique y value that the function f assigns

to x. In other words, a point (x, y) lies on the graph of f if and only if y = f (x).

EXAMPLE 1.28

Let f (x) = (x 2 + 2)/(x ’ 1). Determine whether there are points of the

graph of f corresponding to x = 3, 4, and 1.

SOLUTION

The y value corresponding to x = 3 is y = f (3) = 11/2. Therefore the

point (3, 11/2) lies on the graph of f . Similarly, f (4) = 6 so that (4, 6) lies on

the graph. However, f is unde¬ned at x = 1, so there is no point on the graph

with x coordinate 1. The sketch in Fig. 1.38 was obtained by plotting several

points.

Math Note: Notice that for each x in the domain of the function there is one and

only one point on the graph”namely the unique point with y value equal to f (x).

If x is not in the domain of f , then there is no point on the graph that corresponds

to x.

EXAMPLE 1.29

Is the curve in Fig. 1.39 the graph of a function?

34 CHAPTER 1 Basics

Fig. 1.38

Fig. 1.39

SOLUTION

Observe that, corresponding to x = 3, for instance, there are two y values

on the curve. Therefore the curve cannot be the graph of a function.

You Try It: Graph the function y = x + |x|.

EXAMPLE 1.30

Is the curve in Fig. 1.40 the graph of a function?

CHAPTER 1 Basics 35

Fig. 1.40

SOLUTION

Notice that each x in the domain has just one y value corresponding to it.

Thus, even though we cannot give a formula for the function, the curve is the

graph of a function. The domain of this function is (’∞, 3) ∪ (5, 7).

Math Note: A nice, geometrical way to think about the condition that each x in

the domain has corresponding to it precisely one y value is this:

If every vertical line drawn through a curve intersects that curve just once,

then the curve is the graph of a function.

You Try It: Use the vertical line test to determine whether the locus x 2 + y 2 = 1

is the graph of a function.

1.8.3 PLOTTING THE GRAPH OF A FUNCTION

Until we learn some more sophisticated techniques, the basic method that we shall

use for graphing functions is to plot points and then to connect them in a plausible

manner.

EXAMPLE 1.31

Sketch the graph of f (x) = x 3 ’ x.

SOLUTION

We complete a table of values of the function f .

36 CHAPTER 1 Basics

x y = x3 ’ x

’3 ’24

’2 ’6

’1 0

0 0

1 0

2 6

3 24

We plot these points on a pair of axes and connect them in a reasonable way

(Fig. 1.41). Notice that the domain of f is all of R, so we extend the graph to

the edges of the picture.

EXAMPLE 1.32

Sketch the graph of

’1 if x ¤ 2

f (x) =

if x > 2

x

SOLUTION

We again start with a table of values.

x y = f (x)

’3 ’1

’2 ’1

’1 ’1

’1

0

’1

1

’1

2

3 3

4 4

5 5

We plot these on a pair of axes (Fig. 1.42).

Since the de¬nition of the function changes at x = 2, we would be mistaken

to connect these dots blindly. First notice that, for x ¤ 2, the function is

identically constant. Its graph is a horizontal line. For x > 2, the function is a

line of slope 1. Now we can sketch the graph accurately (Fig. 1.43).

√

You Try It: Sketch the graph of h(x) = |x| · 3 x.

CHAPTER 1 Basics 37

Fig. 1.41

EXAMPLE 1.33

√

Sketch the graph of f (x) = x +1.

SOLUTION

We begin by noticing that the domain of f , that is the values of x for which

the function makes sense, is {x: x ≥ ’1}. The square root is understood to

be the positive square root. Now we compute a table of values and plot some

points.

38 CHAPTER 1 Basics

y

x

Fig. 1.42

y

Y

FL

x

AM

Fig. 1.43

TE

√

x y= x+1

’1 0

0 1

√

1 √2

2 3

3 2

√

4 √5

5 √6

6 7

Connecting the points in a plausible way gives a sketch for the graph of f

(Fig. 1.44).

EXAMPLE 1.34

Sketch the graph of x = y 2 .

CHAPTER 1 Basics 39

Fig. 1.44

SOLUTION

The sketch in Fig. 1.45 is obtained by plotting points. This curve is not the

graph of a function.

Fig. 1.45

A curve that is the plot of an equation but which is not necessarily the graph

of a function is sometimes called the locus of the equation. When the curve is

the graph of a function we usually emphasize this fact by writing the equation

in the form y = f (x).

You Try It: Sketch the locus x = y 2 + y.

40 CHAPTER 1 Basics

1.8.4 COMPOSITION OF FUNCTIONS

Suppose that f and g are functions and that the domain of g contains the range of f .

This means that if x is in the domain of f then f (x) makes sense but also g may

be applied to f (x) (Fig. 1.46). The result of these two operations, one following

the other, is called g composed with f or the composition of g with f . We write

(g —¦ f )(x) = g(f (x)).

x f (x) g ( f (x))

Fig. 1.46

EXAMPLE 1.35

Let f (x) = x 2 ’ 1 and g(x) = 3x + 4. Calculate g —¦ f .

SOLUTION

We have

(g —¦ f )(x) = g(f (x)) = g(x 2 ’ 1). (—)

Notice that we have started to work inside the parentheses: the ¬rst step was

to substitute the de¬nition of f , namely x 2 ’ 1, into our equation.

Now the de¬nition of g says that we take g of any argument by multiplying

that argument by 3 and then adding 4. In the present case we are applying g to

x 2 ’ 1. Therefore the right side of equation (—) equals

3 · (x 2 ’ 1) + 4.

This easily simpli¬es to 3x 2 + 1. In conclusion,

g —¦ f (x) = 3x 2 + 1.

EXAMPLE 1.36

Let f (t) = (t 2 ’ 2 )/(t + 1 ) and g(t) = 2t + 1. Calculate g —¦ f and f —¦ g.

SOLUTION

We calculate that

t2 ’ 2

(g —¦ f )(t) = g(f (t)) = g (——)

.

t +1

CHAPTER 1 Basics 41

We compute g of any argument by doubling it and adding 1. Thus equation

(——) equals

t2 ’ 2

+1

2

t +1

2t 2 ’ 4

= +1

t +1

2t 2 + t ’ 3

= .

t +1

One of the main points of this example is to see that f —¦ g is different from

g —¦ f . We compute f —¦ g:

(f —¦ g)(t) = f (g(t))

= f (2t + 1)

(2t + 1)2 ’ 2

=

(2t + 1) + 1

4t 2 + 4t ’ 1

= .

2t + 2

So f —¦ g and g —¦ f are different functions.

√

You Try It: Let f (x) = |x| and g(x) = x/x. Calculate f —¦ g(x) and g —¦ f (x).

We say a few words about recognizing compositions of functions.

EXAMPLE 1.37

How can we write the function k(x) = (2x + 3)2 as the composition of two

functions g and f ?

SOLUTION

Notice that the function k can be thought of as two operations applied in

sequence. First we double and add three, then we square. Thus de¬ne f (x) =

2x + 3 and g(x) = x 2 . Then k(x) = (g —¦ f )(x).

We can also compose three (or more) functions: De¬ne

(h —¦ g —¦ f )(x) = h(g(f (x))).

EXAMPLE 1.38

Write the function k from the last example as the composition of three

functions (instead of just two).

42 CHAPTER 1 Basics

SOLUTION

First we double, then we add 3, then we square. So let f (x) = 2x, g(x) =

x + 3, h(x) = x 2 . Then k(x) = (h —¦ g —¦ f )(x).

EXAMPLE 1.39

Write the function

2

r(t) =

t2 + 3

as the composition of two functions.

SOLUTION

First we square t and add 3, then we divide 2 by the quantity just obtained.As a