Welcome back, everyone. So up to this point, we've spent a lot of time talking about functions. In this video, we're going to be looking at how we can do some basic operations with functions like adding and subtracting. Thankfully, when it comes to adding and subtracting functions, the process is pretty straightforward. What can get confusing is the different types of notation that you're going to see, as well as finding the domain of functions once they've been added or subtracted. But don't worry about it because in this video, we're going to be going over some different examples and scenarios that will hopefully make this crystal clear. So let's get right into it.
Whenever we add and subtract functions, it's exactly how we add and subtract polynomials together. It's the same process. For example, if we had these two polynomials being added together, we know that we can just combine like terms to add them. We can see that we have an x2 term and then we have a 5x here, and then we have a 4 and a 7. Now the 4 and the 7 can combine to give us 11. So this is what the fully simplified polynomial would look like. We can also take these polynomials and represent them as functions so if we said f(x) was x2 + 4, and g(x) was 5x + 7, we could add these together in a similar way, so we would have x2 + 5x + 4 + 7 which is 11, so we would end up with the same polynomial that we did before when adding these as functions. Now something that you may see though is different notation because rather than seeing f(x) and g(x), it's possible that you'll also see this written as (f+g)(x). This is another way to write this same thing. Likewise, if you saw f(x) - g(x), this could also be written as (f-g)(x). So it's just important to watch out for this kind of notation because you may see it show up in this course.
Now, when dealing with the domain of adding two functions together, you actually need to figure out all the numbers that are common to both functions, so you need to find the domain that we have for the individual functions f and g, but then you also need to find them for the combined (f+g), or (f-g). This can be a bit of a complicated process, but to really solidify our understanding, let's see if we can solve an example.
So in this example, we are given three different functions up here, and we're asked to complete the operations below and find the domain and range for each new function. To start with f(x) + g(x), we need to take the f(x) function and g(x) function and add them together. I can see that f(x) is x2 + 1/x, and then I can see that g(x) is x2 + x + 2. To add these together what we can do is just add the like terms. Since we have 2x2, we're going to have 2x2. I only see that we have one, 1/x. So we're just going to have 1/x, then we have one x there, and then we have a +2. Nothing else combines, so this is what would happen when we add f and g together. Now we're also asked to find the domain of f and the domain of g, and then the domain of f+g. So we'll first find the domain of f, which is going to be this function that we have up here. To find the domain of f, we're looking for what this domain is, and I can see that we have an x in the denominator of a fraction. Whenever you have an x in the denominator, the x value cannot be equal to 0, because you can never divide by 0. So in order to make this function not break, we need to say that the x in the denominator cannot be equal to 0. Now for g, we just have a polynomial, and whenever you have these kinds of polynomials, any number that you plug in should work. So for g, we can say that our numbers go from negative infinity to positive infinity because all real numbers are defined. Now as for the domain of f+g, what we need to do is first look at all the individual situations we have, and I can see this one over x is the only thing really causing any kind of restrictions here, and I also see that when we add these together, it's the same one over x that's causing problems. So the domain of f+g is simply gonna be that x cannot equal 0. So this is how you can find the domain and range of the functions individually and then together.
Now let's take a look at this other example that we have where we have g(x) - h(x). To do this we're going to take our function g(x) that we see here, so we'll have x2 + x + 2 and then we're going to subtract from this h(x) which is x + √(x - 8). So to subtract these two functions what I'll first do is take this negative sign and distribute it into the function we have over here, so we're going to end up with x2 + x + 2, which is this entire thing, and then we have -x - √(x - 8), and then what we can do from here is combine like terms. I can see that we have this positive x and negative x, which are just going to cancel each other, meaning that our final polynomial is going to be x2 + 2 - √(x - 8), and since I can see that nothing else is going to combine, this is what our function is going to look like when we subtract h from g. Now we already discussed that the domain of g is all real numbers. It goes from negative infinity to positive infinity. And as for h, notice that we have a square root right here. The inside of the square root cannot be negative, So what we need to do is say that this x - 8 that is inside the square root has to be greater than or equal to 0 so that way it's not negative. Now if I go ahead and add this 8 to both sides of the equation, they'll get the 8s to cancel there, giving us that x is greater than or equal to positive 8. Meaning that our domain for h is going to be that x has to be greater than or equal to 8. Now as for the domain of g - h, well, if I look at the original expression that we have here, it's only the square root of x - 8 that's going to cause restrictions on the domain. And if I look at our final expression, we have the same square root of x - 8. So it's this same domain that we're going to have for g - h, meaning that x has to be greater than or equal to 8. So this is the domain of g, the domain of h, and the domain of g - h. So this is how you could add and subtract functions and find their domain. Hopefully, you found this video helpful, and let me know if you have any questions.