Consider the functions 𝑓 of 𝑥
equals 𝑥 minus two and 𝑔 of 𝑥 equals five minus 𝑥 squared.
Part a) Show that 𝑔 of 𝑓 of 𝑥
equals one plus four 𝑥 minus 𝑥 squared.
𝑔 of 𝑓 of 𝑥 is a composite
function. It means that we take an input
value 𝑥, apply the function 𝑓 first, and then apply 𝑔 to the result. In this case though, we’re looking
to find a general algebraic expression for the composite function 𝑔 of 𝑓 of
We start with an 𝑥-value. The function 𝑓 of 𝑥 is 𝑥 minus
two, meaning we subtract two from our 𝑥-value. This then becomes the input for the
second function, 𝑔. The function 𝑔 of 𝑥 is five minus
𝑥 squared. So we take our new input of 𝑥
minus two and replace 𝑥 with it, giving five minus 𝑥 minus two all squared.
We need to simplify this algebraic
expression. So first, we’ll expand the
brackets. 𝑥 minus two all squared means 𝑥
minus two multiplied by 𝑥 minus two. You can use the FOIL method to help
with this expansion if you wish. 𝑥 multiplied by 𝑥 gives 𝑥
squared. 𝑥 multiplied by negative two gives
negative two 𝑥. Negative two multiplied by 𝑥 gives
another lot of negative two 𝑥. And negative two multiplied by
negative two gives positive four.
We can then simplify this expansion
by grouping like terms. In the centre, we have negative two
𝑥 minus two 𝑥, which is equal to negative four 𝑥. So we can replace 𝑥 minus two all
squared with our expanded version of 𝑥 squared minus four 𝑥 plus four.
Now we need to expand this larger
bracket which has a negative sign in front of it. This means that we’re multiplying
the whole bracket by negative one, which just has the effect of changing all of the
signs. So the five stays the same. We then have negative 𝑥 squared
plus four 𝑥 minus four.
We’re nearly there with the
simplification. But we just have one final step,
which is to group the like terms. In this case, the only like terms
are the five and negative four, which are both constant terms. They have no 𝑥s or 𝑥
squareds. Five minus four is one. And we’ll just swap the order of
the other two terms around to be consistent with the way 𝑔 of 𝑓 of 𝑥 is written
in the question. We’ve shown then that 𝑔 of 𝑓 of
𝑥 is equal to one plus four 𝑥 minus 𝑥 squared as required.
Part b) of the question says,
“Solve 𝑔 of 𝑓 of 𝑥 equals 𝑓 of 𝑔 of 𝑥.”
Here the two functions have been
composed in different orders. 𝑔 of 𝑓 of 𝑥, remember, means we
apply 𝑓 first and then apply 𝑔, whereas 𝑓 of 𝑔 of 𝑥 means we apply 𝑔 first and
then apply 𝑓. Applying functions in different
orders does not give the same result in general.
We have an algebraic expression for
𝑔 of 𝑓 of 𝑥 from part a). It’s one plus four 𝑥 minus 𝑥
squared. But we don’t have one for 𝑓 of 𝑔
of 𝑥. So our first step is going to be to
find this composite function. 𝑔 of 𝑥 is the function five minus
𝑥 squared, and then we’re applying 𝑓 to this. 𝑓 of 𝑥 is the function 𝑥 minus
two, meaning we take our input value and subtract two.
So if our input value is five minus
𝑥 squared, then we now have five minus 𝑥 squared minus two. This simplifies to three minus 𝑥
squared. So this is our algebraic expression
for 𝑓 of 𝑔 of 𝑥.
Next, we’ll take our two algebraic
expressions for 𝑔 of 𝑓 of 𝑥 and 𝑓 of 𝑔 of 𝑥 and substitute them into the two
sides of the equation. 𝑔 of 𝑓 of 𝑥 is one plus four 𝑥
minus 𝑥 squared, and 𝑓 of 𝑔 of 𝑥 is three minus 𝑥 squared. So we have the equation one plus
four 𝑥 minus 𝑥 squared equals three minus 𝑥 squared.
Notice that both sides of this
equation have a term of negative 𝑥 squared. So these will cancel each other
out. You could also see this by adding
𝑥 squared to each side of the equation. Once these terms have been
cancelled out, we’re left with the linear equation one plus four 𝑥 equals three,
which we need to solve for 𝑥.
To do so, we first subtract one
from each side, giving four 𝑥 equals two, and then divide both sides of the
equation by four, giving 𝑥 equals two over four. But of course, the fraction two
over four should be simplified to one over two or one-half by dividing both the
numerator and denominator by two.
So we’ve solved the equation 𝑔 of
𝑓 of 𝑥 equals 𝑓 of 𝑔 of 𝑥 and found that 𝑥 is equal to a half. You could of course substitute this
value of a half back into the two composite functions and confirm that they do
indeed give the same answer.