Hey, everyone, and welcome back. So we've been talking about function operations in recent videos. And in this video, we're going to be looking at function compositions. Now, when it comes to composition of functions, this process can often be a bit difficult when you first encounter it. But in this video, we're going to take a look at some examples of things that we've seen already up to this point and see how we can build off of this to really understand this concept of composing a function. So let's get right into this. When it comes to a function composition, it's like evaluating a function at a certain number, but instead of replacing the inside of the function with a variable, you replace the function with another function. Now before getting into composition, let's remind ourselves how we can evaluate functions at certain values.
So, in this case, we have the function fx=x2+3x-10, and we're asked to evaluate this at f7. So in this case, we're going to take all of our x's and replace them with 7. So x2 will become 72 and then we'll have 3×7 minus 10. Now 72 is 49 and then this is going to be plus 3×7, which is 21 minus 10, and if you go ahead and combine all these numbers here, you should get 60. So when you evaluate a function at a certain number, you're going to end up getting a number as your final result.
Now, when it comes to composing a function, it's very similar to this process of evaluating a function, except rather than replacing the x with a number, we're going to replace x with another function. So, in this case, we have fx=x2+3x-10 and then we have gx=x-2. If we want to find fg(x), notice we have g of x on the inside, so that means we take all of these x's and we replace them with g of x. So in this case, fg(x) is equal to x-22+3×x-2-10.
Now, if you were to simplify this entire expression, you should end up with x2-x-12. This is what we get when we simplify fg(x), and notice that the result is a function whenever we are doing a function composition. This is the main idea when composing a function. Now something to note here is that whenever you see the situation where you have fgx, this composition, you can also write this notation as f∘gx. This is another way to write this notation. So it kind of looks like the word "fog" where we have this open circle in between f and g and then the x here. This is the same thing as putting g inside of f, and whenever you see this notation, the first letter that you see, this f here, is going to be the outside function. So like the function that you have on the outside, whereas the second letter that you see, this g here, is going to be the inside function. So that's just something to keep in mind.
Now let's see at this point if we can solve an example. In this example, we have the function fx=x+4 and gx=x2-3. We're asked to find the following composite functions and fully simplify our answer. So, in this first situation, we have fg(x). This means we need to put g of x inside of f of x. So we're going to take whatever x's we see and replace it with g of x. So x is going to be replaced with x2-3, and then we're going to have this plus 4 afterwards. This right here is going to be our composite function, and if I go ahead and simplify this, well, this minus 3 and this positive 4 will combine, so negative 3 plus 4 is 1, so we should end up with x2+1, and this right here is the composite function and the answer for fg(x).
For part b we're asked to find gf(x) and notice, in this function composition, f of x is the inside function. So that means we're going to do things backward, and we're going to take our f of x here and we're going to plug it inside of g of x. So, in this case, we're going to replace the X with this expression here; x+4 squared minus 3. Now we need to do a bit more work here because notice we have x+4 squared, so x+42-3 is the same thing as x+4 squared minus 3. Now at this point, I can use the foil method; we have x times x, which will give us x squared, we have x times 4, which will give us 4x, we have 4 times x, which is 4x, and then we have 4 times 4, which is 16, and then this whole thing will be minus 3. Now, at this point, we can combine these 4x's here to give us 8x, so we have x+8x+16-3, and 16 minus 3 is 13. So this right here is going to be our polynomial, which we get when we simplify gf(x). So dealing with the compositions in this problem, gf(x) would look like this, and fg(x) would look like that. So this is how you can do composition of functions. Hopefully, you found this video helpful, and let me know if you have any questions.