Hey, everyone, and welcome back. So in the last video, we talked about compositions of functions. And in this video, we're going to be taking a look at how we can evaluate functions that have been composed. Now, the interesting thing about evaluating composed functions is that there are actually multiple different methods you can use to do this. One of these methods is a shortcut method, but it doesn't work every single time. So without further ado, let's get right into this.
When dealing with composed functions, you'll often be asked to evaluate the function at a certain number. And to do this, one of the methods you can use builds off the last video where we composed two functions together. So the first method is taking two different functions and composing them, as we saw in the last video, and then taking whatever function we get from this composition and plugging in the number into the final function. This is one way we can evaluate composed functions, and to understand this, let's take a look at an example.
In this example, we have the function f(x)=x2 and g(x)=x−1. We're asked to find f(g(x)) and then evaluate f(g(3)). To solve this, I'm first going to find f(g(x)) by taking our inside function g(x) and plugging it into f(x). Since we see that g(x)=x−1 and f(x)=x2 we're going to end up with (x−1)2 as our composed function.
Now I do need to simplify this a bit because we typically want to get our most simplified answers, so (x−1)2 is the same thing as x−1 times x−1. Now I can do the FOIL method where I multiply these x's giving us x2, we'll have x times negative one which is negative x, we'll have negative one times x which is also negative x and the negative one times negative one which is positive one. Now from here I can combine the two negative x's giving us x2−2x+1. So this right here is what we get when we do the composition f(g(x)). Now we're asked to take this function here and evaluate it at 3 because we're trying to figure out what f(g(3)) is.
To find f(g(3)) notice how I can just take this x that we have here and replace it with 3, meaning all these x's can be replaced with 3. So we're going to end up having 32 minus 2 times 3 plus 1, and 32 is the same thing as 9, and we have minus 2 times 3, and 2 times 3 is 6, plus 1, 9 minus 6 is 3, so we end up with 3 plus 1 which is 4. So this right here is the solution for f(g(3)), and this is one of the methods we can use for evaluating composed functions. Now, you may recall at the start of this video, I mentioned that there's a potential shortcut method we could use.
Let's take a look at what this method would look like if we were solving the same problem. For this method, what you want to do is first figure out what your inside function is and then you want to evaluate that inside function at the number you're looking at. Once you've found what number this is equal to, you take that number and plug it into your final function to evaluate the composed function. Now that might sound a bit confusing, but let's take a look at this example here and see if we can do this step by step. We have the same two functions that we had before where we're trying to figure out what f(g(3)) is. Now rather than finding f(g(x)) first, instead, I'm going to figure out what g(3) is first. So g(3) is going to give us 3 minus 1 because we just replace this x with a 3 and 3 minus 1 is equal to 2. So now that we found g(3), we can evaluate f(g(3)) because notice that I did this first step where we found g of our number, so now I just need to evaluate f(g(3)). And f(g(3)), well, since g(3) is 2, this is the same thing as f(2). And for f(2), all I need to do is take 2 and plug it into our function f(x), so f(x)=x2 meaning that f(2) would be 22, and 22 is simply equal to 4. So notice when using the second method, we got the same answer that we did for the first method, except we did this much faster. So the question becomes at this point, why don't we just use this method every single time? Well, the reason for this is that oftentimes when solving these problems, you'll be asked to find f(g(x)) first before evaluating. And whenever this happens, you have to find the original composition before you can plug in your number. So this is a shortcut method that only works for some problems, but be very wary of whether or not you're asked to find f(g(x)) first. This is how you can evaluate composed functions. Hopefully, you found this video helpful. Let me know if you have any questions.