Composition of Functions: (G F) (X) G (F (X) )
Composition of Functions: (G F) (X) G (F (X) )
It is written: (g º f)(x)
f(input) = 2(input)+3
g(input) = (input)2
Let's start:
(g º f)(x) = g(f(x))
(g º f)(x) = (2x+3)2
(f º g)(x) = f(g(x))
(f º g)(x) = 2x2+3
We get a different result!
Symbol
The symbol for composition is a small circle:
(g º f)(x)
(f º f)(x) = f(f(x))
(f º f)(x) = 2(2x+3)+3 = 4x + 9
(f º f)(x)= f(f(x))
= f(2x+3)
= 2(2x+3)+3
= 4x + 9
Domains
It has been easy so far, but now we must consider the Domains of the functions.
The domain is the set of all the values that go into a function.
The function must work for all values we give it, so it is up to us to make sure we get the domain
correct!
We can't have the square root of a negative number (unless we use imaginary numbers, but we
aren't), so we must exclude negative numbers:
{x | x ≥ 0}
[0,+∞)
Then also make sure that g(x) gets the correct Domain
(g º f)(x)= g(f(x))
= (√x)2
=x
Now, "x" normally has the Domain of all Real Numbers ...
What we see at the end is a drilled hole, and we may think "that
should work for wood or metal".
But if we put wood into g º f then the first function f will make a fire
and burn everything down!
So what happens "inside the machine" is important.
De-Composing Function
We can go the other way and break up a function into a composition of other functions.
Example: (x+1/x)2
f(x) = x + 1/x
g(x) = x2
And we get:
(g ºf)(x)= g(f(x))
= g(x + 1/x)
= (x + 1/x)2
This can be useful if the original function is too complicated to work on.
Summary
Some functions can be de-composed into two (or more) simpler functions.
[3] Operations with Functions
We can add, subtract, multiply and divide functions!
Addition
The only other thing to worry about is the Domain (the set of numbers that go into the
function), but I will talk about that later!
Subtraction
Multiplication
Division
(f/g)(x) = (2x+3)/x2
Function Composition
There is another special operation called Function Composition,
read that page to find out more!
(g º f)(x)
Domains
It has been very easy so far, but now we must consider the Domains of the functions.
We can't have the square root of a negative number (unless we use imaginary numbers, but
we aren't doing that here), so we must exclude negative numbers:
{x | x ≥ 0}
"the set of all x's that are a member of the Real Numbers,
such that x is greater than or equal to zero"
[0,+∞)
So what we cook can't have peanuts and also can't have dairy products.
If we choose any other value, then one or the other part of the new function won't work.
Note: we can put this whole idea into one line using Set Builder Notation :
Dom(f+g) = { x | x Dom(f) and x Dom(g) }
Which says "the domain of f plus g is the set of all Real Numbers that are in the domain of f
AND in the domain of g"
The same rule applies when we add, subtract, multiply or divide, except divide has one
extra rule.
we must also make sure that g(x) is not equal to zero (so we don't divide by zero ).
Here is an example:
(f/g)(x) = √x / √(3−x)
1. The domain for f(x)=√x is from 0 onwards:
Summary
To add, subtract, multiply or divide functions just do as the operation says.
The domain of the new function will have the restrictions of both functions that made it.
Divide has the extra rule that the function we are dividing by cannot be zero
SOLUTION
so f(x)=g(h(x))f(x)=g(h(x)).
To do this, we look for a function inside a function in the formula for f(x).
As one possibility, we might notice that the expression
5−x2
is the inside of the square root. We could then decompose the function as
h(x)=5−x2 and g(x)=√x
We can check our answer by recomposing the functions.
g(h(x))=g(5−x2)=√5−x2