Just like we can add and subtract numbers, we can add and subtract functions. For example, if we had functions f and g, we could create two new functions: f+g and f−g.
Adding two functions
Let's look at an example to see how this works.
Given that f(x)=x+1 and g(x)=x2−2x+5, find (f+g)(x).
The most difficult part of combining functions is understanding the notation. What does (f+g)(x) mean?
Well, (f+g)(x) just means to find the sum of f(x) and g(x). Mathematically, this means that (f+g)(x)=f(x)+g(x).
Now, this becomes a familiar problem.
(f+g)(x)=f(x)+g(x) Define.=(x+1)+(x2−2x+5) Substitute.=x+1+x2−2x+5 Remove parentheses.=x2−x+6 Combine like terms.
We can also see this graphically:
The images below show the graphs of y=f(x), y=g(x), and y=(f+g)(x).
From the first graph, we can see that f(2)=3 and that g(2)=5. From the second graph, we can see that (f+g)(2)=8.
So f(2)+g(2)=(f+g)(2) because 3+5=8.
Now you try it. Convince yourself that f(1)+g(1)=(f+g)(1).
Evaluate each expression.
From the graph below, we see f(1)=2 and g(1)=4.
From the graph of f+g, we see that (f+g)(1)=6.
So f(1)+g(1)=(f+g)(1) because 2+4=6.
Let's try some practice problems.
In problems 1 and 2, let a(x)=3x2−5x+2 and b(x)=x2+8x−10.
(a+b)(x)=a(x)+b(x) Define.=(3x2−5x+2)+(x2+8x−10) Substitute.=3x2−5x+2+x2+8x−10 Remove parentheses.=4x2+3x−8 Combine like terms.
There are two ways to find (a+b)(−1).
Method 1: Find (a+b)(x) and evaluate at x=−1.
We found in the last problem that (a+b)(x)=4x2+3x−8. Let's substitute in x=−1.
Method 2: Find a(−1) and b(−1) and add the two results.
First, let's find a(−1):
Now, let's find b(−1):
So we have that:
Since we found (a+b)(x) in the last problem, method 1 may be more efficient.
Subtracting two functions
Subtracting two functions works in a similar way. Here's an example:
p(t)=2t−1 and q(t)=−t2−4t−1.
Let's find (q−p)(t).
Again, the most complicated part here is understanding the notation. But after working through the addition example, (q−p)(t) means just what you'd think!
By definition, (q−p)(t)=q(t)−p(t). We can now solve the problem.
=(q−p)(t)=q(t)−p(t)Define.=(−t2−4t−1)−(2t−1)Substitute.=−t2−4t−1−2t+1Distribute negative sign.=−t2−6tCombine like terms.
Let's try some practice problems.
(j−k)(n)=j(n)−k(n) Define.=(3n3−n2+8)−(−8n2+3n−5) Substitute.=3n3−n2+8+8n2−3n+5 Distribute negative sign.=3n3+7n2−3n+13 Combine like terms.
There are two ways to find (h−g)(3).
Method 1: Find h(3) and g(3) and subtract the two results.
First, let's find h(3):
Now, let's find g(3):
So we have:
Method 2: Find (h−g)(x) and evaluate at x=3.
When x=3, we have:
Using either method, we see that (h−g)(3)=−16.
One college states that the number of men, M, and the number of women, W, receiving bachelor degrees t years since 1980 can be modeled by the functions M(t)=526−t and W(t)=474+2t, respectively.
Let N be the total number of students receiving bachelors degrees at that college t years since 1980.
Write an expression for N(t).
Since the total number of students receiving bachelors degrees at that college is comprised of men and women, we have N(t)=M(t)+W(t).
We can substitute to find N(t) in terms of t.
The graphs of y=f(x) and y=g(x) are plotted on the grid below.
Which is the graph of y=(f+g)(x)?
Let's find (f+g)(x) for a particular value of x. Then we can use that to select the correct graph. Let's try x=4.
(f+g)(4)=f(4)+g(4)=4+g(4) Since f(4)=4=4+0 Since g(4)=0=4
So (f+g)(4)=4, which implies that the graph of y=(f+g)(x) must pass through (4,4). Since only graph A goes through (4,4), it must be the correct graph.
The above explanation was given for x=4, but you could think about this for any value of x. The table below includes information on other "nice" values of x.
So, the graph of y=(f+g)(x) must pass through (−8,−8), (−6,−5), (−4,−4), (−2,−3), (0,0), (2,3), (4,4), (6,5), and (8,8). This corresponds to graph A.