Functions and function notation

Week 1.
Functions and function notation
1.1. Functions
Functions are very important objects in mathematics. They are used to describe and
relate things, and can represent anything from mortgage payments to fuel contamination
in a space rocket. How do we define functions in general?
Definition 1.1. A function is a rule that associates with each object in one set X
called the domain, a single value f (x) from a second set Y . The set of values, i.e. x’s in
X, so obtained is called the range.
Remark 1.1. (Domain-Range notation) y = f (x) denotes the function f of an
argument x with the value y.
f : X → Y reads “f maps set X into set Y .”
Example 1.1. For the function given below, find the expressions for f (1), f (−3), f (t),
f (1/t), f (x + 2), f (x + h):
f (x) = x2 + 1.
Solution. This formula tells us how to compute f (x) from a given value of variable x.
Substitute the value in parentheses for each instance of x in the formula.
f (1) = 12 + 1,
f (−3) = (−3)2 + 1 = 32 + 1,
f (t) = t2 + 1,
1 1 2
=
+ 1,
f
t
t
f (x + h) = (x + h)2 + 1,
Your Turn. For the function given below, find the expressions for g(1), g(−3), g(t),
g(1/t), g(x + 2), g(x + h):
1
g(x) =
x−2
2
Calculus 150AL
Example 1.2. Let
f (x) = 2x2 +
2
5
+ 5x.
+
x2 x
Prove that f (t) = f (1/t).
Solution. In this case, the word “Prove” is really asking you to verify that the left hand
and right hand side of the equation f (t) = f (1/t) are actually equal. So calculate the left
hand side:
2
5
f (t) = 2t2 + 2 + + 5t
t
t
And then the right hand side:
2
5
+ 5(1/t)
+
2
(1/t)
(1/t)
2
5
= 2 + 2t2 + 5t +
t
t
By rearranging the terms, we see that the expression for f (1/t) is the same as the expression f (t). We have proven that f (t) = f (1/t).
f (1/t) = 2(1/t)2 +
Your Turn. Let
f (x) = sin x − cos x.
Prove that f (π) > 0.
Remark 1.2. It is very important to know where the function is defined. For instance,
in many word problems, the function uses information about length or weight, which must
be positive since lengths or weights less than zero do not make sense physically.
When the domain is not given, assume that it is the largest set of real numbers where
the function is defined. There are two common cases where the domain of a function is
restricted. Functions with 1) radicals and 2) variables in the denominator of a fraction.
Example 1.3. Find the domains of the following functions:
a) f (x) = √
x
b) f (x) = √x
c) f (x) = x − 2
1
d) f (x) =
x−1
1
√
e) f (x) =
1− 2−x
Solution.
a) x ∈ R (x is from then the set of all real numbers).
b) x ≥ 0. Square roots of negative numbers are not defined (in the real numbers).
You may already know that we can take square roots of negatives if we use complex
numbers. However, in this course, the domains of all functions are restricted to
real numbers.
Week 1. Functions and function notation
3
c) Anytime there is a radical with the variable in the radicand (under the radical
sign) in the function, take the radicand and set it greater than or equal to 0.
Then solve for the variable. So set x − 2 ≥ 0, then x ≥ 2 is the domain. In interval
notation, the domain is [2, ∞)
d) Anytime there is a fraction with the variable in the denominator (on the
bottom), take the denominator and set it not equal to 0. Recall that division
by zero is undefined. Then solve for the variable as though it were an equation.
So set x − 1 = 0, and therefore x = 1. The domain is everywhere else in the real
plane: (−∞, 1) ∪ (1, ∞). Usually it is enough just to say where the function is not
defined if it is only a few points.
e) Now use both the techniques in parts c) and d), one at a time. First look at the
radicand:
2−x≥0
−x ≥ −2
x ≤ 2 Don’t forget to change ≥ to ≤ when you multiply by −1!
You can mentally check that if x ≤ 2, then the number under the radical sign is
negative. Next, look at the denominator as a whole:
√
1 − 2 − x = 0
√
− 2 − x = −1
√
2 − x = 1
2 − x = 1
x = 1
Again, it’s a good idea to check that if x = 1, then the denominator is zero. So the
final answer is that x ≤ 2 and x = 1. In other words, the domain is (−∞, 1)∪(1, 2].
Your Turn. Find the domain where the following functions are defined.
√
1
1
,
c) f (x) = √
b) f (x) = 2
a) f (x) = 5 − 2x,
2
x −1
x − 4x
1.2. Graphs of functions
Definition 1.2. The graph of function f (x) is the set of all pairs (x, y) satisfying the
function y = f (x).
After you plot a significant number of pairs (x, f (x)), you will get a decent picture of
the function. The next figure shows important properties of the graphs that are used
to describe functions: horizontal, vertical, and oblique asymptotes, X and Y -intercepts,
finite and infinite jumps, local maxima and minima. We will learn more about them in
other sections.
4
Calculus 150AL
We will also check the graph for two particular symmetries:
Definition 1.3.
f (x) is even ⇔
the graph of f (x) is symmetric with
⇔
respect to the Y -axis
f (x) is odd ⇔
the graph of f (x) is symmetric with
⇔ f (−x) = −f (x)
respect to the origin
f (−x) = f (x).
Example 1.4. (2.2 ex.16 ) Determine if these functions are even, odd, or neither:
a) f (x) = x2
b) g(x) = 3x.
Solution.
(1) This function is a parabola which is symmetric about the Y -axis.
Therefore it is an even function, and we can be sure by using the definition.
Calculate f (−x) and then compare it to f (x). If they are the same, then the
function is even. f (−x) = (−x)2 = x2 = f (x). So f is an even function. In
general, a function could be neither odd nor even, but it cannot be both odd and
even. (The function f = 0 is the only function that is both odd and even). So we
are done.
(2) This function is a line, which is not symmetric about the Y -axis. Let’s use the
defintion as before: g(−x) = 3(−x) = −3x and g(x) = 3x. 3x does not equal
−3x for every x. So, g is not even. But maybe g is odd. To confirm this using
the definition, calculate g(−x) and compare it to −g(x). Be sure to distribute the
negative over the entire function. If the two calculations come out equal, the the
function is odd. Check: g(−x) = 3(−x) = −(3x) = −g(x). This means that g is
an odd function.
Your Turn. Determine if the function is even, odd, or neither:
a) f (x) = x4
b) f (x) = x − x2
x5
x3
+
c) f (x) = x −
6
120
Week 1. Functions and function notation
5
d) f (x) = 1 − x2
e) f (x) = sin x − cos x
f) f (x) = tan x
Definition 1.4. If there exists a number d = 0 such that f (x + d) = f (x) for all x
in the domain of f , then the function f (x) is called periodic, and the number d is called
its period. In words, periodic functions are functions that repeat themselves infinitely in
both directions, at least once in every interval of size d.
Example 1.5. The function sin x is periodic because it has the property that sin(x +
2π) = sin x for all x. Graphically, think of starting at x, then going around the unit circle
2π radians. This is a full rotation, so you end up on the same x value you started with.
So since x and x + 2π are the same point on the unit circle, they have the same value of
sine.
Your Turn. Identify which of the following functions are periodic. Note that [[x]] is the
greatest integer function. In other words, y = [[x]] gives the greatest integer less than or
equal to x, e.g. [[2.7]] = 2.
b) f (x) = sin x2 .
a) f (x) = sin2 x.
c) f (x) = [[x]].
c) f (x) = sin(1/x).
d) f (x) = x − [[x]].
1.3. Operations on functions
Definition 1.5. Sum, difference, product, quotient and powers. Let f (x), g(x)
be defined at x. Then by definition,
(f + g)(x) = f (x) + g(x),
(f − g)(x) = f (x) − g(x),
f f (x)
(x) =
, if g(x) = 0.
g
g(x)
6
Calculus 150AL
f (x)n = f (x) · f (x) · . . . · f (x)
(n times)
Example 1.6. Let f (x) = 1/x and g(x) = 2x + 1. Find (f − g)(x), (f g)(x), and 1/g 2 .
Solution. At first it can be helpful to write out the definition of each function operation,
as we have done below. As always, be careful with parentheses: distribute negatives and
FOIL when necessary!
a) (f − g)(x) = f (x) − g(x) = 1/x − (2x + 1) = 1/x − 2x − 1
b) (f g)(x) = [f (x)][g(x)] = (1/x)(2x + 1) = 2 + 1/x
c) 1/g 2 =
1
1
1
=
= 2
g(x)g(x)
(2x + 1)(2x + 1)
4x + 4x + 1
Your Turn. Let f (x) = x − 1 and g(x) = 1/(x2 + 2x − 3). Find the expressions for
(f + g)(x), (f − g)(x), and (f g)(x).
Definition 1.6. Composition. Let y = f (t), t = g(x) be two functions. For all x
such t = g(x) is in the domain of function f (t), define the composite function:
(f ◦ g)(x) = f (g(x)).
Example 1.7. Let f (x) = x − 1 and g(x) = 1/(x2 − 1). Find (f ◦ g)(x) and (f ◦ f )(x).
Solution. Composition is confusing because you are reading the function from right to
left. (f ◦ g)(x) is saying “First apply g to x, then apply f .” It can be helpful to think of
and to write composition as one function “plugged into” another. So then (f ◦ g)(x) says
substitute the expression for g(x), in parentheses, for each instance of x in the formula
for f . This is exactly what you practiced in the very first example in this section, but
now instead of plugging in numbers, we are plugging in functions.
1
−x2 + 2
1
=
−
1
=
a) (f ◦ g)(x) = f (g(x)) = f
(x2 − 1)
x2 − 1
x2 − 1
b) (f ◦ f )(x) = f (f (x)) = f (x − 1) = (x − 1) − 1 = x − 2
a) Find the composite functions (f ◦ g)(x) and (g ◦ f )(x), where
√
1
f (x) = 2
and
g(x) = x − 1
x +1
√
1
. Find the domain of (g ◦ f )(x).
b) Let f (x) = x − 1 and g(x) =
(1 − x)
Your Turn.