Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… ·...

52
Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014 These notes were developed by professor Ken W. Smith for MATH 1410 sections at Sam Houston State University, Huntsville, TX. This material was covered in six 80-minute class lectures at Sam Houston in Summer 2013. (Sections 1.0 and 1.1 were combined in one lecture since 1.0 is a brief review.) In addition to these class notes, there is a slide presentation version of these notes and a set of Worksheets. All of these are available on Blackboard. Contents 1 Functions and Polynomials 3 1.0 Algebra excellence ........................................ 3 1.0.1 Exponential notation – merely an abbreviation! .................... 3 1.0.2 Kilobytes and powers of ten (an application to computer science) .......... 4 1.0.3 Polynomial arithmetic: a review of A 2 - B 2 and other basic factoring ....... 5 1.0.4 Simplifying complicated fractions ............................ 6 1.0.5 Other resources for algebra review ........................... 7 1.1 An introduction to functions .................................. 8 1.1.1 The function machine .................................. 8 1.1.2 Functions as ordered pairs ................................ 10 1.1.3 Functions defined by equations ............................. 12 1.1.4 The domain of a function ................................ 14 1.1.5 Other resources for functions and function notation ................. 15 1.2 Graphs of functions ........................................ 17 1.2.1 Using ordered pairs to draw functions ......................... 17 1.2.2 Intercepts of the graph of a function .......................... 19 1.2.3 Intervals in which the function rises or falls ...................... 21 1.2.4 The vertical line test definition of a function ..................... 22 1.2.5 Piecewise functions .................................... 22 1.2.6 Other resources for graphing functions ......................... 26 1.3 Transformations of functions .................................. 27 1.3.1 Vertical shifts ....................................... 27 1.3.2 Horizontal shifts ..................................... 28 1.3.3 Vertical expansions .................................... 29 1.3.4 Horizontal expansions .................................. 29 1.3.5 Combining these expansions ............................... 30 1.3.6 Resources for function transformations ......................... 33 1.4 Symmetries of functions ..................................... 34 1.4.1 Even and odd functions ................................. 34 1.4.2 Periodic functions .................................... 37 1.4.3 The greatest integer function and other interesting examples ............ 38 1.4.4 Resources for function symmetries ........................... 39 1.5 Function composition ...................................... 41 1.5.1 The algebra of functions ................................. 41 1.5.2 Composing two functions ................................ 41 1.5.3 Order is important! (f g 6= g f !) ........................... 43 1.5.4 Chaining functions together ............................... 44 1.5.5 Resources for the composition of functions ....................... 45 1

Transcript of Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… ·...

Page 1: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Elementary Functions

Chapter 1, Functionsc© Ken W. Smith, 2013

Version 1.3, January 8, 2014

These notes were developed by professor Ken W. Smith for MATH 1410 sections at Sam Houston StateUniversity, Huntsville, TX. This material was covered in six 80-minute class lectures at Sam Houston inSummer 2013. (Sections 1.0 and 1.1 were combined in one lecture since 1.0 is a brief review.)

In addition to these class notes, there is a slide presentation version of these notes and a set ofWorksheets. All of these are available on Blackboard.

Contents

1 Functions and Polynomials 31.0 Algebra excellence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.0.1 Exponential notation – merely an abbreviation! . . . . . . . . . . . . . . . . . . . . 31.0.2 Kilobytes and powers of ten (an application to computer science) . . . . . . . . . . 41.0.3 Polynomial arithmetic: a review of A2 −B2 and other basic factoring . . . . . . . 51.0.4 Simplifying complicated fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.0.5 Other resources for algebra review . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.1 An introduction to functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.1.1 The function machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.1.2 Functions as ordered pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.1.3 Functions defined by equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.1.4 The domain of a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.1.5 Other resources for functions and function notation . . . . . . . . . . . . . . . . . 15

1.2 Graphs of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171.2.1 Using ordered pairs to draw functions . . . . . . . . . . . . . . . . . . . . . . . . . 171.2.2 Intercepts of the graph of a function . . . . . . . . . . . . . . . . . . . . . . . . . . 191.2.3 Intervals in which the function rises or falls . . . . . . . . . . . . . . . . . . . . . . 211.2.4 The vertical line test definition of a function . . . . . . . . . . . . . . . . . . . . . 221.2.5 Piecewise functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221.2.6 Other resources for graphing functions . . . . . . . . . . . . . . . . . . . . . . . . . 26

1.3 Transformations of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271.3.1 Vertical shifts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271.3.2 Horizontal shifts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281.3.3 Vertical expansions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291.3.4 Horizontal expansions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291.3.5 Combining these expansions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301.3.6 Resources for function transformations . . . . . . . . . . . . . . . . . . . . . . . . . 33

1.4 Symmetries of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341.4.1 Even and odd functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341.4.2 Periodic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371.4.3 The greatest integer function and other interesting examples . . . . . . . . . . . . 381.4.4 Resources for function symmetries . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

1.5 Function composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411.5.1 The algebra of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411.5.2 Composing two functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411.5.3 Order is important! (f ◦ g 6= g ◦ f !) . . . . . . . . . . . . . . . . . . . . . . . . . . . 431.5.4 Chaining functions together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441.5.5 Resources for the composition of functions . . . . . . . . . . . . . . . . . . . . . . . 45

1

Page 2: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.6 Inverse functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461.6.1 The concept of inverse function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461.6.2 Changing the domain in order to create an inverse function. . . . . . . . . . . . . . 471.6.3 Finding the inverse of a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481.6.4 The geometric meaning of inverse (and the horizontal line test) . . . . . . . . . . . 501.6.5 The mathematical meaning of “inverse” . . . . . . . . . . . . . . . . . . . . . . . . 501.6.6 Requirements for the existence of an inverse function* . . . . . . . . . . . . . . . . 511.6.7 Resources for inverse functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

2

Page 3: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1 Functions and Polynomials

1.0 Algebra excellence

Before we study the elementary functions of science and calculus, we need some comfort with algebra.In this brief lecture we review two important ideas: (1) computations using exponential notation and

(2) operations of polynomial arithmetic. These are two major algebra computations we will do throughoutthis class (and scientists will use throughout their careers!)

This review is brief and is not intended to be comprehensive. Our precalculus class will assume thatstudents are comfortable with most of the major concepts of elementary and intermediate algebra andwe will not, in general, review those concepts in this class.

1.0.1 Exponential notation – merely an abbreviation!

We abbreviate x ·x ·x by x3. This notation (merely an abbreviation!) quickly leads to some rules on howone should treat exponents. For example, since

x3 · x2 = (x · x · x) · (x · x) = x5

then when we multiply objects with the same base (x) we should add the exponents:

xmxn = xm+n. (1)

Similarly,x3

x2=x · x · xx · x

=x

1

x

x

x

x= x,

so when we divide objects with the same base (x) we should subtract the exponents:

xm

xn= xm−n. (2)

What if we use exponents in sequence, that is, we raise x to a power and then raise that result to asecond power? For example,

(x3)2 = (x · x · x)2 = (x · x · x)(x · x · x) = x · x · x · x · x · x = x6.

Here our “abbreviation” leads us to multiplying exponents. We may generalize from this that

(xm)n = xmn. (3)

Repeated exponentiation leads to multiplying exponents.

Our understanding of the exponent “abbreviation” has quickly led us to three natural rules aboutmanipulating exponents. These algebra “rules” are merely the effects of the algebraic symbolism.

There are other effects of our algebraic symbolism. Once we get used to the impact of this notation,we see that since multiplying by 1 leaves a number unchanged and since multiplication by x0 also leavesa number unchanged (xnx0 = xn+0 = xn) then 1 and x0 must be the same:

x0 = 1. (4)

3

Page 4: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

We can extend our exponent notation to rational exponents. Since

(x12 )2 = x

12 ·2 = x1 = x

and since(√x)2 = x

then x12 must represent

√x. More generally, denominators in exponents represent roots:

x1q = q√x. (5)

Some examples. First we practice our understanding of exponentiation:

1. Simplify 823 .

We solve this by recognizing that the fractional exponent 23 represents (1

3 )(2), so we will take acube root (that is the meaning of the exponent 1

3 ) and then we will square the result.

Solution.8

23 = (81/3)2 = (

3√

8)2 = 22 = 4.

Here is another, similar example.

2. Simplify 432 .

Solution.4

32 = (41/2)3 = (

√4)3 = 23 = 8

1.0.2 Kilobytes and powers of ten (an application to computer science)

Here is an application appearing in a number of computer science computations. We note that 210 = 1024while 1000 = 103. The computer scientist works with computer registers which use bits (zeroes and ones)and so storage and memory are measured in powers of two. (We say that computer science computationsare done in base two.) Yet the language of computer science is often based on our traditional powersof ten, where Greek prefixes such as kilo- represent a thousand, mega- represents a million and giga- abillion.

However, to a computer scientist, the prefix kilo- really represents 210, not 103. A kilobyte is 210 = 1024bytes; a gigabyte is 230 bytes.

Let us approximate 230 as a power of ten: Since 230 = (210)3 and since we approximate 210 or 103

then230 = (210)3 ≈ (103)3 = 109.

Exercise. How many digits are there in 2300?

Solution. Write 2300 = (210)30 ≈ (103)30 = 1090. Now 1090 = 1× 1090 is 1 followed by 90 zeroes so

1090 has 91 digits. Therefore 2300 should have 91 digits.

(A detour to WolframAlpha and a quick computation indeed gives

2300 = 2037035976334486086268445688409378161051468393665936250636140449354381299763336706183397376

You can check that this has 91 digits! But since 210 > 103, it turns out that 2300 is more closelyapproximated by 2× 1090 than 1× 1090 .)

4

Page 5: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Practice. Here are some sample problems from an old precalculus quiz.

Simplify the following expressions:

1.3√x6√x2

2.(x6)

13 x−2

x4

Solutions.

1. We follow the meaning of the exponent, rewriting expressions such as3√x6 as x2 since (x2)3 = x6.

So3√x6√x2

=x2

x= x.

2. We first simplify the numerator, noting that (x6)13 = x2 and x2x−2 =

x2

x2= 1. So

(x6)13 x−2

x4=x2x−2

x4=

1

x4or x−4

1.0.3 Polynomial arithmetic: a review of A2 −B2 and other basic factoring

There are some basic polynomial expansion concepts that will appear throughout precalculus, calculus,and computations in the sciences. For example, at one point we learned to use the distributive law toexpand (“FOIL”) expressions like:

(x+ 5)(x− 3) = x2 − 3x+ 5x− 15 = x2 + 2x− 15

and then to factor expressions like x2 + 2x− 15 by reversing this process.

If we expand the expression (A + B)2 = (A + B)(A + B) we discover, in addition to the obvioussquares A2 and B2 the “cross term” 2AB. However, if instead we expand (A + B)(A − B) we obtainA2 − B2; the cross term involved both AB and −AB and these cancelled out. We will use these basicpatterns repeatedly in this course:

(A+B)2 = A2 + 2AB +B2 (6)

and(A+B)(A−B) = A2 −B2 (7)

In the first case (equation 6), notice the existence of a middle term caused by our polynomial expansion.Don’t make the “freshman” mistake of thinking that (A+B)2 is just the sum of the squares of A and B!

In the second case (equation 7), we see that the difference of two squares nicely factors into theproduct of the sum and difference of the elements.

Examples. Here are some other simplification problems. Each involves factoring of some type. Noticethat the expression we are factoring in problems 2 and 3 have the same pattern as problem 1; recognizingthat pattern leads us to our solution.

Simplify:

5

Page 6: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.x2 − 9

x+ 3

2.x4 − 9

x2 + 3

3.x− 9√x+ 3

Solutions.

1.x2 − 9

x+ 3=

(x− 3)(x+ 3)

x+ 3= x− 3.

2.x4 − 9

x2 + 3=

(x2 − 3)(x2 + 3)

x2 + 3= x2 − 3.

3.x− 9√x+ 3

=(√x)− 3)(

√x+ 3)√

x+ 3=√x− 3.

1.0.4 Simplifying complicated fractions

Once we learn these abbreviations that we call “exponentiation”, we can often use polynomial arithmetic(factoring polynomials) to simplify an expression.

For example, we may need to simplify a complex fraction such as

2x3 + x2

x4÷ 1

x2=

2x3 + x2

x41

x2

.

Recall that dividing by1

x2is the same as multiplying by x2 so

2x3+x2

x4

1x2

= (2x3 + x2

x4)(x2) =

2x3 + x2

x2

We factor the numerator and simplify.

x2(2x+ 1)

x2= (

x2

x2)(2x+ 1) = 1(2x+ 1) = 2x+ 1.

A Worked Problem. Simplify2x3 + x2

x4

Solution. Factor the numerator: 2x3 + x2 = x2(2x+ 1). Then simplifyx2

x4=

1

x2. So

2x3 + x2

x4=x2(2x+ 1)

x4=

2x+ 1

x2.

To succeed in calculus, we need comfort with these algebra techniques. Practice these techniques through-out the semester, so that you can indeed be comfortable with your algebra!

6

Page 7: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.0.5 Other resources for algebra review

The material in this section is review material in a precalculus class and is usually not explicitly coveredin a textbook.

In the textbook by Ratti & McWaters, Precalculus, A Unit Circle Approach, 2nd ed., c. 2014,here at Amazon.com this material appears in appendices A.1, A.3, A.4. In the textbook by Stewart,Precalculus, Mathematics for Calculus, 6th ed., c. 2012, (here at Amazon.com) this material appearsin sections 1.2, 1.3 and 1.4. (In July 2013 the first textbook was $147 at Amazon.com and the secondtextbook was $136 at Amazon.com They are even more expensive in campus bookstores.)

There are lots of online resources for reviewing algebra. Here are additional sets of resources, inaddition to the class notes and class presentations.

1. Dr. Paul’s Dawkins’ webpage of algebra notes (Dr. Dawkins is a professor at Lamar University.)There is good review material at

(a) integer exponents and

(b) rational exponents and

(c) radicals.

2. There are some nice algebra videos from Khan Academy. Khan Academy is a good place to reviewyour algebra!

3. The textbook at Understanding Algebra by James Brennan is free and available online.

Homework.As class homework, please complete Worksheet 1.0A, Algebra Excellence, available through the

class webpage or Blackboard.

7

Page 8: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.1 An introduction to functions

We study the most fundamental concept in mathematics, that of a function.In this lecture we first define a function and then examine the domain of functions defined as equations

involving real numbers.

1.1.1 The function machine

Functions are the most important concepts in mathematics. In this class we will study the so-called“elementary” functions. To understand the elementary (most common) functions in mathematics, weneed to first understand functions and function notation.

Definition of a function and function notation.A function f from a set X to a set Y assigns to each element of X an element of Y . We could write

f : a 7→ b

to indicate that f sends a to b. But the most common notation (and the notation we will use) is

f(a) = b.

This notation means that when the input a is inserted into the function f , the output is b.

Some people picture a function as a machine, dropping x-values into one end of the machine andpicking up y-values at the other end. Here is a picture from Wikipedia:

Figure 1. The function machine(from Wikipedia, author Wybailey, available under the Creative Commons license.)

The set X of inputs is called the domain of the function f . The set Y of all conceivable outputs isthe codomain of the function f . The set of all outputs is the range of f . The range is a subset of Y .

The most important criteria for a function is this:

A function must assign to each input a unique output.

We cannot allow several different outputs to correspond to an input.

8

Page 9: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Here (from Wikipedia) is an example of a function from a set X to the set Y . The function maps 1to D, 2 to C and 3 to C. Note that each element of X has a unique output in Y . (The function is notnamed here.)

Figure 2. A function

However the map below is not a function. Some items in X are not mapped anywhere; worse, theitem 2 has two outputs, both B and C.

Figure 3. Not a function(Figures 2 and 3 are from Wikipedia, author Bin im Garten, available under the Creative Commons license.)

Functions occur naturally in our world. When we pull out an attribute of an object, we are essentiallycreating a function. (We can maps elements to elements, they do not need to be numbers!) For example,the set X below has polygons with various colors. The question, “What is the color of a polygon?” couldbe viewed as a function that maps to polygons to colors.

9

Page 10: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Figure 4. The function “color”(from Wikipedia, author Wybailey, available under the Creative Commons license.)

In this example, the function from the set X to the set Y maps the four polygonal shapes in X to theircolor. We might name this function “color”, so, for example,

color(yellow rectangle) = yellow

Functions occur throughout our modern technological society. Every US citizen is assigned a socialsecurity number. The social security number could be viewed as a function SSN mapping US citizensto nine digit numbers. If this is to truly be a function then for each input (a US citizen) there must bea unique output. We don’t want anyone to have two (or more) social security numbers or there will beconfusion about their identity (and worse – from the government’s point of view – confusion about theirwages and taxes!)

In a similar way, at Sam Houston State University, all students and staff (current and past) areassigned a Sam ID. This is (as of 2013) a nine-digit number which begins with three zeroes. We can viewthis as a function SamID, mapping students/staff to nine digit numbers. For example,

SamID(Ken W Smith) = 000354765.

This function exists so that data about students/staff (classes, grades, salary, etc.) can be kept in acomputer database, tracked by a single number.

1.1.2 Functions as ordered pairs

A function maps elements of a domain D into a codomain C. Although functions in science are oftendefined by equations, they do not have to be. (The SamID function is not defined by an equation.)

In the most general form, a function is a collection of ordered pairs satisfying certain requirements.For example, we might consider the sets D := {1, a, b, z, orange} and C := {r, s, t, u, v, 1000}. We couldcreate a function f by assigning to each member of D a member of C. For example:

input output

1 ra sb rz 1000

orange 1000

This is a function: the domain is clearly the elements of D and each element of D has a unique output!

10

Page 11: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Notice that not all elements of the codomain appear as outputs and that some of them occur asoutputs more than once. That is fine; the restrictions in the definition of function focus primarily on thedomain D.

If the domain is finite, we may define a function by a table (as above) or by a list of ordered pairs (theentries in the table.) For example, we can restate the function f above by writing f as a set of orderedpairs:

f = {(1, r), (a, s), (b, r), (z, 1000), (orange, 1000)}

The range of a function is the collection of outputs of the function. This is a subset of the codomain.Although the codomain of the function above is the set C = {r, s, t, u, v, 1000}, the range of the functionf defined above is {r, s, 1000}. (Think of the codomain as the collection of potential outputs and therange as the collection of true outputs.)

Worked Exercise. Consider the function with domain D = {−2,−1, 0, 1, 2}, codomain the real numbersR, defined by the formula g(x) = x2.

1. Display the function g in tabular form,

and

2. Display the function g as a set of ordered pairs.

3. Give the range of the function g.

Solution.

1. As a table, we can write out the function g as

x g(x)

−2 4−1 10 01 12 4

2. As a set of order pairs,g = {(−2, 4), (−1, 1), (0, 0), (1, 1), (2, 4)}

3. The range of the function g is {0, 1, 4}.

Another example.Consider the function defined in figure 2, earlier.

11

Page 12: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Write this function in both tabular form and as a set of ordered pairs.

Solution. In tabular form we have:

X Y

1 D2 C3 C

As ordered pairs, the function is the set

{(1, D), (2, C), (3, C)}.

1.1.3 Functions defined by equations

Most of the functions that we will explore in mathematics and science are defined by some equation. Forexample, consider the function f : R → R defined by mapping a real number to the number that is onemore than its square, that is

f(x) = x2 + 1.

This function maps real numbers (the set R) to real numbers and so the domain of f is R and thecodomain of f is R. However, the range of f is the set of all real numbers greater than or equal to 1.

In interval notation,the domain of f is (−∞,∞) and the range is [1,∞.).

We can often define a function implicitly in an equation involving two variables. Traditionally we usethe letter x for the input variable and the letter y for the output variable. The equation x2 − y = −1defines the function f(x) = x2 + 1 discussed above.

As another example, consider the linear equation

2x+ 3y − 4 = 0.

This equation can be viewed as defining a function with inputs x and outputs y. From this viewpoint,we can solve for y and get

3y = 4− 2x

and so

y =1

3(4− 2x).

We might then explicitly define the function

f(x) =1

3(4− 2x).

Note that our choice of x as input and y as output was somewhat arbitrary. We could have decided(contrary to custom!) that y is the input and x is the output. Then, solving for x, we have

2x = 4− 3y

so

x =1

2(4− 3y)

and so we can create the function x = g(y) (with input y and output x!)

g(y) =1

2(4− 3y).

12

Page 13: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Some worked exercises.

1. Does the equation x2y = 4 define y as a function of x? (If it does, give the domain of the impliedfunction.)

Solution. We attempt to solve for y. We may multiply both sides of the equation by1

x2as long

as x is not zero. This gives us y =4

x2. Is there a problem with x = 0? No, x = 0 does not allow

x2y = 4, so x will never be zero in this equation.

YES; y =4

x2.

The domain of this function is all real numbers except zero. In interval notation this is (−∞, 0) ∪(0,∞).

2. Does the equation xy2 = 4 define y as a function of x?

Solution. If we attempt to solve for y, we multiply both sides of the equation by1

x(as long as

x 6= 0) and so we have y2 =4

x. But now, what is y? y could be positive or negative – there will

generally be two choices here.

NO; for example, if x = 1 then we don’t know if y = 2 or y = −2.

3. Does the equation x2y = 0 define y as a function of x? (Why/why not?)

Solution. Although it might be tempting to solve for y, first notice that if x is zero then y couldbe 0 or 1 or 2.71828 or anything! So the input x = 0 does not give a unique output. This is not afunction.

NO; if x = 0 then y could be anything.

(Note how this is different than problem 1. In problem 1, x = 0 is not a possible input in theequation. But here x = 0 is a possibility for a solution to the equation!)

More examples.Let us practice the function notation, f(x). A formula for f(x) tells us how the input x leads to the

output f(x). For example, suppose f(x) = x2 − 9. Compute:

1. f(0),

2. f(1),

3. f(−1),

4. f(−5),

5. f(−x)

6. f(x+ h),

7. f(√x),

8. f(2a+ 1),

9. −f(x) + 2

Solutions. If f(x) = x2 − 9 then

13

Page 14: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1. f(0) = 02 − 9 = −9 .

2. f(1) = (1)2 − 9 = 1− 9 = −8 .

3. f(−1) = (−1)2 − 9 = 1− 9 = −8 .

4. f(−5) = (−5)2 − 9 = 25− 9 = 16 .

5. f(−x) = (−x)2 − 9 = x2 − 9 .

6. f(x+ h) = (x+ h)2 − 9 = (x2 + 2xh+ h2)− 9 = x2 + 2xh+ h2 − 9 ,

7. f(√x) = x− 9 ,

8. f(2a+ 1) = (2a+ 1)2 − 9 = (4a2 + 4a+ 1)− 9 = 4a2 + 4a− 8 ,

9. −f(x) + 2 = −(x2 − 9) + 2 = −x2 + 11 .

1.1.4 The domain of a function

The domain of a function is generally viewed as the largest possible set of inputs into the function.For example, the domain of the function f(x) =

√x is all real numbers greater than or equal to

zero. In interval notation we write [0,∞). Note that we cannot evaluate f(x) at negative numbers (if weassume we are always working with real numbers.)

We often need to find the domain of a function and if the inputs are real numbers, express the domainin interval notation. When we do this, it is often easier to ask the question, “What is not in the domain?”.For example, in the square root function, f(x) =

√x we might ask the question, “Which numbers do not

have a square root?” Since the square of a real number cannot be negative, then our answer is “We cannottake the square root of negative numbers.” So the domain must be numbers which are not negative, thatis, zero and positive real numbers. So the domain of f(x) =

√x is [0,∞). (We can indeed take the square

root of 0 so we want to include 0 in the domain.)

Example. Find the domain of the function g(x) =1

x+ 2+

2x− 3

2x+ 1+ x− 5.

Solution. What numbers cannot serve as input to g(x)? Since we cannot have denominators equal tozero then x = −2 cannot be an input; neither can x = − 1

2 . So the domain of this function g is all realnumbers except x = −2 and x = − 1

2 .There are several ways to write the domain of g. Using set notation, we could write the domain as

{x ∈ R : x 6= −2,−1

2}.

This is a precise symbolic way to say, “All real numbers except −2 and − 12 .”

We could also write the domain in interval notation:

(∞,−2) ∪ (−2,−1

2) ∪ (−1

2,∞).

This notation says that the domain includes all the real numbers smaller than −2, along with all the realnumbers between −2 and − 1

2 , along with (in addition) the real numbers larger than − 12 .

14

Page 15: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Some worked exercises.

1. Find the domain of the function f(x) =√

2− xSolution. Since the square root function requires nonnegative inputs, we must have 2 − x ≥ 0.Add x to both sides of the inequality to get 2 ≥ x. In interval notation this is (−∞, 2].

Answer: The domain is (−∞, 2].

2. Find the domain of the function f(x) =√x− 1

Solution. Since the square root function requires nonnegative inputs, we must have x− 1 ≥ 0. Ifwe add 1 to both sides of the inequality we have x ≥ 1.

Answer: The domain is [1,∞).

3. Find the domain of the function f(x) =

√x− 1

x− 3

Solution. Again, as in the previous problem, we must have x ≥ 1 but we must also prevent thedenominator from being zero, so x cannot be 3, either.

Answer: The domain is [1, 3) ∪ (3,∞).

4. Find the domain of the function f(x) =

√x− 1

x2 − 6x+ 8

Solution. We must have x ≥ 1 and we must prevent the denominator from being zero. Thedenominator factors as x2 − 6x + 8 = (x − 2)(x − 4), so x cannot be 2 or 4. So our answer isall real numbers at least as big as 1 and not equal to 2 or 4. In interval notation, our answer is:

The domain is [1, 2) ∪ (2, 4) ∪ (4,∞.)

1.1.5 Other resources for functions and function notation

In the free textbook, Precalculus, by Stitz and Zeager (version 3, July 2011, available at stitz-zeager.com)this material is covered in sections 1.3-1.5. Other textbook resources on function definitions are:

1. In the free textbook, Precalculus, An Investigation of Functions, by Lippman and Rassmussen(Edition 1.3, available at www.opentextbookstore.com) this material is covered in sections 1.1-1.2.

2. In the textbook by Ratti & McWaters, Precalculus, A Unit Circle Approach, 2nd ed., c. 2014,here at Amazon.com this material appears in section 1.3. In the textbook by Stewart, Precalculus,Mathematics for Calculus, 6th ed., c. 2012, (here at Amazon.com) this material appears in section2.1. (In July 2013 the first textbook was $147 at Amazon.com and the second textbook was $136at Amazon.com They are even more expensive in campus bookstores.)

There are lots of online resources for studying the basic function concepts. Here are some I recommend.

1. Khan Academy videos on functions

2. Dr. Paul Dawkins’ notes on the definition of a function

3. Wikipedia’s explanation of functions.

4. This video at Education Portal

5. A Math Insight video about the “function machine” is here; check out Meat-a-morphosis, here.

15

Page 16: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Homework.As class homework, please complete Worksheet 1.1A, Definition of a function, available through

the class webpage or on Blackboard.

16

Page 17: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.2 Graphs of functions

1.2.1 Using ordered pairs to draw functions

If we describe our function using an equation y = f(x) with inputs x and outputs y, then we may viewthe inputs, x, as elements of a horizontal line in the plane and record outputs y on a vertical line. Thegraph of a function in the Cartesian plane is the set of values (x, f(x)).

Combining functions with the geometry of the plane gives us a nice visual way to see and understanda function. This idea was first introduced in the 17th century by (among others) Rene Descartes and sothe plane in which we draw our graph is called the Cartesian plane.

We graph the function f with x values increasing along a horizontal axis and y values increasing alonga vertical axis. It is customary to draw the x-axis along the horizontal line where y = 0 and draw they-axis along the vertical line where x = 0.

Most graphs of functions y = f(x) can be sketched by creating a table of values (x, y) and thenmaking some reasonable assumptions as to how these points should be connected. For example, considerthe function f(x) = x2. We can create a table of values. (Notice that we input some values which are notintegers!)

x f(x)

−2 4−1 1−0.5 0.25

0 00.5 0.251 12 4

We can then plot the points (−2, 4), (−1, 1), (−0.5, 0.25), ... on the Cartesian plane and use these pointsto guide us on filling in the rest of the curve. Of course modern software (and graphing calculators) cando this for us, plotting hundreds of points and connecting the dots....

Figure 5. The graph of the function f(x) = x2

(created by the author, using Sage.)

17

Page 18: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Some worked examples.For each function, create a table of values (with at least 5 points, where at least one of which does

not have integer value for x) and then graph the function.

1. f(x) = x3 − x

2. f(x) = |x|.

3. f(x) = 3√x

Solutions. (The graphs in this section were generated by the author using Sage.)

1. Here is a table of a few values for the function f(x) = x3 − x

x f(x) = x3 − x

−2 −6−1 0

−0.5 −0.6250 0

1 0

2 6

If we connect the dots, we should get something like this:

2. Here is a table of values for the function f(x) = |x|.

x f(x) = |x|−2 2

−1 1

−0.5 0.5

0 0

1 1

2 2

If we connect the dots, we should get something like this:

18

Page 19: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

3. Here is a table of values for the function f(x) = 3√x

x f(x) = 3√x

−8 −2−1 −1− 1

8− 1

2

0 0

1 1

8 2

If we connect the dots, we should get something like this:

1.2.2 Intercepts of the graph of a function

An x-intercept is a place where the graph touches the x-axis, that is, where y = 0. A y-intercept is aplace where x = 0 so that the function has a point on the y-axis. Given an equation for a function f(x),it is easy to determine the y-intercept: simply compute f(0).

It can be harder to find the x-intercepts of the function since we are seeking to solve the equationf(x) = 0 for x-values. Here are some examples of how one might approach this problem.

19

Page 20: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Examples.Find the intercepts of the following functions

1. f(x) = x2 − 2x− 3.

2. g(x) =(x+ 1)(x2 − 6x+ 8)

x+ 2.

3. h(x) =1

x+ 2+

2x− 3

2x+ 1+ x− 5.

Solutions.

1. f(x) = x2−2x−3 has y-intercept (0,−3) since f(0) = −3. To find the x-intercepts of the function,we need to solve the equation 0 = x2 − 2x − 3. We may factor x2 − 2x − 3 = (x − 3)(x + 1) andsolve 0 = (x− 3)(x+ 1). The product of two expressions is zero if and only if one of the expressionsis zero so either 0 = x− 3 or 0 = x+ 1. Thus the x-intercepts occur where x = 3 or x = −1. So thex-intercepts are (−1, 0) and (3, 0).

2. The function g(x) is a “rational function”, that is, a ratio of two polynomials. We should take amoment and consider the denominator of this function. The denominator is zero when x = −2 andso the function g(x) is undefined at x = −2. x = −2 cannot then give us any point on the graph,much less an intercept.

To find the y-intercept of g(x) =(x+ 1)(x2 − 6x+ 8)

x+ 2, merely plug in 0: g(0) =

(1)(8)

2= 4 so the

y-intercept is (0, 4).

To find the x-intercept of g(x) =(x+ 1)(x2 − 6x+ 8)

x+ 2, we set the function equal to zero and solve:

0 =(x+ 1)(x2 − 6x+ 8)

x+ 2.

Multiply both sides by the numerator x+ 2

0 = (x+ 1)(x2 − 6x+ 8)

and factor the expression on the right:

0 = (x+ 1)(x− 2)(x− 4)

The expression on the right is zero whenever any of its terms are zero, so the x-intercepts are(−1, 0), (2, 0) and (4, 0).

3. The y intercepts of the function h(x) = 1x+2 + 2x−3

2x+1 + x− 5 occur where x = 0 so

y =1

0 + 2+

0− 3

0 + 1+ 0− 5 =

1

2− 3− 5 = −15

2.

Thus the y-intercept is (0,−15

2).

The x-intercept is where y = 0 so we examine the equation

0 =1

x+ 2+

2x− 3

2x+ 1+ x− 5

and solve for x.

20

Page 21: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Multiply both sides by the denominators x+ 2 and 2x+ 1 to clear denominators and we have

0 = (2x+ 1) + (x+ 2)(2x− 3) + (x+ 2)(2x+ 1)(x− 5).

Expanding this out and simplifying, we have

0 = (2x+ 1) + (2x2 + x− 6) + (2x3 − 5x2 − 23x− 10)

so0 = 2x3 − 3x2 − 20x− 15.

A graphing calculator helps us find that x = −1 is one of the solutions to this equation; there aretwo more solutions which are a bit more complicated, involving the quadratic formula; these are1

4(5± 3

√5). We will look more at this problem later.

1.2.3 Intervals in which the function rises or falls

A variety of applications in science require that we understand the intervals where a function is risingor falling and that we be able to compute the local minimums and locals maximums of a function. Wewill want to know the x values for which f(x) is as large as possible (in some specific region) or wheref(x) is as small as possible. Later, in calculus, we will find a universal approach to this very importantproblem, but at this stage, we are content to draw graphs and find minimums and maximums visually.

Example.Consider the function f(x) = x4 − 8x2 with graph given below:

Figure 6. The graph of the quartic polynomial f(x) = x4 − 8x2.

Where is this function increasing? Where is it decreasing? What are the low points on the curve (localminimums)? What are the high points on the curve (local maximums)?

From the picture we can see that the function drops to the point (−2,−16), rises to the origin (0, 0),drops again to the point (2,−16) and then rises after that. So the function is decreasing for x-values inthe region (−∞,−2) ∪ (0, 2), and rising in the region (−2, 0) ∪ (2,∞).

The local minimums are (−2,−16) and (2,−16); a local maximum occurs at the point (0, 0).

21

Page 22: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.2.4 The vertical line test definition of a function

In the definition of function, we require that a function have a unique output for each input. Thegeometric version of this requirement is the “vertical line test”. The points in the plane corresponding toa fixed x-value form a vertical line. For example, the line x = 3 is a vertical line consisting of all pointsof the form (3, y) for any value of y.

If our graph is the graph of a function then each vertical line will touch the graph in exactly onepoint, at the y value y = f(x). So to see if our graph is the graph of a function, draw vertical lines andsee if these lines intersect the graph exactly once.

In the image below (figure 7), a vertical line (in yellow) corresponding to a particular x-value hits thecurve at exactly one point. This should be true for all the elements in the domain of the function.

Figure 7. The vertical line test(from Wikipedia, author Wybailey, available under the Creative Commons license.)

1.2.5 Piecewise functions

Functions need not be described by an equation. Some, like the function “color” described in section 1.1,will not involve equations at all.

Other functions can be described, not by a single formula, but by a collection of them. Many functionsinvolve jumps of some type, or different formulas depending upon various subsets of the domain. Apiecewise function is a function which is described for “pieces” of the real line. It will obey one rule inone region and another rule in another region.

One of the simplest such functions might be described by the question, “How much does it cost tomail a letter?” Let us assume that we are mailing a letter that weights less than 4 ounces. The US PostalService offers a price chart which is copied below.

22

Page 23: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Figure 8. Cost of mailing a letter (December 2012.)

The leftmost column describes an input variable, the weight of the letter in ounces. The secondcolumn gives the cost if the first-class mail is an ordinary letter. One should interpret this informationas follows:

If the letter is between 0 and 1 ounce in weight, the cost is 45 cents.

If the letter is more than 1 ounce in weight, but no more than 2 ounces, the cost is 65 cents.

If the letter is more than 2 ounces in weight, but no more than 3 ounces, the cost is 85 cents.

If the letter is more than 3 ounces in weight, but no more than 3.5 ounces, the cost is $1.05. (105cents)

If the letter is more than 3.5 ounces in weight (but less than 4 ounces), then one should use a largeenvelope and the cost is $1.50.

(Although the USPS chart described mail costs for mail up to 13 ounces, for convenience, I have assumedthat we are not mailing anything heavier than 4 ounces.)

We can describe this “cost of first-class” function as follows. Here the input x, is weight in ounces, and

the output f(x) is cost in cents. The cost of a letter of weight x is then f(x) =

45, if 0 ≤ x ≤ 165, if 1 < x ≤ 285, if 2 < x ≤ 3105, if 3 < x ≤ 3.5150, if 3.5 < x ≤ 4

Below is the graph of this function. Note the use of open circles to describe points not part of thefunction graph and closed dark circles to describe points that are on the function graph, at the end of acurve.

23

Page 24: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Figure 9. Graph of the piecewise function defined by postal rates.

Three worked examples.Consider the function defined in “pieces” as follows:

f(x) =

{2x+ 1, if x ≤ 0x2 + 1, if x > 0

Compute f(2), f(0), f(−2) and graph this function.

Solution.Here, if x ≤ 0 then the function obeys the rule f(x) = 2x + 1. Thus f(−2) = 2(−2) + 1 = −3 and

f(0) = 2(0) + 1 = 1. But if x > 0 then f(x) = x2 + 1 and so f(2) = 22 + 1 = 5. The graph of the functionappears in figure 10. Notice how the two “pieces” are glued together; we can see the line y = 2x + 1 inthe region where x ≤ 0 and the parabola y = x2 + 1 in the region to the right of the y-axis.

Figure 10. A piecewise defined function.

24

Page 25: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Example 2. Another example: graph the function

f(x) =

{2x+ 2, if x ≤ 1

4, if x > 1

}Then compute f(0), f(1), f(2) and f(100).

Solution. Since x = 0 and x = 1 both fall in the region where x ≤ 1, we have that f(0) = 2(0) + 2 = 2and f(1) = 2(1) + 2 = 4. Since x = 2 and x = 100 both fall in the region where x > 1 then f(2) = 4 andf(100) = 4.

Here is the graph:

Figure 11. A function defined in two pieces

Example 3. Graph the function below and compute f(−1), f(0.5), f(1.5), f(2.5), f(3.5).

f(x) =

x2, if x ≤ 00, if 0 ≤ x < 11, if 1 ≤ x < 22, if 2 ≤ x < 3x, if x ≥ 3

Solution. f(−1) = (−1)2 = 1 since x = −1 ≤ 0. But f(−0.5) = 0 since 0 ≤ 0.5 < 1 Similarlyf(1.5) = 1, f(2.5) = 2 and f(3.5) = 3.5. The graph is:

Figure 12. A function defined in five pieces

25

Page 26: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Note in Figure 12 the use of closed dark circle to indicate that the point (such as (1, 1)) is on the graphand the use of light, open circles to indicate that a point (such as (1, 0) or (2, 1)) is not on the graph.)

1.2.6 Other resources for graphing functions

In the free textbook, Precalculus, by Stitz and Zeager (version 3, July 2011, available at stitz-zeager.com)this material is covered in section 1.6.

In the free textbook, Precalculus, An Investigation of Functions, by Lippman and Rassmussen (Edition1.3, available at www.opentextbookstore.com) this material is covered in section 1.3.

In the textbook by Ratti & McWaters, Precalculus, A Unit Circle Approach, 2nd ed., c. 2014,here at Amazon.com this material appears in section 1.4. In the textbook by Stewart, Precalculus,Mathematics for Calculus, 6th ed., c. 2012, (here at Amazon.com) this material appears in sections 2.2and 2.3. (In July 2013 the first textbook was $147 at Amazon.com and the second textbook was $136 atAmazon.com They are even more expensive in campus bookstores.)

There are lots of online resources for learning about graph of elementary functions. Here are some Irecommend.

1. Dr. Paul’s online notes on graphing functions

2. A Khan Academy video on graphing functions

Homework.As class homework, please complete Worksheet 1.2A, Functions and their graphs, available

through the class webpage.

26

Page 27: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.3 Transformations of functions

In this course we learn to identify a variety of functions: linear functions, quadratic and cubic functions,general polynomial and rational functions, exponential and logarithmic functions, trigonometric functionsand inverse trig functions. Many of these functions can be identified by their “shape”, by general prop-erties of their graph. Instead of trying to remember the shapes of millions of different functions, we willidentify some basic functions and then recognize transformations of the functions that give (essentially)the same shape.

For example, the graphs of the functions f(x) = x2 and f(x) = 3(x − 5)2 + 7 are the same shape.Indeed, if one plots them on the x-interval [−1000, 1000] one gets the following pictures (below, in figure15.) The graph of y = x2 is on the left; the graph of y = 3(x − 5)2 + 7 is on the right. If one lookscarefully, one can see that the labels on the y-axis have changed, otherwise the graphs are the same.

Figure 13. Graphs of y = x2 and y = 3(x− 5)2 + 7(Generated by the author using Sage.)

There are four types of transformations we will study in this section. In the first two types, wesimply shift the graph by a fixed amount, either vertically or horizontally. In the last two types oftransformations, we expand/shrink the graph by a fixed ratio, either vertically or horizontally.

1.3.1 Vertical shifts

It is easy to shift the graph y = f(x) up by a fixed positive amount c. Just add c to the y-value, that is,create the graph of y = f(x) + c.

If we can shift up by a fixed amount then shifting down is also easy – just make c negative. If c isnegative then the graph of y = f(x) + c shifts the graph down by |c|. (For example, y = f(x) − 2 willshift the graph down by 2.)

Consider the graph of y = x2. The graph of y = x2 + 1 shifts the graph of y = x2 up one unit. Thegraph of y = x2 + 3 shifts the graph of y = x2 up three units. The graph of y = x2 − 2 shifts the graphdown by two units. Let’s graph these all on one plane (see figure 14) to show the effect of the shifting.

27

Page 28: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Figure 14. Graphs of y = x2 (thick black curve), y = x2 + 1 (green), y = x2 + 3 (blue), y = x2−2 (red),(Generated by the author using Sage.)

1.3.2 Horizontal shifts

Horizontal shifts are very similar, but their is a subtlety here. Because the horizontal x-axis representsinputs to the function, if we want to shift the curve to the right (in the positive x-direction) by a positiveamount c then we need to “prepare” the input by subtracting the amount c from x before it is insertedinto the function. This may be the opposite of what one expects, but by subtracting c from x, we makean input x− c on the left of x act like the input x and this shift, moving x− c to x is a shift to the right.

Below in figure 15, as an example, are the graphs of y = x2, y = (x−1)2 and y = (x−3)2. Notice thatby replacing x by x−3, we have shifted the graph of y = x2 three to the right, in the positive x-direction.

If we want to shift the graph left by a positive amount c then we add c to x before inserting it intothe function. For example, the graph of y = (x+ 2)2 will shift the parabola of y = x2 to the left by 2.

Figure 15. Graphs of y = x2 (thick black curve), y = (x− 1)2 (green), y = (x− 3)2 (blue),y = (x+ 2)2 (red),

(Generated by the author using Sage.)

28

Page 29: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.3.3 Vertical expansions

What if we want to expand or shrink the image of our graph? We can do this in the vertical (y-direction)simply by multiplying our function by a constant. For example, if we have the graph y = f(x) then thegraph of y = 3f(x) will stretch (expand) the graph by a factor of 3 in the y-direction. The graph of

y =1

3f(x) will contract (shrink) the graph by a factor of 3.

Multiplying f(x) by −1 will flip the graph over, reflecting it across the x-axis, replacing positivey-values by negative ones and conversely, replacing negative y-values by positive ones. This is our firstexample of a reflection. The graph of y = −f(x) is a reflection of y = f(x) across the x-axis.

1.3.4 Horizontal expansions

We can also expand or contract a graph in the horizontal direction, along the x-axis. But, just likehorizontal shifts, because the horizontal axis represents the input variable, the action may be the reverseof what one might expect. To expand the graph horizontally by a factor of 2, we must divide x by 2before inserting it into the function.

For example, here in thick black ink is the graph of y = x2. In lighter blue ink is the graph of y = (x

2)2.

By dividing by two, we have stretched the graph in the horizontal direction by a factor of 2.

Figure 16. Graphs of y = x2 (thick black curve), y = (x

2)2 (thin blue),

If instead we multiply the input variable x by a constant, we will contract (shrink) the graph in thehorizontal direction. In the picture below, the graph of y = x2 is again a thick black curve; the graphof y = (2x)2 is the thinner green curve and if we graph y = (5x)2 we get the curve in red, shrunk evenmore in the horizontal direction.

If we replace x by −x, we interchange the role of positive and negative x-values and so we reflect thegraph across the y-axis. This is our second example of a reflection.

29

Page 30: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Figure 17. Graphs of y = x2 (thick black curve), y = (2x)2 (thin green) and y = (5x)2 (thin red)

1.3.5 Combining these expansions

In summary,

1. To shift a function up by c units, replace y = f(x) by y = f(x) + c.

2. To shift a function to the right by c units, replace y = f(x) by y = f(x− c).

3. To expand a function vertically by a factor of c, replace y = f(x) by y = cf(x).

4. To expand a function horizontally by a factor of c, replace y = f(x) by y = f(x

c).

We can combine these various transformations by creating a sequence of transformations. For example,we could translate a function in a diagonal direction, over to the right by 2 and then up by 2 by replacingf(x) by f(x− 2) + 2. Notice that replacing x by x− 2 moves the graph 2 units to the right; adding 2 tothe entire function moves the graph up two units.

A sequence of transformations then combine into a single form, changing y = f(x) into the expression

y = af(b(x− c)) + d

where first subtracting c translates everything to the right by c units, then multiplying by b insidethe function shrinks the graph in the horizontal direction about the point (c, 0) by a factor of b whilemultiplying by a on the outside of the function expands the graph vertically by a factor of a. Finally,adding d to the entire piece raises the graph d units up.

When in doubt about the type of transformation involved, it is always easy to pick several nice pointsin the new graph and ask where they came from in the old graph. For example, in the expressiony = af(b(x− c)) + d, the new x values x = c and x = c+ 1 lead to the computation of f(0) and f(b) andso correspond to old points where x was zero and where x was equal to b.

30

Page 31: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Some worked examples.

1. Consider the two graphs below. The first is the graph of f(x) = |x|. The second is a graph in whichthe original graph has been contracted horizontally by a factor of two and then shifted 2 units tothe right and up 1 unit. What is the function graphed in the graph at the right?

Figure 18. A transformation of the graph of the absolute value function.

Solutions. We first contract the graph horizontally by a factor of 2, replacing x by 2x. Thenwe shift the graph to the right by 2, replacing x by x − 2. Lastly we add 1 to the result. So theexpression |x| becomes |2(x− 2)|+ 1. Therefore the graph in question is f(x) = |2(x− 2)|+ 1.

2. What transformations (in order) must be done to the graph of y = f(x) to create the graph of

y = 2f(x− 5

3)− 7 ?

Solutions. Do the following steps, in this order:

(a) Shift right by 5,

(b) Expand horizontally by a factor of 3 about the point (5, 0),

(c) Expand vertically by a factor of 2,

(d) Shift down 7.

3. The graph of y = f(x) is drawn in red below.

Figure 19. A particular graph, waiting to be transformed.

31

Page 32: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

For each of the graphs, below (drawn in blue) first describe the transformation that turns the abovegraph into the new graph and then express this transformation algebraically in terms of the originalfunction f(x). (For example, the answer to problem (a) is “The graph is shifted up 3 units” and“y = f(x) + 3”)

(a)

(b) (c) (d) (e)

Solutions.

(b) The graph is shifted right 2 units and up 4 units; y = f(x− 2) + 4

(c) The graph is shifted left 4 units and up 2 units; y = f(x+ 4) + 2

(d) The graph is reflected across the x-axis; y = −f(x).

(e) The graph is stretched horizontally by a factor of 2; y = f(x

2).

One more example.Here is an example that shows up in engineering applications. The “sinc” function is defined in terms

of the sine function as

sinc(x) :=sinx

x.

But sometimes it is more natural to “normalize” it by replacing x by πx so that

sinc(x) :=sinπx

πx.

What is the effect of this “normalization”?Replacing x by πx creates a horizontal contraction by a factor of π. Here, below (from Wikipedia),

are the two functions graphed together.

32

Page 33: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Figure 20. The sinc function and its normalization(from Wikipedia, author Georg-Johann, available under the Creative Commons license.)

1.3.6 Resources for function transformations

In the free textbook, Precalculus, by Stitz and Zeager (version 3, July 2011, available at stitz-zeager.com)this material is covered in section 1.7.

In the free textbook, Precalculus, An Investigation of Functions, by Lippman and Rassmussen (Edition1.3, available at www.opentextbookstore.com) this material is covered in section 1.5.

In the textbook by Ratti & McWaters, Precalculus, A Unit Circle Approach, 2nd ed., c. 2014,here at Amazon.com this material appears in section 1.5. In the textbook by Stewart, Precalculus,Mathematics for Calculus, 6th ed., c. 2012, (here at Amazon.com) this material appears in section2.5. (In July 2013 the first textbook was $147 at Amazon.com and the second textbook was $136 atAmazon.com They are even more expensive in campus bookstores.)

There are lots of online resources for studying the transformations of functions. Here are some Irecommend.

1. This Youtube video describes all four types of transformations in a function in one basic formula(y = af(b(x− c)) + d) with nice animations showing the transformations.

2. This applet at the Wolfram site allows one to experiment with changing the values of the af(b(x−c)) + d to see how they move the graph.

3. A webpage at Purplemath forums has a tutorial and nice examples.

4. The webpage at Mathisfun is another webpage with a nice introduction to the topic of transforma-tions.

Worksheet to go with these notes.As class homework, please complete Worksheet 1.3A, Transformations of functions, available

through the class webpage.

33

Page 34: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.4 Symmetries of functions

1.4.1 Even and odd functions

A symmetry of a function is a transformation of the function that leaves the graph unchanged. Forexample, consider the functions f(x) = x2 and g(x) = |x|. Their graphs are drawn in figure 21. Both ofthese functions have the property that their graphs allow us to view the y-axis as a mirror. A reflectionacross the y-axis leaves the function unchanged. This reflection is an example of a symmetry.

Figure 21. Symmetry about the x-axis.

In most cases, a symmetry of a function can be represented by an algebra statement. Here, reflectionacross the y-axis interchanges positive x-values with negative x-values, swapping x and −x. Thereforef(−x) = f(x).

The statement,“For all x ∈ R, f(−x) = f(x)”

is equivalent to the statement

“The graph of the function is unchanged by reflection across the x-axis.”

What other symmetries might functions have?We can reflect a graph about the x-axis by replacing f(x) by −f(x). However, it is unlikely that a

graph is fixed by this reflection since whenever a number is equal to its negative, then the number is zero.(x = −x =⇒ 2x = 0 =⇒ x = 0.) So if f(x) = −f(x) then f(x) = 0.

However, it is possible for us to reflect a graph across first one axis and then the other. Reflecting agraph across the y-axis and then across the x-axis is equivalent to rotating the graph 180◦ around theorigin. When this happens, f(x) = −f(−x).

If f(x) = −f(−x) then we have rotational symmetry about the origin. In this case, we may multiplyboth sides of the equation by −1 and write f(−x) = −f(x).

So far, we have discussed two types of symmetry for graphs of functions:

1. Reflection symmetry about the y-axis, in which case f(−x) = f(x).

2. Rotation symmetry about the origin, in which case f(−x) = −f(x).

We note that functions like f(x) = x2 and f(x) = x4, where the exponent on x is even will havethe property that f(−x) = f(x) since −1 to an even integer power is equal to 1. Similarly, functionslike f(x) = x, f(x) = x3 and f(x) = x5, where the exponent on x is odd will have the property thatf(−x) = −f(x) since −1 to an odd power is equal to −1. This motivates the following definitions.

34

Page 35: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Definition. A function f(x) is even if f(−x) = f(x). The function is odd if f(−x) = −f(x).

An even function has reflection symmetry about the y-axis; an odd function has rotational symmetryabout the origin.

We can decide algebraically if a function is even, odd or neither by replacing x by −x and computingf(−x). If f(−x) = f(x), the function is even. If f(−x) = −f(x), the function is odd.

Examples. The graphs of a variety of functions are given below (on this page and the next). Considerthe symmetries of the graph y = f(x) and decide, from the graph drawings, if f(x) is odd, even or neither.

(a) (b)

(c) (d)

(e) (f)

35

Page 36: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

(g) (h)

(i) (j)

Solutions. Graphs (a), (c), (g) and (j) are even functions since a reflection across the y-axis preservessymmetry. All the other graphs represent odd functions since a rotation of 180◦ about the origin preservesthe graph.

Three worked exercises.

1. Graph the function f(x) = x3 − 4x and then decide if the function is even, odd, or neither.

Solution. This function is odd since it is symmetric about the origin.

Here is the graph:

36

Page 37: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

We can check this algebraically:

f(−x) = (−x)3 − 4(−x) = −x3 + 4x = −(x3 − 4x) = −f(x).

2. Decide algebraically if the function f(x) =x

1 + x2is even, odd, or neither.

Solution.

If f(x) =x

1 + x2then f(−x) =

−x1 + (−x)2

. Since (−x)2 = x2 we can simplify this to

f(−x) =−x

1 + (−x)2= − x

1 + x2= −f(x).

So f(x) is odd.

3. Decide algebraically if the function f(x) = x5 + 7x2 − 3x+ 5 is even, odd, or neither.

Solution.

If f(x) = x5 + 7x2 − 3x+ 5 then

f(−x) = (−x)5 + 7(−x)2 − 3(−x) + 5 = −x5 + 7x2 + 3x+ 5.

Since f(−x) = −x5 + 7x2 + 3x+ 5 is neither equal to f(x) nor equal to −f(x) then f(x) is neithereven nor odd.

Testing the concepts.There is a function which is both even and odd! What is it?

1.4.2 Periodic functions

Some graphs have translation symmetry, that is, we may shift the graph along the x-axis a certainamount and leave the graph unchanged. In this case the function is periodic; there is a real number c sothat if we shift the graph to the right by c units, then the graph is unchanged. Algebraically, we writef(x− c) = f(x). The smallest positive real number c such that f(x− c) = f(x) is called the period ofthe function f .

We will see this phenomenon (periodic functions and translation symmetry) throughout our study oftrigonometry.

For example, if we look at graphs (a), (c), (d) and (e) in the previous collection of graphs, we seegraphs that appear to represent periodic functions.

(a) (c)

37

Page 38: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

(d) (e)

The functions with graphs (a) and (d) have period 2π, slightly more than 6. Graph (c) represents afunction with period 2 and graph (e) represents a function with period π, slightly larger than 3.

We will look more closely at periodic functions several times in this course.

1.4.3 The greatest integer function and other interesting examples

We digress to introduce a function common in mathematics and computer science. The greatest-integerfunction, f(x) = bxc, takes as input a real number and rounds the number down to the greatest integerless than or equal to it. For example, it rounds 3.1 to 3, so b3.1c = 3. If the input is already an integer,the output is unchanged. For example, b5c = 5.

If the number x is positive, bxc is essentially the value of x with everything to the right of the decimalplace stripped away. So it is easy to compute bxc when x ≥ 0. One has to be careful if x is negative – wealways round down here, so b−1.1c = −2

Here is a graph of the greatest-integer function.

Figure 22. The greatest-integer function

The greatest-integer function is also called the floor function since is rounds down to the integer“on the floor”, below x. Notice a certain symmetry of this function: if we translate the graph up and

38

Page 39: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

to the right (at an angle of 45◦) then we get the same graph back. In other words, if f(x) = bxc thenf(x) = f(x− 1) + 1.

A function related to the greatest-integer function is the fractional-part function. The floor functionthrows away the decimal part of a positive real number. What if, instead, we keep only the decimal part?The fractional-part function g(x) = x− bxc keeps just the remainder, after we remove the integer part.

The fractional-part function is an example of a sawtooth function – it is periodic with very sharpedges!

Figure 23. A graph of the “fractional part” function.

1.4.4 Resources for function symmetries

Function symmetries are often covered in a section or chapter on function transformations. Here aresome textbook resources on function symmetries.

In the free textbook, Precalculus, by Stitz and Zeager (version 3, July 2011, available at stitz-zeager.com)even and odd functions are covered in section 1.6, the section on function tranformations. (See page 95.)Periodic functions are covered in section 10.5, in the study of trigonometric functions.

In the free textbook, Precalculus, An Investigation of Functions, by Lippman and Rassmussen (Edition1.3, available at www.opentextbookstore.com) even and odd functions are covered in section 1.5, thesection on function transformations (see page 71.) Periodic functions are covered in chapter 6 (beginningat page 353) as that textbook moves from triangle trigonometry to circular functions.

In the textbook by Ratti & McWaters, Precalculus, A Unit Circle Approach, 2nd ed., c. 2014,here at Amazon.com this material appears in section 1.5, along with the material on transformations. Inthe textbook by Stewart, Precalculus, Mathematics for Calculus, 6th ed., c. 2012, (here at Amazon.com)this material appears in in section 2.5, along with the material on transformations. (In July 2013 the firsttextbook was $147 at Amazon.com and the second textbook was $136 at Amazon.com They are evenmore expensive in campus bookstores.)

There are lots of online resources for studying function symmetry. Here are some I recommend.

1. Wikipedia on function parity

2. Paul’s online notes on function symmetry

39

Page 40: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

3. Applet and exercises at Khan Academy

Worksheet to go with these notes.As class homework, please complete Worksheet 1.4A, Symmetries of functions, available through

the class webpage.

40

Page 41: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.5 Function composition

1.5.1 The algebra of functions

Given two functions, say f(x) = x2 and g(x) = x + 1, we can, in obvious ways, add, subtract, multiplyand divide these functions. For example, the function f + g is defined simply by

(f + g)(x) = x2 + (x+ 1);

the function f − g is defined simply by

(f + g)(x) = x2 − (x+ 1).

Similarly(f · g)(x) = (x2) · (x+ 1)

and

(f

g)(x) =

x2

x+ 1.

In the last case we should note that the function (f

g)(x) is not defined wherever g(x) is zero and so, in

this case, −1 is not in the domain of (f

g)(x) =

x2

x+ 1.

The operations of addition, subtraction, multiplication and division are easily and naturally defined onfunctions. But a more important operation between functions is the operation of function composition.

1.5.2 Composing two functions

In an earlier lecture, a function was defined as a map from one set to another, taking each input toa unique output. If we have a second function acting on the outputs of another, we can combine thefunctions, creating the composition of the two functions. If f is a function from the set X into the set Yand if g is a function from the set Y into the set Z then g ◦ f is a function from the set X into the set Zdefined by first allowing f to map elements of X into Y and then allowing elements of Y to be mappedby g into Z

Here is a picture of this composition of two functions (copied from the Wikipedia article on function composition):

Figure 24. The function machine(from Wikipedia, author Tlep, available under the Creative Commons license.)

Notice that in g ◦ f , f is the first function involved while g is the second! We read function notation(g ◦ f)(x) from right to left. (This right-to-left method of creating function composition is due to ourbasic function notation, f(x), since we want (g ◦ f)(x) to be the same as g(f(x)), inserting x first intof and then inserting f(x) into g. In the example above in figure 24, g ◦ f maps the elements of X asfollows:

a 7→ @

41

Page 42: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

b 7→ @

c 7→ #

d 7→!!

Some define a function as a “machine”, taking inputs and generating outputs.

When viewed that way, the composition of two functions will be a sequence of function machines:

Figure 25. The composition g ◦ f(This diagram and the previous were created by Wvbailey and available under the Creative Commons License)

We may take the Wikipedia example and suppose that f(x) = x2 and that f maps the set R into theset R. Suppose also, that g(x) = x + 1 and that g maps R to R. Then the function (g ◦ f) maps realnumbers to real numbers. The function (g ◦ f) maps 3 to 10 since f maps 3 to 32 = 9 and g maps 9 to10.

If f and g are described by an equation then often (g ◦ f) can be described by an equation. In thiscase (g ◦ f)(x) = g(f(x)) = g(x2) = x2 + 1. So the composition function can be completely described by(g ◦ f)(x) = x2 + 1.

42

Page 43: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.5.3 Order is important! (f ◦ g 6= g ◦ f !)

If the codomain of the function f is the same as the domain of the function g, then we can compose firstf then g to create (g ◦f). Or we can compose first g then f to create (f ◦g). But here, with the operationof function composition, the order of composition is important! The function (f ◦ g) is probably not thesame function as (g ◦ f)!

For example, if f(x) = x2 and g(x) = x+ 1 then (as done above) we have

(g ◦ f)(x) = x2 + 1.

But on the other hand (f ◦ g)(x) = f(g(x)) = f(x+ 1) = (x+ 1)2. So

(g ◦ f)(x) = x2 + 1 but (f ◦ g)(x) = (x+ 1)2.

In elementary algebra we learned the importance of parentheses, for example, that1 + x2 is quitedifferent from (1 + x)2. The use of parentheses and the order of operations is especially important in thecomposition of functions. Here squaring and then adding one (g ◦ f) is different from adding one andthen squaring (f ◦ g).

Some worked examples.Given the functions f and g, below, find the composition functions f ◦ g and g ◦ f . The function

(f ◦g)(x) is the same as f(g(x)); (g◦f)(x) is the same as g(f(x)). Please distinguish between your answerfor f ◦ g and g ◦ f .

1. f(x) = x2 − 1 and g(x) = x+ 2

2. f(x) = x2 + 1 and g(x) =√

3.

3. f(x) = x2 + 9 and g(x) =√x.

4. f(x) = x2 + 5 and g(x) =√x− 5.

Solution.

1. (f ◦ g)(x) = f(g(x)) = f(x+ 2) = (x+ 2)2 − 1 = x2 + 4x+ 4− 1 = x2 + 4x+ 3.

(g ◦ f)(x) = g(f(x)) = g(x2 − 1) = (x2 − 1) + 2 = x2 + 1.

(f ◦ g)(x) = x2 + 4x+ 3 and (g ◦ f)(x) = x2 + 1.

2. f(x) = x2 + 1 and g(x) =√

3.

(f ◦ g)(x) = f(g(x)) = f(√

3) =√

32

+ 1 = 3 + 1 = 4.

(g ◦ f)(x) = g(f(x)). But g(anything) =√

3, so the answer is√

3.

(f ◦ g)(x) = 4 and (g ◦ f)(x) =√

3.

3. f(x) = x2 + 9 and g(x) =√x.

(f ◦ g)(x) = (√x)2 + 9 = x+ 9.

(g ◦ f)(x) =√x2 + 9.

(f ◦ g)(x) = x+ 9 and (g ◦ f)(x) =√x2 + 9.

43

Page 44: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

4. f(x) = x2 + 5 and g(x) =√x− 5.

(f ◦ g)(x) = (√x− 5)2 + 5 = (x− 5) + 5 = x.

(g ◦ f)(x) =√x2 + 5− 5 =

√x2 = |x|.

(f ◦ g)(x) = x and (g ◦ f)(x) = |x|.

It is convenient at times to break a function down into pieces, so that we may view the function itselfas a composition of two or more functions.

For example, suppose h(x) =√

3x+ 4. If we input an x-value into h, we first compute 3x + 4 andthen take the square root. So we may view the function h as a composition of a function g(x) = 3x+ 4and f(x) =

√x.

Some more worked examples.

1. For each of the functions f(x) and h(x) below, find a function g(x) such that h(x) = (f ◦ g)(x).

(a) f(x) = 10x, h(x) = 10(x2−17).

(b) f(x) =√x, h(x) =

√x2 + 4.

Solution.

(a) h(x) = 10(x2−17) = (f ◦ g)(x) if g(x) = x2 − 17.

(b) h(x) =√x2 + 4 = (f ◦ g)(x) if g(x) = x2 + 4.

2. For each function h given below, decompose h into the composition of two functions f and g sothat h = f ◦ g.

(a) h(x) = (x+ 5)2

(b) h(x) = 3√

5x2 + 1

(c) h(x) = 2cos x

Solutions.

(a) h(x) = (x+ 5)2 is the composition of g(x) = x+ 5 and f(x) = x2.

(b) h(x) = 3√

5x2 + 1 is the composition of g(x) = 5x2 + 1 and f(x) = 3√x.

(c) h(x) = 2cos x is the composition of g(x) = cosx and f(x) = 2x. (We can find the functions gand f , even if we have not yet studied the function cosx – the notation leads us to the answer!)

1.5.4 Chaining functions together

Once we understand function composition, there is no reason to stop at composing just two functions!We can compose a chain of functions, running an input x through one function after another.

44

Page 45: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

For example, suppose that f(x) = x2, g(x) = 3x + 5 and h(x) =√x. If we run x through f, g and h

in that order we get

(h ◦ g ◦ f)(x) = h(g(f(x))) = h(g(x2)) = h(3x2 + 5) =√

3x2 + 5.

There is no limit to the number of functions we can “chain” together. For example, suppose thatf(x) = x2, g(x) = 3x + 5, h(x) =

√x and j(x) = cos(x). If we run x through f, g, h and j in that order

we get

(j ◦ h ◦ g ◦ f)(x) = j(h(g(f(x)))) = j(h(g(x2))) = j(h(3x2 + 5)) = j(√

3x2 + 5) = cos(√

3x2 + 5).

(We can do this even if we have not yet studied the cosine function cos(x) – we just follow our notation!)In calculus, after we study the derivative of a function, we will learn to take the derivative of a “chain”

of functions composed together in this manner. The method we develop there is called the “Chain Rule”for derivatives.

1.5.5 Resources for the composition of functions

In the free textbook, Precalculus, by Stitz and Zeager (version 3, July 2011, available at stitz-zeager.com)this material is covered in section 5.1.

In the free textbook, Precalculus, An Investigation of Functions, by Lippman and Rassmussen (Edition1.3, available at www.opentextbookstore.com) this material is covered in section 1.4.

In the textbook by Ratti & McWaters, Precalculus, A Unit Circle Approach, 2nd ed., c. 2014,here at Amazon.com this material appears in section 1.6. In the textbook by Stewart, Precalculus,Mathematics for Calculus, 6th ed., c. 2012, (here at Amazon.com) this material appears in section2.6. (In July 2013 the first textbook was $147 at Amazon.com and the second textbook was $136 atAmazon.com They are even more expensive in campus bookstores.)

There are lots of online resources for studying the composition of functions. Here are some I recom-mend.

In addition to the Wikipedia webpage on function composition there are also

1. Paul’s online math notes on function composition.

2. See these Khan Academy videos.

Worksheet to go with these notes.As class homework, please complete Worksheet 1.5A, Function composition, available through

the class webpage.

45

Page 46: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.6 Inverse functions

In an earlier lesson, we introduced functions by assigning US citizens a social security number (SSN) orby assigning students and staff at Sam Houston State University a student ID (SamID)

The function SamID assigns to each student or staff a nine digit number that begins with threezeroes. (The Sam ID of the author of these notes is 000354765, so SamID(Ken W. Smith) = 000354765.

In practice, it is important not only that SamID be a function, but that the function process can bereversed. Computer databases at Sam Houston allow a staff member to type in the Sam ID and pull upinformation about the student/staff member. Each Sam ID number is linked to a unique student/staffmember!

This is the concept of an inverse function. If SamID maps student/staff to numbers, the inversefunction, SamID−1 maps numbers to student/staff. (So SamID−1(000354765) = Ken W. Smith.)

1.6.1 The concept of inverse function

In many applications, we need to reverse the function process, asking for the input x associated with anoutput y = f(x). We take the old output y and restore the original input x to create x = f−1(y).

Figure 26. The concept of an inverse function.(From Wikipedia, released into the public domain by its author Jim.belk at the wikipedia project.)

In the picture above, we have a function f from the set X (the domain) to Y (the codomain.) Wewould like to create an inverse function with domain Y that maps back to X. We write f−1 for the newfunction that reverses the process of function f .

Suppose f : {a, b, c} → {1, 2, 3} is described by the first picture below (from the Wikipedia article oninverse functions.) Then f−1 is described by the second picture. Notice how f−1 reverses the inputs andoutputs.

Figure 27. The concept of an inverse function.(From Wikipedia, released into the public domain by its author Jim.belk at the wikipedia project.)

46

Page 47: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Warning! The superscript −1 indicates the inverse function. f−1 is not the same as1

f.

Not every function has an inverse. Here are some examples. In the first case, we can reverse theprocess; in the second case we cannot.

Examples.

1. Consider the function f(x) = 3x + 5. If we use the letter y for outputs, then we can write thisfunction in the form y = 3x+ 5.

Suppose we are given a particular output y. Can we recover x?

Yes. Let’s take the equation y = 3x+ 5 and solve for x:

y = 3x+ 5 =⇒ y − 5 = 3x =⇒ y − 5

3= x.

We have discovered that if we are given y then x =y − 5

3.

This gives x as a function of y! We have a new function, the inverse of the old. We could call thisfunction g and write

g(y) =y − 5

3.

The function g is the inverse function of the function f . But it is customary to use x to representinputs to a function and to use y for outputs, so in practice we will write

g(x) =x− 5

3.

(Notice how, at the last moment, merely because of our custom, we have switched the letters x andy.) It is also customary to write f−1 for the inverse function of f so our final solution is

f−1(x) =x− 5

3.

2. Consider the function f(x) = x2 with domain R and codomain R.

If we write y = x2, and we are given a particular value of y, say y = 25, can we reverse the processand find x?

No, not in this case, for both x = −5 and x = 5 are mapped to y = 25 by this function. There aretwo different inputs that are both mapped to 25 so we cannot reverse our process in a unique way.

The function f(x) = x2, with domain R, does not have an inverse function.

1.6.2 Changing the domain in order to create an inverse function.

Occasionally, if a function does not have an inverse, we may be able to alter the domain of a functionso that, on the new domain, the function is invertible. We can do that in this last example. We couldchange our function f(x) = x2 so that the domain is the interval [0,∞) instead of (−∞,∞). If we agreethat no negative numbers are input into this function, then the ambiguity about x goes away. If y = 25then x must be equal to 5, not −5.

In this case, if f : [0,∞)→ (−∞,∞) is defined by f(x) = x2 then the inverse function is f−1(x) =√x.

When does a function f have an inverse? It turns out that there are two critical properties necessaryfor a function f to be invertible. The function needs to be “one-to-one” and “onto”.

47

Page 48: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.6.3 Finding the inverse of a function

A function f : D → C has an inverse f−1 : D → C if and only if f is both a one-to-one function and anonto function.

If the function f is onto then every element of C has at least one preimage back in D. If the functionf is one-to-one then every element of C which has a preimage has a unique preimage. (Recall that thisuniqueness is the critical part of the definition of a function!)

(We will examine the concepts one-to-one and onto in more detail in a later section.)

Finding an inverse function by reversing the operationsSometimes it is obvious that function has an inverse. Sometimes a function may be defined in terms of

a sequence of operations and each of them is reversible. For example, consider the function f(x) = x+ 4.What does f do to an input? Easy – it adds 4 to every input. How would one reverse that? By subtracting4 from every input. So f−1(x) = x− 4.

Consider the function f(x) = 3x. What does f do to every input? It multiplies each input x by 3.How would one reverse “multiplication by 3”. By dividing by 3. So the inverse function must divide eachinput by 3. With this simple logic, we see that f−1(x) = x

3 .One more example, the more complicated invertible function seen earlier: suppose f(x) = 3x + 5.

What is the inverse function? The function f(x) = 3x+ 5 first multiplies the input by 3 and then adds 5.So to reverse this function process we should first subtract 5 and then divide by 3. So the inverse function

should be f−1(x) =x− 5

3. (Notice that when we reverse the processes here, we also reversed the order

of the operations. The function f multiplies and then adds so f−1 must first subtract and then divide.)

Finding an inverse function algebraicallyIf the function f(x) is defined by an equation then we can also find the inverse algebraically. One way

to do this is to write out the equation y = f(x) and solve for x, getting a function x = g(y).Once this is done, we bow to custom and swap the letters x and y so that x represents the input for

our new function and y represents the output. Thus our final answer will be y = g(x).Here are some worked exercises.

Some worked exercises. Use algebra to find the inverse function of each function given below.

1. f(x) = x+ 4

2. f(x) = 3x

3. f(x) = 3x+ 5.

4. f(x) =√x3 + 9

5. f(x) =1

x+ 1

Solutions. Notice that the first three functions have already been solved before! Now we will do themalgebraically. (Hopefully we will get the same answer!) The last two are a little more complicated.

1. To find the inverse of f(x) = x+ 4 we write y = x+ 4 and then solve for x by subtracting 4 fromboth sides: y− 4 = x. Now that we have solved for x, we swap letters x and y and write x− 4 = y.So our answer is

f−1(x) = x− 4.

2. To find the inverse of f(x) = 3x we write y = 3x and then solve for x by dividing both sides by 3:y/3 = x. Now that we have solved for x, we swap letters x and y and write x/3 = y. So our answeris

48

Page 49: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

f−1(x) = x/3.

3. To find the inverse of f(x) = 3x+ 5 we write y = 3x+ 5 and then solve for x by subtracting 5 from

both sides and then dividing both sides by 3, to gety − 5

3= x. Now that we have solved for x, we

swap letters x and y and writex− 5

3= y. So our answer is

f−1(x) =x− 5

3.

4. To find the inverse of f(x) =√x3 + 9 we write y =

√x3 + 9 and then solve for x by squaring both

sides:y2 = x3 + 9,

then subtracting 9 from both sides,y2 − 9 = x3,

and then taking the cube root of both sides,

3√y2 − 9 = x.

Now that we have solved for x, we swap letters x and y and write

y =3√x2 − 9.

So our answer is

f−1(x) = 3√x2 − 9.

5. To find the inverse of f(x) =1

x+ 1we write y =

1

x+ 1and solve for x by first multiplying both

sides by the denominator x+ 1. Soy(x+ 1) = 1.

Now, to solve for x , we need to isolate x. Let’s multiply out:

yx+ y = 1

and subtract y from both sides,yx = 1− y.

Finally we can solve for x by dividing both sides by y:

x =1− yy

.

We have done all the important algebra. The last step is to swap variables:

y =1− xx

and so we have our answer

f−1(x) =1− xx

.

49

Page 50: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

1.6.4 The geometric meaning of inverse (and the horizontal line test)

When we create the inverse function, we interchange the inputs and outputs, creating a new functionwhose inputs are the old outputs and whose outputs are the old inputs. Geometrically, on the Cartesianplane, this has the effect of interchanging x and y and so swapping the x-axis with the y-axis.

We can swap the x-axis with the y-axis if we reflect our graph across the line y = x. Here (from theWikipedia article on inverse functions) is a picture displaying that effect. The graph of y = f(x) (in red)

is reflected across the line y = x to become the graph of y = f−1(x) in blue.

Figure 28. The graph of a function (in red) and its inverse (in blue)(From Wikipedia, released into the public domain by its author Jim.belk.)

1.6.5 The mathematical meaning of “inverse”

In mathematics, the “inverse” of an operation is something that undoes, reverses the operation. If ouroperation is addition then the inverse of 4 is −4. (−4 is called the “additive inverse” of 4.) If ouroperation is multiplication then the inverse of 4 is 1

4 . ( 14 is called the “multiplicative inverse” of 4.) If

we are composing functions then the inverse of f is the inverse function f−1. These types of inverses aredifferent; don’t confuse them!

If we compose f and f−1 we get the function which merely maps x to x. This is the “identityfunction.” For example, if f(x) = x+4 then the function f adds four to the input x. The inverse functiong(x) = x− 4 subtracts four from the input. If we apply f and then g we will first add four to x and thensubtract four, returning to the original input. In functional notation,

g(f(x)) = g(x+ 4) = (x+ 4)− 4 = x.

A worked exercise.

1. Verify, by function composition, that f(x) =√x3 + 9 and g(x) = 3

√x2 − 9 are inverse functions.

Solution. We compute

(g ◦ f)(x) = g(√x3 + 9) =

3

√(√x3 + 9)2 − 9 = 3

√(x3 + 9)− 9 = 3

√(x3 = x.

So(g ◦ f)(x) = x.

Similarly, we can compute

(f ◦ g)(x) = f(3√x2 − 9) =

√(

3√x2 − 9)3 + 9 =

√(x2 − 9) + 9 =

√x2 = x.

(Here we need to assume that x is not negative.) So

(f ◦ g)(x) = x.

50

Page 51: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Since the composition of f and g (in either order) return x to x, f and g are inverse functions.

1.6.6 Requirements for the existence of an inverse function*

A function f : D → C has an inverse f−1 : D → C if and only if f is both a one-to-one function and anonto function.

If the function f is onto then every element of C has at least one preimage back in D. If the functionf is one-to-one then every element of C which has a preimage has a unique preimage.

One-to-one functions.A function like f(x) = x2 maps two different inputs, x = −5 and x = 5, to the same output, y = 25.

But with a one-to-one function no pair of inputs give the same output.Here is a function we saw earlier. This function is not one-to-one since both the inputs x = 2 and

x = 3 give the output y = C.

Figure 2, from section 1.1 (From Wikipedia)

We can define one-to-one function more formally, as a mathematical implication:

A function f is one-to-one if f(a) = f(b) =⇒ a = b.

One can think of this implication this way: “A function is one-to-one if whenever it appears that twoinputs a and b give the same output then in fact a and b were the same.”

Let’s show that the function f(x) = 3x+5 defined earlier is one-to-one. We do this is a series of steps:

1. Suppose that f(a) = f(b).

2. Then 3a+ 5 = 3b+ 5.

3. Subtract 5 from both sides to get 3a = 3b.

4. Divide both sides by 3 to get a = b.

Since we have shown that f(a) = f(b) implies a = b, then the function f(x) is one-to-one.

Other common terms for one-to-one functions.A one-to-one function is sometimes called an injection or an injective function. Wikipedia uses

the term “injective function” in their article here.

Onto functionsA function f : D → C is onto if every possible output in C is truly an output, that is, if the range of

f is equal to the entire codomain C.

51

Page 52: Elementary Functions Chapter 1, Functionskws006/Precalculus/1_Functions_files/1_Fun… · Elementary Functions Chapter 1, Functions c Ken W. Smith, 2013 Version 1.3, January 8, 2014

Figure 2, again.

In figure 2, above, the function is not onto because the element B is the codomain is not an output. (Theelement A is also not an output of the function.) In figure 2, the codomain is Y = {A,B,C,D} but therange is just {C,D}.

If f(x) = y then we say that y is the image of x and that x is the preimage of y. If a functionf : D → C is onto then every element of the codomain has a preimage.

Other common terms for onto functions.An onto function is sometimes called a surjection or a surjective function. Wikipedia uses the

term “surjective function” in their article here.

1.6.7 Resources for inverse functions

In the free textbook, Precalculus, by Stitz and Zeager (version 3, July 2011, available at stitz-zeager.com)this material is covered in section 5.2.

In the free textbook, Precalculus, An Investigation of Functions, by Lippman and Rassmussen (Edition1.3, available at www.opentextbookstore.com) this material is covered in section 1.6.

In the textbook by Ratti & McWaters, Precalculus, A Unit Circle Approach, 2nd ed., c. 2014,here at Amazon.com this material appears in section 1.7. In the textbook by Stewart, Precalculus,Mathematics for Calculus, 6th ed., c. 2012, (here at Amazon.com) this material appears in section2.7. (In July 2013 the first textbook was $147 at Amazon.com and the second textbook was $136 atAmazon.com They are even more expensive in campus bookstores.)

There are lots of online resources for studying function inverses. Here are some I recommend.

1. The Wikipedia article on inverse functions is excellent. It includes links to the articles on injective functionsand surjective functions.

2. Paul’s online notes on on inverse functions.

3. Khan Academy video and examples on inverse functions.

Worksheet to go with these notes.As class homework, please complete Worksheet 1.6A, Inverse functions, available through the

class webpage.

52