Hey, everyone, and welcome back. So we've been talking about function operations in recent videos. In this video, we're going to be looking at function compositions. When it comes to the 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 already seen 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. Before getting into composition, let's remind ourselves how we can evaluate functions at certain values. For instance, we have the function fx=x2+3x-10 and we're asked to evaluate this at f7. 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 times 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, and if we want to find fgx, notice we have gx on the inside, so that means we take all of these x's and we replace them with gx. So in this case, we're going to have fgx=(x-2)2+3×(x-2)-10. I won't bore you with the details of trying to simplify and foil everything out, but if you were to simplify this entire expression you should end up with x2-x-12. So this is what we get when we simplify fgx, and notice that the result is a function whenever we're doing a function composition. This is the main idea when composing a function.
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. In this first situation we have fgx. What this means is we need to put gx inside fx. So if we do this, x is going to be replaced with what we have here which is