We want to find the composition functions f of g and g of f given f of x
equals x squared minus 2x plus 3 and g of x equals 2x plus 1. By definition f of
g is equal to f of g of X, so in this case notice how the function g becomes
the input into function f and g of f is equal to g of f of X, which means f of X
will be the input into function g so the order of the composition does matter. sSo
f of g is equal to f of g of X and just like the order of operations we'll start
with the innermost parentheses. And since there's no value to sub into function g
we're going to substitute 2x plus 1 for g of X so we'll have f of the quantity
2x plus 1 which means we're going to substitute 2x plus 1 into f wherever we
see an X. And since f of X is equal to x squared minus 2x plus 3 we'll have the
quantity 2x plus 1 squared minus 2 times the quantity 2x plus 1 plus 3. Again
notice every X in F has been replaced with the quantity 2x plus 1. Now we're
going to multiply all this out and combine like terms. So we'll have the
quantity 2x plus 1 times the quantity 2x plus 1 minus 2 times the quantity 2x
plus 1 plus 3 so here we'll have 4 products 1 2 3 4 and here we'll think of
distributing a negative 2 here and here.
So we'll have 2x times 2x that's 4x squared and then 2x times 1 that's 2x
and then 1 times 2x is also 2 X so we have plus 4x and then 1 times 1 is 1
minus 4x - two plus three. And now we'll combine
like terms. We only have one x squared term that's four x squared and then
notice here we have plus four X minus four X that's 0 so there are no X terms
and then we have 1 minus 2 that's negative 1 plus 3 would be positive 2. So
we have plus 2 so f of g of X or f of g
is equal to 4 x squared plus 2. Now let's determine g of f which is equal to g of
f of X. Again starting with the innermost parentheses we don't have a value to sub
in to f so we're going to replace f of X with x squared minus 2x plus 3 so this
will become g of the quantity x squared minus 2x plus 3 so all of this will be
the input into function g where f of X is equal to 2x plus 1. So we'll have 2
times the quantity x squared minus 2x plus 3 then don't forget we still have
this plus 1 again the X and g has been replaced with the quantity x squared
minus 2x plus 3 which is f of X. And now we'll distribute and combine like terms.
So we'll have 2x squared minus 4x plus 6 plus 1 so we have 2x squared minus 4x
plus 7 and again this would be G of f of X or just g of f.
so we can easily see the order of the composition does matter because the
result of these two compositions are different functions.
Remember these compositions would onlybe equal to each other and equal to X if
f and g were inverse functions.
Thank you for watching.