# operations with functions

We define the addition, subtraction, multiplication and division of functions as:

· (f ± g)(x) = f(x) ± g(x)

· (f · g)(x) = f(x) · g(x)

· (f/g) (x) = f(x)/g(x) (if g(x)≠0)

Example: if f(x) = x2 -2 and g(x) = 3x + 2, then:

· (f + g)(x) = f(x) + g(x) = x2 + 3x

· (f - g)(x) = f(x) - g(x) = x2 – 3x - 4

· (f · g)(x) = f(x) · g(x) = 3x3 + 2x2 – 6x - 4

· (f/g) (x) = f(x)/g(x) = (x2 -2)/(3x + 2), if x ≠ -2/3

Function composition is the application of one function to the results of another. It is represented by g°f, and we say “f composed with g”:

g°f(x) = g(f(x))   (if f(x)Є Dom g)

Example: if  f(x) = x + 1; g(x) = x2, then:

g°f(x) = g(f(x)) = g(x + 1) = (x + 1)2 = x2 + 2x +1

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

NOTE: As you can see, the function composition doesn’t follow the commutative property:

g°f ≠ f°g

An inverse function of f is a function that undoes another function, that is, it is a function f-1 such that    f °f-1(x) = f-1° f (x) = i(x) = x
Example 1: if  f(x) = x2, then f-1(x) = √x, because

f°f-1(x) = f(√x) = (√x)2= x

f-1 °f (x) = f-1(x2) = √x2 = x

Example 2: if  f(x) = 1/x, then f-1(x) = 1/x, because

f˚ f-1(x) = f(1/x) = 1/(1/x)= x

f-1 ˚f (x) = f-1(1/x) = 1/(1/x)= x

Example 3: find the inverse function of f(x) = √(2x)

x = √(2y) → x2 = 2y → y = f-1(x) = x2/2

NOTE: inverse functions are symmetric and their axis of symmetry is the line: y = x

Exercise:

Solutions: