Math 8 Functions and Modeling
Neil Donaldson
Spring 2025
Introduction
This course aims to refresh and reinforce the conceptual foundations behind several topics commonly
encountered in grade-school mathematics. The job of a teacher is often one of selection: choosing
examples and explanations suited to the level and experience of your students. To select effectively,
and to anticipate student questions, your must understand concepts at a higher level than you’ll
likely ever teach. Not all of our topics are central to the grade-school curriculum, and it is not our
goal to teach you how to teach, though the ideas and approaches we’ll explore are often suitable for
a grade-school audience. The mathematics in this course shouldn’t present much difficulty for math
majors, requiring at most elementary calculus and a tiny bit of linear algebra; you should instead be
considering how to explain the material, particularly to students with less mathematical knowledge
than yourself.
We start with two motivational problems.
1
1. You wish to travel across the surface of a cube between two oppo-
site vertices so that your path is as short as possible.
Should you follow the path indicated?
If yes, explain why.
If not, how should you find the shortest path?
2. Two houses are to be connected to the elec-
tricity supply using a single connection.
How should we determine where to place
the connection so as to minimize the required
length of wire?
What information do you need in order to
find the connection point?
connection
wires
electric supply
House 1
House 2
Your goal shouldn’t only be to find the right answer! Consider how you might discuss these problems
with grade-school students of different ability levels. Why might calculus not be a sensible approach?
Are there any similarities between the two problems? Brainstorm some strategies. . .
1
We are grateful to materials from UT Austin’s UTeach program for suggesting several of the examples in this course
including these motivational problems.
1
1 Sets & Functions
1.1 Basic Definitions
Consider how central functions are to mathematics, and how long you’ve been using them. How
would you define “function” to someone with limited mathematical knowledge? Would you use
words like rule, assign, element, domain, vertical line test, etc.? How helpful are these to your audience?
Examples 1.1. How would you explain the idea that the following do or do not represent functions?
1. y = x
2
2. Mon: fish, Tue: pork, Wed: fajitas, Thur: carbonara, Fri: pizza, Sat: fish, Sun: pizza
3. (3, 5), (2, 6), ( 4, 2), (3, 1).
4. x
2
= y
2
After considering the examples, perhaps you settle on a semi-formal definition:
A function f is rule which assigns to each input x exactly one output f (x)
Is this a useful definition? In what ways is it imprecise? Does the imprecision matter?
Of course the answers to these questions depend on your audience! What ideas do you want to
convey to your students and can you do so without overburdening and intimidating them? To begin
working towards a more complete picture, consider what we might allow to be inputs and outputs.
This requires a small amount of set notation.
Definition 1.2. A set A is a collection of objects, or elements.
2
The notation a A means that a is an
element of A, sometimes read a lies in A.’ Sets are often written upper case and elements lower.
A set B is a subset of a set A, written B A, if every element of B is also an
element of A: that is,
b B = b A
The picture illustrates sets A, B and elements a, b for which B A, a A,
b B and a / B (a does not lie in B).
A
B
a
b
Examples 1.3. 1. Suppose the elements of a set A are the numbers 1, 3, 5, 7 and 9. The simplest way
to write this is using roster notation: we list the elements (in any order) between braces
A = {1, 3, 5, 7, 9}
Subsets are commonly expressed using set-builder notation. For example, here is a subset of A:
B = {a A : 2 < a < 8}
This is read, “The set of a in A such that a lies strictly between 2 and 8.” In roster notation,
B = {3, 5, 7}. Can you express B in other ways using set-builder notation?
2
This is enough for our purposes, though a course in set theory will convince you that this definition has its own
problems. Selection is always at work. . .
2
2. We summarize several common sets of numbers using informal combinations of roster and
set-builder notation, all of which should be familiar.
Natural numbers N = {1, 2, 3, 4, . . .}. For instance, 5 N but 3 ∈ N.
Integers Z = {. . . , 2, 1, 0, 1, 2, 3, . . .}. For instance, 4 Z but
4
5
Z.
Rational numbers (fractions) Q =
p
q
: p Z, q N
. For instance
6
7
Q; in this case
p = 6 is an integer, and q = 7 a natural number.
Real numbers R. For instance,
2 R. A formal definition is difficult, though we often
informally visualize R as a ruler. Intervals are particularly important subsets, e.g.,
[4, π) = {x R : 4 x < π}
is a half-open interval.
You should also be familiar with the Cartesian plane: R
2
= {(x, y) : x, y R}. The notation
(3, 4) R
2
here describes a point in the plane with co-ordinates x = 3, y = 4; don’t confuse
this with the interval ( 3, 4) = {x R : 3 < x < 4} which is a subset of R!
The subset relationships between these sets are in the order listed:
N Z Q R
You should also have informally encountered the notion of irrationality: for instance,
2 and π
are real numbers but not rational numbers.
The reason we need this language when discussing functions is that the inputs and outputs of a
function are elements of sets. Here is a very formal definition of “function.”
Definition 1.4. The Cartesian product of sets A, B is the set of ordered pairs
A × B =
(a, b) : a A, b B
A function from A to B is a non-empty subset f A ×B which satisfies the vertical line test
For each a A, there is a unique b B such that (a, b) f ()
Instead of writing f A × B and (a, b) f , we use the more familiar notation
f : A B and f (a) = b
To a function f : A B are associated three useful sets:
Domain: dom f = A is the set of inputs.
Codomain: codom f = B is the set of possible outputs.
Range: range f = {b B : b = f (a) for some a A} is the set of realized outputs.
This probably isn’t the definition you should give to 10
th
graders, or even to freshman calculus stu-
dents! But what should you do? How much of this is helpful in a a given context?
3
Example (1.1.2 cont.). We revisit our food-based example in this formal setting. To properly view
this as a function f : A B, we have to carefully label the constituent sets.
A =
Mon, Tue, Wed, Thu, Fri
, B =
carbonara, fajitas, fish, pizza, pork
,
f =
(Mon, fish), (Tue, pork), (Wed, fajitas), (Thu, carbonara),
(Fri, pizza), (Sat, fish), (Sun, pizza)
The domain A should be clear, but we had to make a choice for the codomain B: in this case we chose
it to equal to range. Can you suggest a different choice for B? Try the other examples yourself.
Representing Functions
Functions can be represented in various ways. We illustrate a few in an example.
Example 1.5. We consider the familiar formula/rule f (x) = x
2
in several contexts.
Table This presentation is most helpful when the domain is very small.
The table shows the situation when dom f = {1, 0, 1, 2, 3} and
range f = {0, 1, 4, 9}
Arrows A pictorial arrow diagram might also be helpful when the do-
main is small.
Graph This is the set of ordered pairs
x, f (x)
: x dom f
: in the
context of the formal definition (1.4), the graph is the function!
For formulæ whose inputs and outputs are real numbers, two con-
ventions are often observed:
The domain is implied to be all real numbers for which the
formula makes sense.
The codomain is taken to be the set of real numbers.
If no other information is provided, we’d assume that the function
defined by the formula f (x) = x
2
has both domain and codomain
the entire set of real numbers: f : R R.
The range of the function is the set of possible outputs, in this case
range f = {x
2
R : x R} = [0, )
is the half-open interval of non-negative real numbers.
For ‘calculus’ functions like these, the vertical line test () really in-
volves vertical lines; every vertical line intersects the graph in pre-
cisely one point.
In the picture, the dots are the graph when the domain is the finite
set {1, 0, 1, 2, 3} (as described in the table/arrow-diagram).
x 1 0 1 2 3
f (x) 1 0 1 4 9
1
0
1
2
3
0
1
4
9
2
4
6
8
10
y
2 0 2
x
Can you think of other ways to represent a function? How might you decide which to use?
4
Exercises 1.1. 1. Let d represent the cost in millions of dollars to produce n cars, where n is measured
in 1000s. As clearly as you can, explain what is meant by d(25) = 431.
2. A movie theater seats 200 people. For any particular show, the amount of money the theater
takes in is a function of the number of people n in attendance. If a ticket costs $25, describe the
domain and range of the function using set notation.
3. Temperature readings T were recorded every two hours from midnight to noon. Time t was
measured in hours from midnight.
t 0 2 4 6 8 10 12
T (
F) 82 75 74 75 84 90 93
(a) Plot the readings and use them to sketch a rough graph of T as a function of t.
(b) Use your graph to estimate the temperature at 10:30 a.m.
4. State parts 1, 3 and 4 of Example 1.1 using the formal language of Definition 1.4. If you have a
function, state the domain and range and explain how you know you have a function. If you
don’t have a function, explain why not.
(Since insufficient information is provided, there is no single correct answer!)
5. (a) Let A = {1, 3, 5, 7, 9}. Explain in words what is meant by the set
B = {x A : x
2
> 10}
and state B in roster notation.
(b) Find the set C = {x N : (x 1)
2
< 16} in roster notation.
(c) Find the Cartesian product B ×C in roster notation. Is it the same as C × B?
6. Suppose that f : {2, 1, 0, 1, 2} R is defined by the formula f (x) = x
3
4x + 1.
Describe f using a table, an arrow diagram and a graph.
7. Find the implied domain and range for the functions defined by each rule:
(a) f (x) =
x
2
4
x2
(b) g(x) =
x
2
16x (c) h(x) =
1
x
4x x
2
(What is the largest set of real numbers for which the formula makes sense?)
8. You ask your students to determine the range of the function f defined by the rule f (x) = x
2
with domain the interval [5, 2]. You obtain various responses, including [25, 4], [4, 25] , and
[25, 4]. What is going wrong? What is the correct answer, and how would you explain it to
your students?
More generally, if dom f = [a, b] (where a b), what is range f ?
9. The unit circle is often represented by the implicit equation x
2
+ y
2
= 1.
(a) Draw the circle and explain why the full circle isn’t the graph of a function.
(b) Describe two functions f : [1, 1] R and g : [1, 1] R whose graphs together
comprise the circle. What are the ranges of each function?
5
1.2 Linear Polynomials
Perhaps the simplest functions are the linear polynomials, whose graphs are straight lines,
y = f (x) = mx + c where m, c are constants ()
Linear polynomials make very simple models: increase the input by x and the output changes by
y = mx regardless of the starting value x. Given experimental data or a physical situation relating
two quantities x and y, a linear model is an linear polynomial () relating these variables. In practice,
models are approximations to the real-world data. Later in the course we’ll consider what should be
meant by, and how to find, a ‘good’ linear model for approximately linear data.
Some of your earliest forays into algebra likely involved finding equations of straight lines.
Example 1.6. Find the equation of the straight line through the points A = (1, 3) and B = (4, 1).
Suppose the polynomial is y = mx + c. Since both A and B sat-
isfy this equation, we start by substituting both points into the
equation to find two relationships between m and c
(
3 = m + c
1 = 4m + c
This is a system of two linear equations in two unknowns (m, c).
By now you should know several ways to solve such, but con-
sider what might be easiest for a grade-school student. . .
0
1
2
3
4
y
0 1 2 3 4 5
c
x
m
1
A
B
Regardless of how you phrase it (solve one equation for c and substitute into the other, subtract one
question from the other, etc.), we obtain
2 = 3m = m =
2
3
= c = 3 m =
11
3
whence the required polynomial is y =
1
3
(11 2x).
As the picture suggests, the gradient/slope m represents how far one climbs/falls on travelling one
unit to the right. The y-intercept c is the intersection of the graph with the vertical axis.
The above process works for any two points A = (x
0
, y
0
) and B = (x
1
, y
1
) provided x
0
= x
1
: is it
clear why this should be the case? The details are in Exercise 5. You might feel that such a problem
is too abstract for your students, that such a ‘proof might be too intimidating. Indeed it might be
counterproductive for some students, but consider several counterpoints:
Once a student has developed comfort with concrete examples as above, Exercise 5 helps sum-
marize and unify what they’ve learned. A general/abstract discussion helps build confidence
by convincing a student that any such problem can be solved the same way.
The most helpful elementary proofs are those which essentially replicate an example abstractly.
Exercise 5 is not some abstract existence proof—it involves no trickery—it simply reinforces the
core technique by applying it in the most general situation.
Helping and encouraging students to think abstractly is one of the overarching learning out-
comes of all mathematics. You might get push-back, but it’s part of the job. . .
6
Example 1.7. Often the challenge of modeling lies in converting a word problem into algebra—don’t
underestimate how hard students find this! Here is a simple, though disguised, straight line model.
Beaker A contains a 300 ml solution of 2% acid. Beaker B contains 400 ml of acid of unknown con-
centration. The beakers are mixed together to produce an acid with concentration 6%. What was the
concentration in beaker B?
Given your mathematical experience, it should seem natural to denote the unknown concentration
(beaker B) by x. After mixing, we have a 700 ml solution containing 300 ×
2
100
+ 400x ml of pure
acid, whence its concentration is a linear polynomial function of x:
C(x) =
6 + 400x
700
The problem is now easily solved: C(x) =
6
100
x =
9
100
= 9%.
Parametrized Lines Straight lines admit an alternative visualization. Imagine placing a ruler so that
its zero point is at the origin O = (0, 0) and the “1” lies at a point C = (c
1
, c
2
). If t (a real number) is
the measure on the ruler, then the points on the line have co-ordinates
tC = (tc
1
, tc
2
) ()
To describe the line through points A and B, place a ruler so that 0
corresponds to A and 1 to B. Now slide the ruler so that A moves
to the origin O: this amounts to subtracting the co-ordinates of A
from all points on the line. We obtain a parallel line through the
origin, with B transformed to the point C = B A. Putting this
together with () results in a parametrized description of the line:
(x, y) = A + tC = A + t(B A) = (1 t)A + tB
1
2
1
0
3
2
1
2
A
B
C = B A
O
Contrast the parametrized description of a line with the linear polynomial approach: for instance,
one challenge is that a line may be parametrized using infinitely many distinct rulers (choose any
two points on the line!), whereas the linear polynomial description is unique. Does the parametrized
approach have any advantages? Which description is easier to understand or to work with? Which
fits better with your intuitive understanding of line? Which might cause a grade-school student the
greater challenge?
In the Exercises we make sure that the two descriptions of a line correspond. The discussion is little
more than the generalization of an example.
Example 1.8. The line through points A = (3, 6) and B = (1, 4) may be parametrized by
(x, y) = (1 t)(3, 6) + t(1, 4) =
3 4t, 6 2t
To convert this to a linear polynomial, first solve for t in terms of x,
x = 3 4t = t =
1
4
(3 x)
before substituting into our expression for y:
y = 6 2t = 6
2
4
(3 x) =
1
2
x
9
2
7
Exercises 1.2. 1. The cost of gasoline is $4.20 per gallon on January 1
st
and $4.90 on March 1
st
. State
a linear function/model for the cost of gasoline as a function of time.
2. You have a choice of three different cell-phone plans.
(a) No monthly charge and 10¢ per minute for all calls.
(b) $10 per month and per minute for all calls.
(c) $30 per month, regardless of how many calls you make.
How should you determine which plan to purchase?
3. Revisit Exercise 1.1.3. Find an approximate linear model T(t) = mt + c for this data.
(There is no perfect answer)
4. Revisit the beakers problem (Example 1.7). This time suppose we know that the concentration
in beaker B is 9%. How much from beaker B should we pour into beaker A to obtain an acid
with concentration 5%? Would you consider this a linear polynomial problem? Why/why not?
5. Suppose points A = (x
0
, y
0
) and B = (x
1
, y
1
) are given.
(a) If x
1
= x
0
, use the method of Example 1.6 to find the equation y = mx + c of the line
through these points.
(b) Now use the parametrized approach where A corresponds to 0 and B to 1. If, in addition,
x
1
= x
0
, make things match up with your answer to part (a).
What parametrization do you get if A = (0, c) and B = (1, m + c)?
(c) Part (a) provides an algebraic justification of the claim made on page 7, that the linear
polynomial description of a line is unique (‘the equation’). How might you help a student
believe this claim if the algebra is unconvincing or too intimidating?
(Think about Example 1.6)
6. A straight line is sometimes described as the set of points (x, y) R
2
satisfying an equation of
the form
ax + by = c
for some constants a, b, c where a, b are not both zero. How does this approach differ from our
use of linear polynomials?
7. Throughout mathematics (particularly within linear algebra), a function f : R R is said to be
linear if it satisfies the condition
For all λ, x R, f (λx) = λ f (x)
Is this the same thing as a linear polynomial? Explain.
8
1.3 Quadratic Polynomials
Quadratic polynomials are functions of the form y = f (x) = ax
2
+ bx + c where a = 0. The simplest
is y = x
2
, the standard parabola opening upwards. Here are some commonly encountered activities:
1. Find the roots/zeros of f , the solutions x to the equation f (x) = 0.
2. Sketch the graph of the function f .
3. Use quadratic functions to model a real-world problem.
You likely know two methods for finding zeros: factorizing and the quadratic formula, each of which
has its problems. With experience it is easy to spot that
x
2
+ 2x 15 = (x 3)(x + 5) = 0 x = 3 or x = 5
though the required creativity can make this difficult, particularly when coefficients are large. Stu-
dents often prefer the quadratic formula since it always works, though at the cost of some intimidat-
ing algebra. We’ll think about factorization shortly. First, we see how completing the square lies behind
both the quadratic formula and the standard approach to graphing quadratic functions.
Example 1.9. Describe/graph the parabola y = 3x
2
+ 12x + 4.
Pay attention to the x terms; 3x
2
+ 12x = 3(x
2
4x). Now
3(x 2)
2
= 3(x
2
4x + 4) = 3x
2
+ 12x 12
gives most of what we want: note how we divided the x-
coefficient by two. To finish, just tidy everything up,
y = (3x
2
+ 12x 12) + 16 = 3(x 2)
2
+ 16
4
8
12
16
y
1 0 1 2 3 4
x
The parabola therefore opens downwards (3 < 0) with its apex (maximum) at (x, y) = (2, 16) .
This is easy, if intimidating, to repeat in general:
ax
2
+ bx + c = a
x
2
+
b
a
x
+ c = a
"
x +
b
2a
2
b
2
4a
2
#
+ c
= a
x +
b
2a
2
b
2
4ac
4a
()
The graph is that of the standard parabola which has been:
1. Vertically scaled by a;
2. Shifted horizontally by
b
2a
;
3. Shifted vertically by
4acb
2
4a
By solving () for x, we see that completing the square yields
the quadratic formula.
y = x
2
1
2
3
y = ax
2
+ bx + c
b
2a
4acb
2
4a
Theorem 1.10. If a = 0, then ax
2
+ bx + c = 0 x =
b ±
b
2
4ac
2a
9
Example (1.9 cont). Our analysis suggests two methods for finding the roots.
1. Quadratic formula: with a = 3, b = 12, c = 4, we have
x =
12 ±
p
12
2
4(3) ·4
2(3)
=
12 ± 4
3
2
+ 3
6
= 2 ±
12
3
= 2 ±
2
3
3
While it is always tempting to jump for a formula, it often leads to difficult surd expressions.
We simplified by noticing the common factor of 4
2
inside the square root. Without this, we’d
be faced with
144 + 48 =
192.
2. Use the fact that we’ve already completed the square:
3(x 2)
2
+ 16 = 0 (x 2)
2
=
16
3
x = 2 ±
4
3
In many cases it is simpler to complete the square than to use the quadratic formula—remember
that they are equivalent!
Polynomials are often employed in modelling due to their simplicity and ease of evaluation. As you
saw in calculus, the motion of a falling body, or of any projectile can be modelled using quadratic
polynomials, an observation going back to at least to Galileo in the early 1600s: the distance travelled
by a falling body is proportional to the square of the time taken y(t) y(0) t
2
.
Example 1.11. A body is dropped from a height of 125 meters, taking exactly 5 seconds to reach the
ground. Its height at time t seconds is given by y(t) = 125 5t
2
m.
This certainly fits Galileo’s observation: y(t) y(0) = 5t
2
is indeed
proportional to t
2
.
Over each interval of 1 s, we may ask how far the body falls; we
summarize in a table.
t 0 1 2 3 4 5
y(t) 125 120 105 80 45 0
y(t) y(0) 0 5 20 45 80 125
y 5 15 25 35 45
Since each interval has duration 1 s, each y is the average speed of the falling body over that interval.
You’ll have seen problems like this in calculus; likely you want to differentiate to find the velocity
y
(t) = 10t m/s and acceleration y
′′
(t) = 10 m/s
2
. However, historically and in introductory
calculus, it is problems like these that motivate the definition of the derivative.
3
Armed with calculus, Galileo’s observation is that the height y(t) solves a differential equation
d
2
y
dt
2
= g = y
(t) = gt + v
0
= y(t) =
1
2
gt
2
+ v
0
t + h
0
where g (approximately 32 ft/s
2
or 10 m/s
2
) is the constant acceleration due to gravity, and the con-
stants of integration h
0
, v
0
are the initial height and vertical velocity. Unless you are explicitly teach-
ing calculus or Newtonian physics, this is probably a bad place to start!
3
The last line of the table really does suggest that speed is a linear function!
10
Example 1.12. Your frisbee is stuck 15 m up a tree. Standing 10 m
from the base of the trunk, you throw a ball with the intent of knock-
ing the frisbee out of the tree.
The standard approach to modeling such problems involves consid-
ering the horizontal and vertical motions separately.
Horizontal x(t) = pt + q is a linear function of time.
Vertical y(t) = 5t
2
+ rt + s is a quadratic function of time.
Substituting for t yields a quadratic function for the trajectory
y(x) = ax
2
+ bx + c
We’ll leave the details of the solution to Exercise 6. For the present,
consider why there are multiple answers; can you explain why without
explicitly solving the problem?
F
start
Exercises 1.3. 1. Complete the square for each quadratic function. Use your answer to find the
range and to graph the function.
(a) f (x) = x
2
6x + 5 (b) f (x) = x
2
+ x + 1
(c) f (x) = 3x
2
+ 8x + 5
2. For the quadratic function y = 2x
2
5x + 7, produce a table for x {0, 1, 2, 3, 4, 5, 6} similarly
to that in Example 1.11. What do you observe about y?
3. Find the implied domain of the function f (x) =
1
47x+x
2
4. (a) Find the equations of all quadratic polynomial functions which pass through the points
(1, 3) and (2, 4).
(b) More generally, if P = (a, b) and Q = (c, d) are given, where c = a, find all quadratic
functions whose graphs contain P and Q.
5. Describe as best you can how the graph of the function f (x) = 3x
2
+ bx + 2 depends on b.
6. Consider the frisbee/tree problem (Example 1.12). Assume you’re standing at the origin and
that the frisbee is at the point ( 10, 15).
(a) Find/describe all suitable trajectories that result in the ball hitting the frisbee.
(b) (Hard) Find a formula relating the initial speed v and initial slope m of the parabola (the
initial speed/direction in which you throw the ball).
i. If you throw the ball in such a way that the initial vertical speed of the ball is twice its
horizontal speed, find how fast you have to throw the ball in order to hit the frisbee.
ii. What is the minimum speed at which you could throw the ball if you want to dislodge
the frisbee?
(Hint: You’ll need some calculus! In the language of the original problem, the initial slope is m =
r
p
and the initial speed v =
p
p
2
+ r
2
; why?)
11
1.4 Polynomials, Factorization & the Rational Roots Theorem
Recall our simple example of factorization in the previous section
x
2
+ 2x 15 = (x 3)(x + 5) = 0 x = 3 or x = 5
That this approach provides all roots relies on several familiar algebraic facts:
1. Factor Theorem: f (c) = 0 x c is a factor of f (x).
2. No zero-divisors: g(x)h(x) = 0 g(x) = 0 or h(x) = 0.
3. A quadratic has at most two distinct roots.
We’ll examine this more closely at the end of this section. For students first learning factorization,
it isn’t the why that’s the challenge, it’s the how. Multiplying out (x 3)(x + 5) is mechanical, but
factorizing requires some creativity; we can’t really factor without somehow knowing that 3 and 5
are roots! Beyond making a lucky guess, how might we go about this?
Example 1.13. Let’s re-examine f (x) = x
2
+ 2x 15 = 0 in a couple of stages.
Integer solutions The simplest type of root would be an integer n. If f (n) = 0, observe that
n
2
+ 2n 15 = 0 = n(n + 2) = 15 = 15 is divisible by n
There are only eight possible candidates for n, and it doesn’t take long to test them all:
n 1 1 3 3 5 5 15 15
n + 2 3 1 5 1 7 3 17 13
Rather than computing f (n) explicitly, we listed all divisors of n in the first, the corresponding
n + 2 in the second, and mentally checked when n(n + 2) = 15. There are precisely two integer
solutions, namely n = 3 and n = 5.
Rational Solutions If you already believe that a quadratic polynomial has at most two solutions, then
you’re done. The next simplest possibility, however, is that a solution be a rational number x =
p
q
:
we may assume this is in simplest terms.
4
Substituting into the polynomial, we see that
p
2
q
2
+ 2
p
q
15 = 0 p
2
+ 2pq 15q
2
= 0
Remembering that p, q are integers, we rearrange this equation in two ways:
p(p + 2q) = 15q
2
Since the left side is a multiple of p, so also is the right. Since p, q have no
common factors, it follows that p divides into 15 (15 is a multiple of p).
p
2
= q(15q 2p) Since the right side is a multiple of q, so also is the left. Since p, q have no
common factors, we conclude that q = 1.
The upshot is that the only rational solutions to f (x) = 0 are the two integers we’ve already
found.
4
I.e., p Z and q N have no common factors: gcd(p, q) = 1.
12
Definition 1.14. A degree n polynomial is any function of the form
f (x) = a
n
x
n
+ a
n1
x
n1
+ ···+ a
1
x + a
0
where the coefficients a
k
are constants with a
n
= 0.
A quadratic polynomial has degree 2 and a linear polynomial mx + c degree one
5
(if m = 0).
Our analysis in Example 1.13 generalizes to a famous result.
Theorem 1.15 (Rational Roots). Suppose f (x) = a
n
x
n
+ ··· + a
0
has integer coefficients where a
n
and a
0
are non-zero. If x =
p
q
is a rational root in simplest terms, then q divides into a
n
and p into a
0
.
In particular, if a
n
= 1, then the only possible rational roots are integers.
Proof. Substitute
p
q
into f (x) and multiply by q
n
to obtain an equation where everything is an integer
a
n
p
n
+ a
n1
p
n1
q + ··· + a
1
pq
n1
| {z }
divisible by p
divisible by q
z }| {
+ a
0
q
n
= 0
By considering the braced terms we see that a
n
p
n
is divisible by q and a
0
q
n
by p. Since p, q have no
common factors, we obtain the result.
Examples 1.16. 1. If x =
p
q
is a rational root of f (x) = 2x
2
x 3 in lowest terms, then q = 1 or 2
and p = ±1 or ±3. The eight possibilities for x are easily checked:
x
1 1 3 3
1
2
1
2
3
2
3
2
2x 1 1 3 5 7 0 2 2 4
You may prefer to compute f (x) directly: as in the previous example, since we already know
x it is quicker to check whether x(2x 1) = 3 rather than f (x) = 0 (consider whether this
trick would be helpful or confusing in a grade-school context). The two roots are indicated; it
is easily verified that the polynomial can be factorized f (x) = (2x 3)(x + 1).
2. If the cubic polynomial f (x) = x
3
2x
2
+ 5 had any rational roots, the only possibilities would
be ±1 or ±5. It is quickly verified that none of these work,
f (1) = 4, f (1) = 2, f (5) = 80, f (5) = 170
whence f (x) = 0 has no rational roots.
Unless there are very few candidates for rational roots, checking all possibilities by hand is time-
consuming. The rational roots theorem is therefore typically used in conjunction with factorization
by providing options for how to start factorizing. This still isn’t easy, as the next example shows.
5
A non-zero constant polynomial has degree zero. By convention, the zero polynomial y 0 has degree so that the
theorem deg f g = deg f + deg g makes sense for all polynomials.
13
Example 1.17. Consider the cubic function f (x) = x
3
x
2
7x + 10. The rational roots theorem
offers eight candidates for rational roots: x = ±1, ±2, ±5, ±10. It is not difficult to check the first few
of these in your head, for instance,
f (2) = 8 4 14 + 10 = 0
By the factor theorem, x 2 is a factor of f (x). The factorization can be performed in various ways.
Here are three options, though all are versions of the same process.
Long/synthetic division You should have practiced this in high-school.
x
2
+ x 5
x 2
x
3
x
2
7x + 10
x
3
+ 2x
2
x
2
7x
x
2
+ 2x
5x + 10
5x 10
0
= x
3
x
2
7x + 10 = (x 2)(x
2
+ x 5)
Multiply out and solve Write f (x) = (x 2)q(x) where q(x) = ax
2
+ bx + c is some quadratic poly-
nomial. Now multiply out:
x
3
x
2
7x + 10 = (x 2)(ax
2
+ bx + c) = ax
3
+ (b 2a)x
2
+ (c 2b)x 2c
Equating coefficients, we obtain the same factorization as before:
a = 1, b 2a = 1 = b = 1, 2c = 10 = c = 5
Term-by-term factorization We construct the required quadratic factor term-by-term. Since each cal-
culation can be done in your head, with practice you’ll find that you can factorize in one line
without showing any work. Teaching such an approach is likely a terrible idea unless your
students are already very comfortable with factorization!
(a) To create x
3
, the first term of the quadratic factor must be x
2
x
3
x
2
7x + 10 = (x 2)(x
2
+ ···) = x
3
2x
2
+ ···
(b) We have 2x
2
but want x
2
. To correct this, add x to the quadratic (x
2
2x
2
= x
2
):
(x 2)(x
2
+ x + ···) = x
3
x
2
2x + ···
(c) We have 2x but want 7x. To fix, subtract 5 from the quadratic (5x 2x = 7x):
(x 2)(x
2
+ x 5) = x
3
x
2
7x + 10
(d) Since the last term 10 is correct, the factorization worked!
You might have seen other approaches involving arranging the coefficients in a table. Regardless, the
calculations required to complete these methods are exactly those seen above; all these methods are
versions of the same thing.
14
Why Does Factorization Work?
The theory of factorization relies on some algebra. Here is a brief treatment.
Theorem 1.18 (Factor Theorem). Suppose f (x) is a degree n polynomial. Then:
1. f (c) = 0 if and only if f (x) = (x c)q(x) for some (degree n 1) polynomial q(x).
2. The polynomial has at most n distinct roots.
Proof. 1. () This is essentially trivial: f (x) = (x c)q(x) = f (c) = (c c)q(c) = 0.
() This relies on the division algorithm for polynomials: if f , g are polynomials, then there are
unique polynomials q, r with
6
f (x) = g(x)q(x) + r(x) and deg r < deg g
If g(x) = x c is linear, r(x) must be constant. Evaluate both sides at x = c to obtain
f (x) = (x c)q(x) + f (c) (thus f ( c) = 0 = f (x) = (x c)q(x))
2. Suppose c
1
, . . . , c
n
are distinct real roots. By part 1, f (x) = (x c
1
)q
1
(x). Since
0 = f (c
2
) = (c
2
c
1
)q
1
(c
2
) = q
1
(c
2
) = 0
we may factor x c
2
from q
1
(x) to obtain
f (x) = (x c
1
)(x c
2
)q
2
(x), deg q
2
= n 2
Repeat this process to factor out all n linear polynomials x c
k
:
f (x) = (x c
1
) ···(x c
n
)q
n
, deg q
n
= n n = 0
whence q
n
= 0 is constant. Plainly f (c) = (c c
1
) ···(c c
n
)q
n
= 0 = c = c
j
for some j, so
there are no other roots.
Example (1.17 cont). We know that f (x) = x
3
x
2
7x + 10 = (x 2)(x
2
+ x 5). But then
f (x) = 0 x 2 = 0 or x
2
+ x 5 = 0
The former gives the root x = 2, and the latter can be attacked via the quadratic formula or complet-
ing the square; the polynomial therefore has exactly three real roots
x = 2,
1 ±
21
2
6
For a given example, q and r may be found by synthetic division. This is similar (and may be demonstrated similarly)
to the more familiar division algorithm for integers: if m, n are integers, then there are unique integers q, r for which
m = qn + r and 0 r <
|
n
|
In elementary school, this is typically written m ÷n = q r r (q remainder r); e.g., 23 ÷4 = 5 r 3 corresponds to 23 = 5 ×4 + 3.
15
Example 1.19. We finish with a quick example of how long division (or any other factorization
method as in Example 1.17) computes the ingredients in the division algorithm.
If f (x) = x
3
+ 7x
2
2 and g(x) = x
2
2, then
x + 7
x
2
2
x
3
+ 7x
2
2
x
3
+ 2x
7x
2
+ 2x 2
7x
2
+ 14
2x + 12
= x
3
+ 7x
2
2 = (x
2
2)(x + 7) + (2x + 12)
Otherwise said, f (x) = g(x)q(x) + r(x), where
q(x) = x + 7, r(x) = 2x + 12 and deg r = 1 < 2 = deg g.
Exercises 1.4. 1. Apply the rational roots theorem to the polynomial x
3
+ 2x
2
x 2 and use it to
factorize the polynomial.
2. Repeat the previous question for the polynomial 6x
2
+ x 2.
3. Use the rational roots theorem to prove that the polynomial 2x
5
3x + 7 has no rational roots.
4. Factorize the polynomials and thereby find their (real) roots. Explain your steps carefully.
(a) f (x) = x
3
+ 2x
2
3x (b) f (x) = x
4
13x
2
+ 36
(c) f (x) = x
3
7x 6
5. Factorize the polynomial f (x) = x
6
2x
5
x
4
4x
3
4x
2
4x 6 and thus demonstrate that
it has exactly two real roots.
6. Students often follow a heuristic when trying to factorize a polynomial f (x) = 0: try some
small integer values for x until you find a root, then apply long division. For what types of
polynomial f (x) will this approach work? Explain.
7. The polynomial f (x) = 2x
4
3x
3
+ 2x
2
+ 3x 9 has only one rational root. Find it and factorize
the polynomial as f (x) = g(x)q(x) where deg g = 1.
8. Find unique polynomials q(x) and r(x) for which f (x) = g(x)q(x) + r(x) and deg r < deg g.
(a) f (x) = x
3
+ 1 and g(x) = x + 2.
(b) f (x) = x
4
+ x
3
2 and g(x) = x
2
+ 1.
9. Let f (x) = ax
3
+ bx
2
+ cx + d be a cubic polynomial. ‘Complete the cube’ by finding a constant
k such that
f (x) = a(x k)
3
+ p(x k) + q
has no (x k)
2
term (here p, q are constants).
(Hint: evaluate f (x + k))
10. Suppose deg f = k and deg g = l.
(a) Show that deg( f g) = kl.
(b) Is it always the case that deg( f + g) = max(k, l)? Why/why not?
16
1.5 Inverse Functions & the Horizontal Line Test
The informal idea of an inverse function is that f
1
takes the output of f and returns its input (and
vice versa).
Example 1.20. Define a simple function using a table or an arrow diagram
x 1 2 3 4
f (x) 4 2 5 7
y 4 2 5 7
f
1
(y) 1 2 3 4
The inverse f
1
is the function obtained by reversing the arrows or flipping
the table upside-down.
1
2
3
4
4
2
5
7
f
f
1
Definition 1.21. A function f : A B is invertible if it has an inverse: a function f
1
: B A for
which
f
1
f (x)
= x and f
f
1
(y)
= y ()
for all possible inputs x A and y B.
Certainly Example 1.20 satisfies the input–output properties (). Our concerns are identifying when
a function is invertible, how to make it so if not, and how to compute an inverse.
Examples 1.22. 1. The function f (x) = 2x has inverse f
1
(y) =
y
2
.
The input–output conditions () are certainly satisfied.
The graph admits an interpretation of f
1
similar to the arrow diagram.
The function f takes an input x, moves it vertically to the graph, then
projects to the y-axis. This interpretation is precisely the vertical line
test (Definition 1.4)!
The inverse function reverses the arrows: transport an input y horizon-
tally to the graph, then project to the x-axis.
0
2
4
0 1 2
f
f
1
x
y
y
2
2x
2. Consider f (x) = x
2
1. This time, when attempting to move a real
number y horizontally to the graph, we usually encounter one of
two problems:
(a) If y > 1, there are two choices of x (two intersections).
(b) If y < 1, there is no intersection with the graph.
The na
¨
ıve approach of reversing the arrows is insufficient to define an
inverse. However, a simple remedy arises by staring at the graph:
Problem (a) goes away if we delete the left half of the graph.
Equivalently, we restrict the domain of f to [0, ).
Problem (b) disappears if we insist that y 1. Equivalently,
we restrict the codomain of f to its range [1, ).
4
8
2 2
f
f
1
?f
1
?
x
y
f
1
?
y
17
After making these restrictions so that f : [0, ) [1, ), it is easily checked that
f
1
(y) =
p
y + 1, f
1
: [1, ) [0, )
satisfies the input–output conditions () and is therefore the inverse of f :
x [0, ) = f
1
f (x)
=
q
(x
2
1) + 1 = x
y [1, ) = f
f
1
(y)
=
p
y + 1
2
1 = y
What makes a function invertible? The fixes in the last example can be rephrased succinctly:
Horizontal line test: every horizontal line must intersect the graph exactly once
This unpacks to two conditions, each of which addresses one of the problems seen in the example.
Definition 1.23. Let f : A B be a function. We say that f is:
(a) 1–1/one-to-one if distinct inputs x
1
= x
2
A have distinct outputs f (x
1
) = f (x
2
). Equivalently,
Given x
1
, x
2
A, we have f (x
1
) = f (x
2
) = x
1
= x
2
If A, B are sets of real numbers, each horizontal line intersects the graph at most once.
(b) Onto if range f = B. Equivalently,
Given y B, there is some x A for which y = f (x)
If A, B R, the horizontal line through y B intersects the graph at least once.
Putting these ideas together, a function is both 1–1 and onto precisely when every y B corresponds
to a unique x A for which y = f (x). In summary:
Theorem 1.24. f : A B is invertible if and only if it is both 1–1 and onto. Its inverse is the function
f
1
: B A such that f
1
(y) = x whenever y = f (x).
Example (1.22.2, mk. II). Consider the two properties in the context of the example f (x) = x
2
1:
(a) f (x
1
) = f (x
2
) = x
2
1
1 = x
2
2
1 = x
2
1
= x
2
2
= x
1
= ±x
2
.
To force f to be 1–1, it is enough to restrict the domain so that all x have the same sign: the
obvious choice is dom f = [0, ).
(b) range f =
x
2
1 : x [0, )
= [1, ). We force f to be onto by restricting its codomain to
[1, ).
The inverse function is obtained by solving y = x
2
1 for x:
x
2
= y + 1 = x = f
1
(y) =
p
y + 1
The non-negative square root is used since x dom f = [0, ).
18
An algorithm for inverting functions Our discussion provides an algorithmic process for making
a function f : A B invertible and finding an inverse.
(a) Check that f is 1–1. If not, restrict the domain until it is.
(b) Check that f is onto. If not, redefine B = range f .
(c) Solve y = f (x) for x = f
1
(y).
Since x is typically preferred as an input, it is common to switch x, y at the end of step 3 and write
y = f
1
(x). If A, B R, switching x y is equivalent to reflecting the graph in the line y = x.
Note also that step (a) likely involves a choice; depending on how you restrict the domain, you can
find multiple inverse functions! To see this in action, we return once more to our example.
Example (1.22.2, mk. III). Recall that if f (x) = x
2
1, then
f (x
1
) = f (x
2
) = x
1
= ±x
2
Instead of restricting the domain to [0, ), we can instead force f to be 1–1 by taking the other half
of the graph; by choosing dom f = ( , 0]. The range/codomain remains [1, ), but the inverse
function is now different:
x
2
= y + 1 = x =
p
y + 1 (, 0] = dom f = f
1
(x) =
x + 1
This time the new domain for f forced us to use the negative square root.
4
8
y
2 2
x
f (x) = x
2
1
dom( f ) = [0, )
dom( f ) = (, 0]
2
0 3 6 9
x
y
f
1
(x) =
x + 1
3 6 9
x
2
y
f
1
(x) =
x + 1
We could choose other domains on which f is 1–1, but these are the most natural choices.
The moral is that you cannot invert a function unless you are precise about its domain and range!
19
We finish with an algebraically tougher example, where you may feel that more detail is justified.
Example 1.25. Let y = f (x) =
1
(x2)
2
. Its implied domain consists of all real numbers except 2.
The vertical line test is clearly visible on the graph: every vertical line
x = a, except x = 2, intersects the graph exactly once.
The range is the interval R
+
= (0, ) as can be seen by solving
f (x) = y
1
x 2
= ±
y x = 2 ±
1
y
Any positive output y may be obtained via y = f
2 +
1
y
.
The ±-term shows that f fails the horizontal line test: it isn’t 1–1.
There are two natural choices for an inverse:
(a) Choose dom f = (2, ), then ±
y =
1
x2
is positive. We
take the positive square root and obtain the inverse function
g : (0, ) (2, ), g(x) = 2 +
1
y
(b) Choose dom f = (, 2), then ±
y =
1
x2
is negative and
we obtain a second inverse function
h : (0, ) (, 2), h(x) = 2
1
y
1
2
3
4
5
6
y
1 0 1 2 3 4
x
1
0
1
2
3
4
1 2 3 4 5 6
x
y
y = g(x)
y = h(x)
Exercises 1.5. 1. If dom f = R, check that f (x) = x
3
+ 8 passes the horizontal line test. Find f
1
.
2. Consider f (x) = x
2
+ 2x 3. Similarly to Example 1.22, find two inverses of f .
3. Sketch the graph of the function
f (x) =
x if 0 x < 1
x 1 if 1 x < 2
x 2 if 2 x < 3
Find three domains on which f is 1–1 and thus compute three distinct inverses.
4. Show that the following function f : R (
3
2
, ) is 1–1 and onto, sketch its graph and find f
1
.
f (x) =
(
3
1
2
x if x 2
2
1
x
if x > 2
5. (Hard) Find the implied domain and range of f (x) =
x+1
1+
1
x+1
. Now find an interval on which f
is 1–1 and compute its inverse.
6. An astute student observes that Definition 1.21 only describes the properties satisfied by an
inverse and asks why we keep referring to the inverse. How would you respond?
20