Hey, everyone, and welcome back. So over the course of the past couple of videos, we've been talking about the composition of functions. Now, in this video, we're going to be taking a look at function decomposition. Decomposition is basically just the reverse of function composition, and this process can often be a bit tricky because it's hard to know when reversing this process what the functions are going to look like. We're used to starting with 2 functions and composing them into one thing, but if we start with the composed function and go backward, that step can be a bit tricky. But don't worry about it, because in this video, we're going to look at some strategies you can use to do this, and you might find that after doing this a few times, this process can be kind of fun because you can be creative with your answers here. Let's get right into this. There are many correct answers when it comes to decomposing a function. To understand this best, I think it's overall best to look at an example. In this example, we're told to express the function \( h(x) \) as:
h ( x ) = x - 2as a composition of 2 functions \( f \) and \( g \), so that \( h \) is equal to \( f(g(x)) \). This means that the function \( h(x) \) could also be written as \( f(g(x)) \), and we are asked to find what the individual functions would look like before this composition. We need to figure out what our functions \( f(x) \) and \( g(x) \) are going to look like. One common strategy for doing this is to look at your inside function and set that equal to whatever is inside an operation. For example, if you had a square root, you could set \( g(x) \) equal to what's inside the square root, which would be \( x - 2 \). So, in this case, we could say that \( g(x) \) is equal to \( x - 2 \), and then \( f(x) \) would be the square root, which is on the outside. However, we can't just write a square root by itself because that doesn't mean anything, so we have to make this: f ( x ) = x
This is one of the ways that we could decompose this function into \( f(x) \) and \( g(x) \), and this is going to be one of the most common strategies that you see. We know that this is correct, because if you were to take the function \( g(x) \) and plug it into \( f(x) \), \( \sqrt{x - 2} \) is what we started with, so this is an accurate decomposition.
However, I mentioned that there are many correct ways that we could decompose functions. Another strategy we could use is to set \( g(x) \) equal to the entire thing, \( \sqrt{x - 2} \), and in this case, \( f(x) \) would just be equal to \( x \), because notice if we took this function and plugged it in for \( x \), we would once again get \( \sqrt{x - 2} \). This might seem too simple and a bit ridiculous, but this is technically a completely correct answer also because if we recompose these functions, we get what we started with. In fact, when you get really good at this, you can try doing some really creative things. So let's say we start again with our original function \( f(g(x)) \), which is always going to be \( \sqrt{x - 2} \) for this example, you could make it something ridiculous. You could say that \( g(x) \) is equal to \( \sqrt{x - 2} - 1000 \), and in this case, \( f(x) \), the original function, would be \( x + 1000 \). Because notice, if you were to take this entire thing and plug it in there, the \( 1000 \) would cancel, and you would just be left with \( \sqrt{x - 2} \). This is another weird but perfectly okay strategy that you could take for decomposing these functions. Once you get good at this, you can get creative with the various decompositions you do. All of these solutions that we see here are perfectly acceptable ways to decompose this function. Some of these are a little ridiculous. The most common case that you'll see is the one that we have over here, but either way, this is how you can do basic function decomposition. Hopefully, you found this video helpful. Thanks for watching.