CH02P2 Functions
CH02P2 Functions
FUNCTION
3 4
5 6
1
10/20/2016
7 8
We may write:
f (1)=a, f (2)=b, f (3)=a
9 10
o Defined: f (x) = x2
11 12
2
10/20/2016
13 14
Example Solution
15 16
Example Solution
17 18
3
10/20/2016
y Y x X ( f (x) = y )
19 20
21 22
4
10/20/2016
Example Example
o The function, f (x) = 9x + 5 for all x R (R is the set
f = {(1,a),(2,c),(3,b)} f -1= {(a,1),(c,2),(b,3)} of real numbers).
o This function is both one-to-one and onto.
o Hence, f –1 exists.
o Prove:
Let (y, x) f -1, f -1(y) = x
(x,y) f, y = 9x + 5
x = (y-5)/9
f -1(y) = (y-5)/9
26 27
Exercise Composition
28 29
5
10/20/2016
Example Example
f (g (x)) = log3 ( x4 )
g (f (x)) = (log3 x) 4
Note: f g ≠ g f
32 33
Example Exercise
34 35
6
10/20/2016
38 39
Example
Recursive algorithm for Fibonacci Sequence :
for
40 41
42 43