I was reviewing composition of functions today with some of my students as part of a bigger review on function basics. The example question I used, a simple one, specified that
f(x) = 2x - 1 and g(x) = sqrt(x) and asked them to write the equations for (f ○ g)(x), (f ○ f)(x), and (g ○ f)(x).
I showed them how to re-write the composition notation like this:
(f ○ g)(x) = f(g(x))
and then I asked, "Is this composition primarily an f function, or primarily a g function? If you could figure that out, then writing the equation will be really easy..."
The kids stared at me in silence.
I tried hinting at it, "Let's think about which function occurs first and which occurs last."
"G occurs first, followed by f taking in the output of g as its input," so said the kids. But they still weren't able to state what the primary function is. The hint was too esoteric.
I tried again with a silly analogy: "OK, let's say you first make someone really fat, and then you smoosh them down and flatten them out like a pancake, then are they primarily fat or primarily a pancake??"
Kids giggled and mumbled more or less in unison, "Primarily a pancake!"
"OK then. If g occurs first and then followed by f, what's your primary function here? Which one is the pancake?"
Kids mumbled, "F is the pancake."
"Are you sure? Which is the primary function here?"
"F," they said. They're still not sure how this helps them write the formula.
So, together we copied down the equation for f, since we know that this is going to be the basic form/framework for our composed function:
f(x) = 2x - 1
But since we know that f is no longer just taking in a simple x value but taking in the entire function output from g, we can replace the bold parts above with g(x) and its associated formula as shown below:
f(g(x)) = 2*sqrt(x) - 1
Easy breezy. (On the board, by the way, I made sure to circle the bold parts and to draw arrows between the equations to indicate which x's got replaced with what.) The whole thing took less than 5 minutes to teach and all the kids said they now understand both how to do it and the concept behind it. (I gave them two more questions to try, just to be sure. They had to do
(f ○ f)(x) and (g ○ f)(x) on their own, and they did them both quickly, correctly, and without any doubts.)
I think review sessions for small groups of struggling students are helping me to become a more efficient explainer altogether. I find myself thinking of different ways of explaining things than how I normally structure it in class.
So yeah, pancakes! They are the magical ingredient to teaching function compositions, apparently.