by Shelley Walsh ©2000
fog(x)=f(g(x))
and replacing things with what they are equal to.
fog(x)=f(g(x))=f(x2)
At this point you have to make sure to use function notation correctly (See my article Using Function Notation.) If it helps, rewrite the definition for f without the x. f( )=( )+1 and fill in the holes. (I will be doing that in all of the examples below, but you don't need to do it if you can keep track of things simply by replacing the x with what is in the parentheses.)
f(x2)=(x2)+1=x2+1.
In a similar way, we can find g°f. This should be the function that adds 1 and then squares.
gof(x)=g(f(x))=g(x+1).
g( )=( )2
so filling in the x+1, we get
g(x+1)=(x+1)2
One interesting thing to notice from this is that composition of functions is not a commutative operation. fog is not the same as gof.
Often to get practice with the idea of composition of functions and its notation students are asked to find f°g and gof, sometimes called fog and gof. When you do that you should be suspicious if you get the same answer for both of them, because most of the time that won't be right. In the following examples the instruction is to find fog and gof.
| f(x)=x3, g(x)= |
|
f( )=( )3.
Then fill in the holes.
Writing the definition of g without the x's, we get
| g( )= |
|
. |
Then fill in the holes.
| g(x3)= |
|
= |
|
. |
Writing the definition of f without the x's we get
g( )=( )2+( )+2 .
Then fill in the holes and simplify.
Writing the definition of g without the x's we get
This one can be a little confusing, so we have to be careful. Writing down the definition of f without the x's we get
f( )=4.
Then filling in the holes, there is no hole on the right side, so
f(x2+3)=4,
Since there is nothing to fill in on the right side, that's all there is to do.
gof(x)=g(f(x))=g(4)=42+3=16+3=19
This time I am filling in the hole with a number, because no matter what you put into the g function you get 4 out of it.
g( )=( )2+3
Fill in the hole here with a 4.
Basically the idea here is that f(x)=4 means that f(anything)=4, including 3, or if as before we write the definition of f without the x's we get
f( )=4
If we fill in the hole with a 3 we get, just as above, f(3)=4, because there is no hole to fill in on the right side.
gof(x)=g(f(x))=g(4)=3
g( )=3
Fill in the blank with a 4 to get it.