1 Functions
1 Functions
1 Functions
Example
The area A of a circle depends on its radius r . The rule is
A = πr 2
30 cm2
20 cm2
radius r
10 cm2
area A = πr 2
0 1 cm 2 cm 3 cm r
Functions
This example
a I domain D = { a, b, z }
a
b I E = { a, b, c, d }
b c I f (a) = a
z d I f (b) = a
f I f (z) = d
D E
I range = { a, d }
Terminology:
I f (x) is the value of f at x
I domain of f is the set D
I range of f is the set of all possible values f (x) for x in D
Functions as Machines
A function as a machine:
x in D f f (x) in E
(input) (output)
Example
Square f (x) = x 2 :
I domain = R
I range = {x | x ≥ 0} = [0, ∞)
√
Square root f (x) = x (over real numbers):
I domain = {x | x ≥ 0} = [0, ∞)
I range = {x | x ≥ 0} = [0, ∞)
Visualizing Functions as Graphs
y y
(x, f (x))
•
•
range •
2 f (x)
• •
1
f (1)
x x • • x
0 1 2
domain
Functions: Examples
y
0 1 2 3 4 x
What is f (3)?
I f (3) = 4
What is the domain and range of this function?
I domain = {x | 1 ≤ x ≤ 4} = [1, 4]
I range = {y | 1 ≤ x ≤ 5} = [1, 5]
Functions: Examples
√
What is the domain and range of f (x) = x + 2?
I domain = {x | x ≥ −2} = [−2, ∞)
I range = {y | y ≥ 0} = [0, ∞)
1
What is the domain of g(x) = x 2 −x
?
1 1
g(x) = =
x2 −x x(x − 1)
{x | x 6= 0, x 6= 1}
y y
0 x 0 x
a a
I visually (a graph)
A(r )
20
10
0 1 2 r
1−x if x ≤ −1
f (x) =
x2 if x > −1
-1 0 1 x
Piecewise Defined Functions: Example
-1 0 1 x
Piecewise Defined Functions: Example
0 1 2 3 4 x
A function f is called
I even if f (−x) = f (x) for every x in its domain, and
I odd if f (−x) = −f (x) for every x in its domain.
y y
(x, f (x))
(−x, f (x)) (x, f (x))
0 x 0 x
(−x, −f (x))
y y
x2 1 x4 1
-1 0 1 x -1 0 1 x
-1 -1
y y
1 1
x3 -1 0 1 x
x5 -1 0 1 x
-1 -1
We have:
1. f (−x) = (−x)5 + (−x) = − x 5 − x = − (x 5 + x) = − f (x)
Thus f is odd.
2. g(−x) = 1 − (−x)4 = 1 − x 4 = g(x)
Thus g is even.
3. h(−x) = 2(−x) − (−x)2 = − 2x − x 2
Thus h is neither even nor odd.
Note that:
I The sum of even functions is even (e.g. 1 + x 4 ).
I The sum of odd functions is odd (e.g. x 5 + x).
Increasing and Decreasing Functions
3
The function f (x) = x 2 is:
2 I increasing on [0, ∞)
1 I decreasing on (−∞, 0]
-2 -1 0 1 2 x