Hi. This is Anthony Varela, and today, we're going to add and subtract functions. So we'll be working with two functions-- f of x and g of x. We'll add two functions when their arguments are different values, and then we'll go through an example where the arguments are the same.
So let's begin with our addition examples. So here, we've defined f of x as negative 2x plus 8. And g of x is x squared plus 4. And we would like to evaluate f of 2 plus g of 3. So when adding these two functions, we're going to add these two functions separately and then combine their values. So we're going to evaluate f of 2. Then we're going to evaluate g of 3, and then just add those two values together.
So evaluating f of 2, I'm just going to substitute 2 in for x. So I have negative 2 times 2 plus 8. So this would be negative 4 plus 8, or 4. So f of 2 equals 4. How about g of 3? Well, I'm going to substitute 3 in for x for our function g. So I have 3 squared plus 4. Well, this then would be 9 plus 4, or 13. So g of 3 equals 13.
Now we can just add g of 3 to f of 2. So that would be 4 plus 13, or 17. So these two functions, f of 2 plus g of 3, equals 17.
Now, working with these same definitions of our functions, we'd like to evaluate f of 4 and g of 4. Now, here, we notice that their argument is the same. So the argument is the value that's inside of the function. So we're evaluating f at 4, and we're evaluating g at 4. Now, when their arguments are the same, what we could do is add the functions together and then evaluate at the very end, plug in 4 at the very end.
And we can use a special notation, because their arguments are the same. We can say f plus g of x. So let's see how that would work, f plus g of x. Well, I'm going to take my defined f function, so negative 2 plus 8, and I'm going to add to that x squared plus 4.
So I'm just going to move some terms around so that they're in proper order of descending degrees. So I have my x squared minus 2x. Then I have plus 8 and plus 4, which is plus 12. So this is f plus g of x. And now I can evaluate f plus g of 4. So substituting, then, 4 in for x. Well, I get 4 squared minus 2 times 4 plus 12, which would be 16 minus 8 plus 12 is 20. So f of 4 plus g of 4 is 20. I could say that is f plus g of 4, as well.
So now we're going to go through our subtraction examples, and this is the same principles here. We'll just be subtracting instead of adding. So f of x is 3x squared minus 15, and g of x is 7x minus 4. And we would like to evaluate f of 2 minus g of negative 1. So with subtracting functions, we can evaluate these two functions separately and then subtract them. So let's evaluate f of 2.
So I'm going to be taking f of x, 3x squared minus 15, but just writing in 2 for x. So f of 2, then, would be 4 times 3, which is 12, minus 15. So f of 2 equals negative 3.
Now let's evaluate g of negative 1. So I'm going to look at my function g of x and substitute negative 1 in for x. So I have 7 times negative 1 minus 4. Well, this would be negative 7 minus 4, or negative 11. So g of negative 1 equals negative 11.
Now I'm going to subtract these two functions, so negative 3 minus negative 11. That can be thought of as negative 3 plus 11, which is 8. So f of 2 minus g of negative 1 is 8.
So now let's go through an example of subtracting two functions with the same argument. So I have the same value inside of f and inside of g. Well, I could subtract the two functions using x and then substitute 3 in after that. And my notation here, instead of f plus g, like in our example with addition, we have f minus g of x.
So to write f minus g of x, I'm going to take my function f-- so that would be 3x squared minus 15. And especially with subtraction, it's going to be very important to group this around parentheses so they don't get confused with positives and negatives. And then we're going to subtract g of x. So I'll write in my minus sign and then, in parentheses, I have 7x minus 4.
So now we just have to simplify this equation. So I have my 3x squared minus 15, and now I'm going to distribute this negative, because we have subtraction. So I'll have a minus 7x and plus 4, because I have a minus negative 4. Now we can combine like terms, switch things around in proper order, so we have 3x squared minus 7x. And then negative 15 and positive 4 simplifies to negative 11.
So now that I have defined f minus g of x, I can evaluate f minus g of 3 by substituting x with 3. So this would be 3 times 3 squared minus 7 times 3 minus 11. Well, 3 squared is 9, times 3 is 27. 7 times 3 is 21, so I'll subtract 21. And then we have our minus 11. This evaluates, then, to negative 5. So we can say that f of 3 minus g of 3 is negative 5. We could say that f minus g of 3 is negative 5, as well.
So let's review adding and subtracting functions. With adding and subtracting functions, you could evaluate separately and then add them together or subtract them together, whichever operation you're doing. If they have the same argument, you can combine the two functions and then make the substitution. So thanks for watching this video on adding and subtracting functions. Hope to see you next time.