Loading...
Hello, Mr. Robson here.
Welcome to Maths.
Today we're writing composite functions and you know you can't spell the word function without fun, and you'll be pleased to hear that composite functions are even more fun than regular functions.
So let the fun begin.
A learning outcome is that we'll be able to write a composite function both numerically and algebraically.
Some keywords we're going to hear today: composition, functions, composite function.
The composition of functions is the process of combining two or more functions into a single function.
For example, the composite function gf of x is the combination of f of x and g of x.
The output from f of x is input for g of x.
Two parts to our learning today.
Let's begin with Substitution and Notation.
If f of x equals 4x and g of x equals 6x plus 3, we can evaluate lots of things, such as f of 5, two lots of f of 5, g of 8, three lots of g of 8.
To evaluate f of 5, we substitute 5 into the function f of x, so 4x becomes four lots of 5, that's 20.
For g of 8, the input 8 goes into the function g of x, six lots of 8 plus 3 is 51.
For the function two lots of f of 5, we take the output from f of 5 and multiply it by 2 to get 40.
Similar thing for three lots of g of 8.
We take the output of g of 8, 51 and multiply it by three and we get 153.
Did you know that we can also evaluate gf of 5? Well that sounds unusual.
Let's try and break it down a bit.
This is called a composite function.
It's composed of two functions.
The output of one function is the input of the other function.
For two lots of f of 5, the output of f of 5 was multiplied by two.
For gf of 5, the output of f of 5 is substituted into the function g of x.
So you might see that written like this.
The output of f of 5 is going to go through the function g of x.
We know the output of f of 5, we evaluated that already, it's 20, so the value 20 needs to go into the function g of x.
When that happens, we get six lots of 20 plus 3.
We've evaluated gf of 5 and we've got 123.
We can also evaluate fg of 8.
For fg of 8, the output of g of 8 is substituted into the function f of x.
It's the other way round this time.
Something coming out of the g of x function going into the f of x function.
We might write it like this.
And then we know g of 8, it's six lots of 8 plus 3, that's 51.
So 51 goes into our function f of x.
Four lots of 51 is 204.
We've evaluated fg of 8.
Quick check you've got that now.
Use some of the labels to complete the two statements.
If f of x equals 7x and g of x equals 2x minus 6, there's two sentences there that you can complete with four of the labels from the bottom of the screen.
Pause and see if you can complete those two sentences now.
Welcome back.
Hopefully your sentences read: For fg of 3, the output of g of 3 is substituted into the function f of x.
And for gf of 9, the output of f of 9 is substituted into the function g of x.
Well done.
Next, I'd like you to match these pairs.
If f of x equals 7x and g of x equals 2x minus 6, can you pair up the functions on the left to the method on the right? Pause and try this now.
Welcome back.
Let's see how we did.
For fg of 3, that's the output of g of 3 being input into f of x.
The output of g of 3 would be two lots of 3 minus 6.
That's why you pair those together.
For fg of 9, that's the output of g of 9 being input into f of x.
The output of g of 9 will be two lots of 9 minus 6, hence that pair.
For gf of 3, that's the output of f of 3, going into the function g of x.
Well, the output of f of 3 would be seven lots of 3 and there it is going into the function g of x, leaving us one final pair, gf of 9 will be g lots of 7 multiplied by 9.
One final check now.
Can you evaluate these composite functions? If f of x equals 7x and g of x equals 2x minus 6, can you evaluate fg of 3, fg of 9, and so on.
Pause, give these four a go.
I'll be back in a moment with the solutions so you can compare your maths to mine.
Welcome back.
Let's see how we did.
Now when you are evaluating composite functions like this, you might find it easier to start with evaluating f of 3, f of 9, g of 3 and g of 9, because as you can see from the notation, the outputs of those functions are going to become the inputs when we evaluate these composite functions.
So for fg of 3, we need the outputs of g of 3, that's zero and that's gonna go into the function f of x, fg of 3 evaluates to zero.
For fg of 9, the output of g of 9 is gonna go into f of x.
That becomes seven lots of 12, that's 84.
For gf of 3, we need the output of f of 3, that's 21 and it needs to go into the function g of x.
When it does, we get 36.
Finally, gf of 9, the output of f of 9, 63 going into the function g of x to give us 120.
Laura and Lucas are discussing composite function notation.
Laura says something very logical.
"In algebra ab means a multiplied by b, which is the same as b multiplied by a.
So I think fg of x is the same thing as gf of x." What do you think? Do you agree with Laura? Lucas doesn't.
Lucas has got a very interesting statement.
"Yes, a multiplied by b is identical to b multiplied by a, but with respect to fg of x and gf of x, this is function notation.
fg of x is the function f of x happening to the output of g of x." And I think Lucas was going to say something else, but Laura's got it.
"I've got it! So gf of x is the function g of x happening to the output of f of x." fg of x and gf of x are not necessarily the same thing.
In most cases, the two are not equivalent.
However, there are some exceptions to this.
Can you think of them? Cases where fg of x will give you the same result as gf of x? Pause and have a think and I'll be back with the big reveal in a moment.
Welcome back.
If you've got this, you really are a good thinker.
The two cases which are exceptions are when f of x equals g of x, i.
e.
when the two functions are identical.
If the two functions are identical, the output of g of x going into f of x will be the exact same as the output of f of x going into g of x.
There's one exceptional case where fg of x and gf of x will give you the same result.
What's the second one? It involves inverse functions.
When one function is the inverse of the other, fg of x and gf of x will be the same thing.
Quick check you've got that.
fg of x equals gf of x.
Is that true: always, sometimes, or never? Pause, tell the person next to you or explain to me at the screen.
See you in a moment.
Welcome back.
I hope you said sometimes.
fg of x and gf of x will typically not be the same thing, but there are some exceptions.
They will be the same if the two functions are identical, i.
e.
f of x equals g of x or if one function is the inverse of the other.
Sometimes we will see functions composed of more than two functions.
For example, if we had three functions, f of x equals 2x, g of x equals 5x and h of x, a third function equals 3x minus 7.
We can evaluate f of g of h of 4.
Wow, there's a lot going on there.
Let's unpick it.
In this function, the output of h of 4 becomes the input of g of x.
The output of h of 4 is three lots of 4 minus 7, that's 5.
So 5 becomes the input to g of x.
Then the output of g of 5 is the input of f of x.
The output of g of 5 is 25.
That becomes the input into f of x.
When 25 goes into f of x, two lots of 25 is 50.
Oh hoorah, we've successfully evaluated f of g of h of 4.
Quick check you've got that.
Which of the below is the correct working for g of h of f of 5? There's a lot of maths on this screen.
You'll wanna pause, take a good few minutes to read, check, think, and then take your pick.
Is it option A, B, or C? See you in a moment for the answer.
Welcome back.
Hopefully you picked out option C.
f of 5 equals 15 and that's the input into h of x.
h of 15 equals 21 and that's the input into g of x which gives us 63.
We'll also see composite functions which are repeated uses of the same function.
I'm only talking about one function now, f of x.
f of x equals 5x plus 3.
In this case we can evaluate f of 2.
It's lovely and simple.
That's x equals 2, going into the function 5x plus 3.
But we can also evaluate f of f of 2.
In this case, the output of f of 2 goes back into the same function f of x.
We know the output of f of 2, it's 13, it goes back into the f of x function.
Five lots of 13 plus 3 equals 68.
We can also evaluate f of f of f of 2.
That is the output of f of f of 2 going back into the function f of x.
Well, we know the output of f of f of 2, it's 68.
When 68 goes back into the function, five lots of 68 plus 3 becomes 343.
Quick check that you can repeat that skill.
g of x equals 4x plus 25.
Can you evaluate g of 3, g of g of 3 and g of g of g of 3.
Pause.
Good luck.
Welcome back.
Hopefully, for g of 3, four lots of 3 plus 25 equals 37.
For g of g of 3, you had the output of g of 3 going back into the function g of x, that's 37 going back into our function g of x to give us 173.
For the last one, g of g of g of 3.
That's the output of g of g of 3, i.
e.
173 going back into the function g of x.
When that happens, we get four lots of 173 plus 25, that's 717.
Practise time now.
For question one, if f of x equals x minus 12, g of x equals 6x and h of x equals 3x plus 4, can you evaluate these nine functions? Pause and work those out now.
Question two looks very similar to question one.
There's three functions but one of them slightly more complicated.
f of x equals 4x, g of x equals 2x minus 5, h of x equals x squared plus 1.
If those are three functions, can we evaluate these 16 things? f of 8, g of 4, h of 2, gf of 8, et cetera? Pause and have a go at evaluating those now.
Question three, we're going to mark Laura's work.
f of x equals three lots of x plus 8, g of x equals 2x minus 20, h of x equals x squared.
Laura has evaluated hg of 5, f of h of f of 1 and f of h of g of 9.
What I'd like you to do is look closely at her work, highlight any errors, and where you see an error, write a sentence of feedback to Laura to explain what she could improve.
Pause and do this now.
Feedback time now.
Let's see how we got on.
Question one, Part A: f of 15 is 3.
For B: g of 5 is 30.
h of 1 is 7.
Now on to the more interesting ones.
gf of 15 becomes g of 3, which is 18.
hg of 5 is 94.
fh of 1 is negative 5, f of f of 15 is negative 9, g of g of 5 is 180.
h of h of 1 is 25.
Just pause and check that your method, your answers match mine.
Question two: f of 8 equals 32, g of 4 equals three, h of 2 equals 5, g of f of 8 equals 59, h of g of 4 equals 10 h of h of 2 equals 26, g of g of 4 equals 1, g of g of g of 4 equals negative 3, h of h of h of 2 equals 677, h of g of f of 8 equals 3,482, and f of h of g of 4 equals 40, and g of h of g of 4 equals 15.
Again, pause, check that your work matches mine.
Question three was nice, we were marking Laura's work.
In the case of part A, there comes the error.
It's the output of g of 5 that should go into h of x might be the feedback we should have written for her.
In part B, the first step is fine, the second step is fine and the output is absolutely fine.
f of h of f of 1 is 2,211.
For part C, the first step was right, but here we have an error.
She's got the right order in terms of outputs going into inputs, but Laura's got the wrong output of h of negative 2.
Onto the second half of our learning now, where we're going to write composite functions algebraically.
Mathematicians are always seeking efficiency.
If f of x equals 6x, g of x equals x minus 5, we can evaluate f of g of 1, f of g of 2, f of g of 3, f of g of 4.
In the case of f of g of 1, we're taking output from g of 1 and inputting it into f of x.
Something similar will happen for f of g of 2, f of g of 3 and f of g of 4.
We took the output of g of 2, input it into f of x, the output of g of 3, input it into f of x, the output of g of 4 and input it into f of x.
In each case we have to substitute into two functions.
But we can improve our efficiency.
That's good news isn't it? We can improve our efficiency by writing the algebraic form for the combined function f of g of x.
In this case, we describe it as expressing the composite function f of g of x.
Just as x minus five is an expression for the function g of x, we can write an expression for the function f of g of x.
The output of g of x is going to go into the function f of x.
What is the output of g of x? Well, it's x minus 5.
That is input into the function f of x.
When x minus 5 goes into the function f of x, we get six lots of x minus 5.
If f of x equals 6x and g of x equals x minus 5, then f of g of x can be written as one function, six lots of x minus 5.
What we can now do is evaluate f of g of 1, f of g of 2, et cetera, much faster.
Because we've got an expression for f of g of x, we can just substitute into one expression.
x equals 1 goes into our f of g of x, six lots of 1 minus 5 becomes negative 24.
For f of g of 2, 2 goes into the expression for f of g of 3, 3 goes in and 4 goes in, and look, we now only have to substitute into one function.
That is more efficient.
And we mathematicians, we enjoy efficiency.
Quick check you've got that.
Which of these is an expression for the composite function g of f of x? Pause, have a think, take your pick.
See you in a moment.
Welcome back.
Hopefully you said option B.
That is the output of f of x going into the function g of x.
The output of f of x is 6x.
When that goes into the function g of x, we get 6x minus 5.
We will see slightly more complex cases.
Can you see the complexity in this example? f of x equals x squared plus x.
g of x equals x plus 3.
So when we try to write an expression for f of g of x, the output of g of x has to go into f of x.
So, x plus 3 has to go into the function x squared plus x, so out comes x plus 3 squared plus x plus 3.
We can expand and simplify this expression.
X plus 3 squared becomes x squared plus 6x plus 9, and then we add the x plus 3.
Simplify all that.
We get x squared plus 7x plus 12.
If f of x equals x squared plus x and g of x equals x plus 3, then f of g of x can be written as one function, f of g of x equals x squared plus 7x plus 12.
Laura and Lucas are discussing these functions.
f of x equals x squared minus x and g of x equals x plus 5.
Laura says, "If f of x equals x squared minus x and g of x equals x plus 5, then f of g of x is x plus 5 squared minus x plus 5." Lucas says, "We can expand and simplify that.
x plus 5 squared minus x plus 5 equals x squared plus 10x plus 25 minus x plus 5, which equals x squared plus 9x plus 30.
Have Laura and Lucas got the right function for f of g of x? Look closely at their work and you decide, is it right? Pause.
I'll see you in a moment.
Welcome back Hopefully you noticed that the first bit was absolutely perfect, and Lucas was right to say we can expand and simplify.
And the first step of that process went well but something went awry when we arrived at x squared plus 9x plus 30.
Laura's spotted something.
"Got it! We have to subtract both terms inside the bracket X plus 5." Be wary of this, for it's a common error.
When we see x squared plus 10x plus 25 minus brackets x plus 5, we have to subtract both of those two terms. Lucas has another go, which is something we should always do if we make an error in maths.
Lucas says, "Of course, so it should be x plus 5 squared minus x plus 5 equals x squared plus 10x plus 25 minus x plus 5, which reads x squared plus 10x plus 25 minus x minus 5, which simplifies to x squared plus 9x plus 20.
Well that looks much better, you two.
Well done.
Quick check that you can do that.
Which is the correct form for the composite function f of g of x? Pause, see if you can work out an expression for f of g of x and then is it one of those three there? Is it option A, option B, option C? See you in a moment.
Welcome back.
Hopefully you picked out option C.
Why is it so? Well expand the first bracket and then be super careful to subtract both terms inside that second bracket and that simplifies to x squared plus 3x plus 2.
Another one for you.
Slightly more complicated this time.
Which is the correct form for the composite function f of g of x if f of x equals x minus x squared and g of x equals x plus 4? Pause, see if you can work this one out.
Welcome back.
Hopefully you went for option A.
Why so? Well the output of g of x going into the function f of x would read x plus 4 minus x plus 4 squared.
Let's expand that x plus 4 squared and then be sure to subtract every term inside that bracket.
Now we can simplify from there and you get option A: f of g of x equals negative x squared minus 7x minus 12.
Practise time now.
For question one, f of x equals 8x, g of x equals x minus 3.
With that in mind, can you write an expression for these composite functions? Pause and write those four expressions now.
Question two, I'm marking some work again.
In this case I'd like to mark Laura's work, highlight any errors and when you see an error, write a sentence of feedback to Laura to explain what she could improve.
Pause and do that now.
Question three, write an expression for these composite functions there's an added level of complexity because f of x equals x squared minus x and g of x = x plus 4.
Pause and see if you can write these three expressions now.
Feedback time now.
Let's see how we did.
For question one, we're writing expressions for these four composite functions.
For part A: f of g of x.
Well, that becomes x minus 3 going into the function f of x, which would leave us with eight lots of x minus 3.
And you can just leave it in that form.
You don't have to expand that bracket.
For part B, g of f of x, well, that's the output of f of x 8x going into the function g of x, giving us 8x minus 3.
For part C: f of f of x, well that's the output of f of x going back into f of x, giving us 64x.
Finally, D: g of g of x becomes x minus 6.
Question two, we were marking Laura's work.
I asked to highlight any errors and then write a sentence of feedback to explain what could be improved.
For part A, Laura was trying to express g of f of x, and the first step is perfect, as is the second step, the third step, what do you think? That too is perfect.
However, in the next step we get an error, which then condemns any steps beyond that.
You might have written, in terms of feedback for Laura, you need to subtract both terms inside the bracket.
When you subtract negative 7, that becomes plus 7, not minus 7.
So to do that step correctly, it should have read x squared minus 14x plus 49 minus x plus 7, which would simplify to x squared minus 15x plus 56.
For part B, Laura was trying to express h of f of x and the first step was perfect.
The second step had an error which then condemns every step beyond it, so what was the error? What feedback might we have offered? You might have written yes, x minus 7 is the input for the function h of x, but h of x minus 7 is x minus 7 squared plus x minus 7.
If we'd done that correctly, it would have looked like so, giving us an expression for h of f of x, x squared minus 13x plus 42.
Finally, question three.
We were writing an expression for these composite functions.
For part A: g of f of x was x squared minus x plus 4.
For part B: f of g of x became x plus 4 squared minus x plus 4, which expands and simplifies like so.
For part C: f of f of x, this one was particularly beautiful because x squared minus x needs to go back into the function.
When you expand and simplify those brackets, you get x to the power 4 minus 2x cubed plus x.
Sadly, we're at the end of the lesson now, but what have we learned? We've learned that a composite function can be evaluated numerically as well as expressed algebraically.
For example, if f of x equals 9x and g of x equals x minus 8, we can evaluate f of g of 1, or f of g of 2 or any other numerical input and we can also write an expression for f of g of x.
Hope you've enjoyed this lesson as much as I have and I look forward to seeing you again soon for more mathematics.
Bye for now.