Sunday, 14 December 2014

Pre-Calculus for Dopes - Composition of Functions - Part I

One topic in pre-calculus that gives students pause is composition of functions.
Yet this concept is surprisingly simple.
A big part of the problem is the use of the same letter to serve as the independent variable of the given functions. This can be dealt with by a suitable substitution, or by following the step-by-step approach outlined here.

The so called fog of x and gof of x refer to the composition of the two functions g(x) and f(x) in different orders.
To understand what is really going on here, let's take a simple example.
Let f(x) = 2x and g(x) = x - 1.
In layman's terms, the function f is acting as a "doubler" on the independent variable x, and g is acting as a "reducer" by 1 on the independent variable. Remember the old idea of "function machine.

" Then when something goes in function machine "f," it comes out twice as large.
When something goes in function machine "g," it comes out smaller by 1.
When taking the composition of the two functions f and g above, we can think of this as putting the item first in one machine and then the other, the order depending on whether we are doing fog or gof.
Whatever letter comes last, that is the first machine we use.
Thus f(g(x)), in which the functions f and g are given as in the preceding paragraph, serves to double an input after it has been reduced by 1.

Specifically, x becomes 2x - 2 after passing through both function machines.

Let's see that a step at a time with a specific x.
Let x = 5.
Then g(5) is 5 - 1 or 4.

Then f(4) is 2*4 or 8.

Thus g(f(x)) has taken 5 to 2*5 - 2 or 8: exactly what we obtained.
What does the reverse action have, that is g(f(x))? Since f doubles and g reduces by 1, then this composition should reduce the double by 1.

Specifically, the composition takes x and turns it into 2x - 1.

Let us show this with a specific number.

Let x = 10.
Then f(10) = 20. Now g(20) = 19.
As you can see 19 is 1 less than 10 doubled, which is what we predicted.
This step-by-step approach will certainly never fail to get us what we need. So what is the difficulty you might ask? The problems arise when we take compositions of more complicated functions and we confuse the independent variable x, which is often called a dummy variable.

A dummy variable is so called because it serves no use other than representing some as yet determined value.
Because we can use x or y or z, or any other letter for that matter, the term "dummy" has come into use---perhaps from the expression, "Any dummy will do.
" Let us look at a way to deal with this composition by introducing a new "dummy variable" so that it is easier to distinguish the x in f from the x in g. Take the functions f(x) = 3x - 10 and g(x) = 1/x. Let us find both fog and gof.

Remember that when we evaluate any function, we replace the variable of the function by what is inside parentheses.

Thus if we wish to know f(3), we replace x in f by 3, whenever we see x.
As we said, the tricky part comes when the argument (that which is inside parentheses) is an expression containing the same variable. Let me clarify using f and g from the preceding paragraph.
To find f(g(x)), we have that f(g(x)) = f(1/x), in which I have replaced g(x) by 1/x.
Now to evaluate, we need to go to f(x) and replace x by 1/x. This would give 3(1/x) - 10. We can obviate this confusion by using the technique of dummy variable replacement. To do this, we let t be the dummy variable for x in g(x).
Then g(t) = 1/t.
Now f(g(t)) = f(1/t). Now we have different letters so it is easier to see things.
We then replace x by 1/t in f, to get f(g(t)) = 3(1/t) - 10. Since t and x can be considered the "same" insofar as their purpose, we have arrived at our result without some of the potential confusion.

Let us compute g(f(x)) in the same way. We have g(f(x)) = g(3x - 10). Now wherever we see t in g(t) we put 3x - 10. So we have g(3x - 10) = 1/(3x - 10). Again whether we end up with an expression in t or in x depends on which variable we end up replacing last; however, the result is exactly the same in either case as when we find the composition of two functions using the same dummy variable.

As demonstrated by the methods herein, composition of elementary functions should now be a walk in the park. And whether you keep the variables the same and go step-by-step or implement a dummy variable and go a more scenic route, you will certainly end up with the right answer.
And nothing is better than a stress-free walk in the park. Enjoy!

No comments:

Post a Comment