Adding and subtracting functions

See how we can add or subtract two functions to create a new function.
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, plus, g and f, minus, g.

Adding two functions

Example

Let's look at an example to see how this works.
Given that f, left parenthesis, x, right parenthesis, equals, x, plus, 1 and g, left parenthesis, x, right parenthesis, equals, x, start superscript, 2, end superscript, minus, 2, x, plus, 5, find left parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis.

Solution

The most difficult part of combining functions is understanding the notation. What does left parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis mean?
Well, left parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis just means to find the sum of f, left parenthesis, x, right parenthesis and g, left parenthesis, x, right parenthesis. Mathematically, this means that left parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis, equals, f, left parenthesis, x, right parenthesis, plus, g, left parenthesis, x, right parenthesis.
Now, this becomes a familiar problem.
(f+g)(x)=f(x)+g(x)                             Define.=(x+1)+(x22x+5)        Substitute.=x+1+x22x+5                Remove parentheses.=x2x+6                                Combine like terms.\begin{aligned} (f+g)(x) &= f(x)+g(x) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\small{\gray{\text{Define.}}}\\\\ &= \left(x+1\right)+\left(x^2-2x+5\right) ~~~~~~~~\small{\gray{\text{Substitute.}}}\\\\ &= x+1+x^2-2x+5~~~~~~~~~~~~~~~~\small{\gray{\text{Remove parentheses.}}}\\\\ &=x^2-x+6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\small{\gray{\text{Combine like terms.}}} \end{aligned}

We can also see this graphically:

The images below show the graphs of y, equals, f, left parenthesis, x, right parenthesis, y, equals, g, left parenthesis, x, right parenthesis, and y, equals, left parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis.
From the first graph, we can see that f, left parenthesis, 2, right parenthesis, equals, start color greenD, 3, end color greenD and that g, left parenthesis, 2, right parenthesis, equals, start color blueD, 5, end color blueD. From the second graph, we can see that left parenthesis, f, plus, g, right parenthesis, left parenthesis, 2, right parenthesis, equals, start color goldD, 8, end color goldD.
So f, left parenthesis, 2, right parenthesis, plus, g, left parenthesis, 2, right parenthesis, equals, left parenthesis, f, plus, g, right parenthesis, left parenthesis, 2, right parenthesis because start color greenD, 3, end color greenD, plus, start color blueD, 5, end color blueD, equals, start color goldD, 8, end color goldD.
Now you try it. Convince yourself that f, left parenthesis, 1, right parenthesis, plus, g, left parenthesis, 1, right parenthesis, equals, left parenthesis, f, plus, g, right parenthesis, left parenthesis, 1, right parenthesis.
Evaluate each expression.
f, left parenthesis, 1, right parenthesis, equals
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i
g, left parenthesis, 1, right parenthesis, equals
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i
left parenthesis, f, plus, g, right parenthesis, left parenthesis, 1, right parenthesis, equals
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i

From the graph below, we see f, left parenthesis, 1, right parenthesis, equals, start color greenD, 2, end color greenD and g, left parenthesis, 1, right parenthesis, equals, start color blueD, 4, end color blueD.
From the graph of f, plus, g, we see that left parenthesis, f, plus, g, right parenthesis, left parenthesis, 1, right parenthesis, equals, start color goldD, 6, end color goldD.
So f, left parenthesis, 1, right parenthesis, plus, g, left parenthesis, 1, right parenthesis, equals, left parenthesis, f, plus, g, right parenthesis, left parenthesis, 1, right parenthesis because start color greenD, 2, end color greenD, plus, start color blueD, 4, end color blueD, equals, start color goldD, 6, end color goldD.

Let's try some practice problems.

In problems 1 and 2, let a, left parenthesis, x, right parenthesis, equals, 3, x, start superscript, 2, end superscript, minus, 5, x, plus, 2 and b, left parenthesis, x, right parenthesis, equals, x, start superscript, 2, end superscript, plus, 8, x, minus, 10.

Problem 1

Find left parenthesis, a, plus, b, right parenthesis, left parenthesis, x, right parenthesis.

(a+b)(x)=a(x)+b(x)                                              Define.=(3x25x+2)+(x2+8x10)        Substitute.=3x25x+2+x2+8x10                 Remove parentheses.=4x2+3x8                                            Combine like terms.\begin{aligned} (a+b)(x) &= a(x)+b(x) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\small{\gray{\text{Define.}}}\\\\ &= \left(3x^2-5x+2\right)+\left(x^2+8x-10\right) ~~~~~~~~\small{\gray{\text{Substitute.}}}\\\\ &= 3x^2-5x+2+x^2+8x-10~~~~~~~~~~~~~~~~~\small{\gray{\text{Remove parentheses.}}}\\\\ &=4x^2+3x-8~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\small{\gray{\text{Combine like terms.}}} \end{aligned}

Problem 2

Evaluate left parenthesis, a, plus, b, right parenthesis, left parenthesis, minus, 1, right parenthesis.
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i

There are two ways to find left parenthesis, a, plus, b, right parenthesis, left parenthesis, minus, 1, right parenthesis.
Method 1: Find left parenthesis, a, plus, b, right parenthesis, left parenthesis, x, right parenthesis and evaluate at x, equals, minus, 1.
We found in the last problem that left parenthesis, a, plus, b, right parenthesis, left parenthesis, x, right parenthesis, equals, 4, x, start superscript, 2, end superscript, plus, 3, x, minus, 8. Let's substitute in x, equals, minus, 1.
(a+b)(x)=4x2+3x8(a+b)(1)=4(1)2+3(1)8=438=7\begin{aligned} (a+b)(x) &= 4x^2+3x-8\\ \\ (a+b)(-1) &= 4(-1)^2+3(-1)-8\\ \\ &= 4-3-8\\\\ &=-7 \end{aligned}
Method 2: Find a, left parenthesis, minus, 1, right parenthesis and b, left parenthesis, minus, 1, right parenthesis and add the two results.
First, let's find a, left parenthesis, minus, 1, right parenthesis:
a(x)=3x25x+2a(1)=3(1)25(1)+2=3+5+2=10\begin{aligned} a(x)&=3x^2-5x+2\\ \\ a(-1) &=3(-1)^2-5(-1)+2\\ \\ &= 3+5+2\\\\ &= 10\end{aligned}
Now, let's find b, left parenthesis, minus, 1, right parenthesis:
b(x)=x2+8x10b(1)=(1)2+8(1)10=1810=17\begin{aligned} b(x)&=x^2+8x-10\\ \\ b(-1) &=(-1)^2+8(-1)-10\\ \\ &= 1-8-10\\\\ &= -17\end{aligned}
So we have that:
(a+b)(1)=a(1)+b(1)=10+(17)=7\begin{aligned} (a+b)(-1)&=a(-1)+b(-1)\\ \\ &=10+(-17)\\ \\ &= -7\end{aligned}
Since we found left parenthesis, a, plus, b, right parenthesis, left parenthesis, x, right parenthesis 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:

Example

p, left parenthesis, t, right parenthesis, equals, 2, t, minus, 1 and q, left parenthesis, t, right parenthesis, equals, minus, t, start superscript, 2, end superscript, minus, 4, t, minus, 1.
Let's find left parenthesis, q, minus, p, right parenthesis, left parenthesis, t, right parenthesis.

Solution

Again, the most complicated part here is understanding the notation. But after working through the addition example, left parenthesis, q, minus, p, right parenthesis, left parenthesis, t, right parenthesis means just what you'd think!
By definition, left parenthesis, q, minus, p, right parenthesis, left parenthesis, t, right parenthesis, equals, q, left parenthesis, t, right parenthesis, minus, p, left parenthesis, t, right parenthesis. We can now solve the problem.
=(qp)(t)=q(t)p(t)Define.=(t24t1)(2t1)Substitute.=t24t12t+1Distribute negative sign.=t26tCombine like terms.\begin{aligned} &\phantom{=}(q-p)(t) \\\\ &=q(t)-p(t)\quad\small{\gray{\text{Define.}}} \\\\ &= (-t^2-4t-1)-(2t-1)\quad\small{\gray{\text{Substitute.}}}\\\\ &=-t^2-4t-1-2t+1\quad\small{\gray{\text{Distribute negative sign.}}}\\\\ &=-t^2-6t \quad\small{\gray{\text{Combine like terms.}}}\end{aligned}
So left parenthesis, q, minus, p, right parenthesis, left parenthesis, t, right parenthesis, equals, minus, t, start superscript, 2, end superscript, minus, 6, t, point

Let's try some practice problems.

Problem 3

j, left parenthesis, n, right parenthesis, equals, 3, n, start superscript, 3, end superscript, minus, n, start superscript, 2, end superscript, plus, 8
k, left parenthesis, n, right parenthesis, equals, minus, 8, n, start superscript, 2, end superscript, plus, 3, n, minus, 5
Find left parenthesis, j, minus, k, right parenthesis, left parenthesis, n, right parenthesis.

(jk)(n)=j(n)k(n)                                               Define.=(3n3n2+8)(8n2+3n5)        Substitute.=3n3n2+8+8n23n+5                 Distribute negative sign.=3n3+7n23n+13                               Combine like terms.\begin{aligned} (j-k)(n) &=j(n)-k(n)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\small{\gray{\text{Define.}}} \\\\ &= (3n^3-n^2+8)-(-8n^2+3n-5)~~~~~~~~\small{\gray{\text{Substitute.}}}\\\\ &=3n^3-n^2+8+8n^2-3n+5~~~~~~~~~~~~~~~~~\small{\gray{\text{Distribute negative sign.}}}\\\\ &=3n^3+7n^2-3n+13~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\small{\gray{\text{Combine like terms.}}}\end{aligned}

Problem 4

g, left parenthesis, x, right parenthesis, equals, 4, x, start superscript, 2, end superscript, minus, 7, x, plus, 2
h, left parenthesis, x, right parenthesis, equals, 2, x, minus, 5
Evaluate left parenthesis, h, minus, g, right parenthesis, left parenthesis, 3, right parenthesis.
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i

There are two ways to find left parenthesis, h, minus, g, right parenthesis, left parenthesis, 3, right parenthesis.
Method 1: Find h, left parenthesis, 3, right parenthesis and g, left parenthesis, 3, right parenthesis and subtract the two results.
First, let's find h, left parenthesis, 3, right parenthesis:
h(x)=2x5h(3)=2(3)5=1\begin{aligned} h(x)&=2x-5\\ \\ h(3) &=2(3)-5\\ \\ &= 1\\\\ \end{aligned}
Now, let's find g, left parenthesis, 3, right parenthesis:
g(x)=4x27x+2g(3)=4(3)27(3)+2=3621+2=17\begin{aligned} g(x)&=4x^2-7x+2\\ \\ g(3) &=4(3)^2-7(3)+2\\ \\ &= 36-21+2\\\\ &= 17\end{aligned}
So we have:
(hg)(3)=h(3)g(3)=117=16\begin{aligned} (h-g)(3)&=h(3)-g(3)\\ \\ &=1-17\\ \\ &= -16\end{aligned}
Method 2: Find left parenthesis, h, minus, g, right parenthesis, left parenthesis, x, right parenthesis and evaluate at x, equals, 3.
(hg)(x)=(2x5)(4x27x+2)=2x54x2+7x2=4x2+9x7\begin{aligned} (h-g)(x) &= (2x-5)-(4x^2-7x+2)\\ \\ &= 2x-5-4x^2+7x-2\\ \\ &= -4x^2+9x-7\\\\ \end{aligned}
When x, equals, 3, we have:
(hg)(3)=4(3)2+9(3)7=36+277=16\begin{aligned} (h-g)(3) &=-4(3)^2+9(3)-7 \\ \\ &= -36+27-7\\ \\ &= -16\\\\ \end{aligned}
Using either method, we see that left parenthesis, h, minus, g, right parenthesis, left parenthesis, 3, right parenthesis, equals, minus, 16.

An application

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, left parenthesis, t, right parenthesis, equals, 526, minus, t and W, left parenthesis, t, right parenthesis, equals, 474, plus, 2, t, respectively.
Let N be the total number of students receiving bachelors degrees at that college t years since 1980.
Write an expression for N, left parenthesis, t, right parenthesis.
N, left parenthesis, t, right parenthesis, equals

Since the total number of students receiving bachelors degrees at that college is comprised of men and women, we have N, left parenthesis, t, right parenthesis, equals, M, left parenthesis, t, right parenthesis, plus, W, left parenthesis, t, right parenthesis.
We can substitute to find N, left parenthesis, t, right parenthesis in terms of t.
N(t)=M(t)+W(t)=(526t)+(474+2t)=526t+474+2t=t+1000\begin{aligned}N(t) &= M(t)+W(t) \\\\ &= (526-t)+(474+2t)\\ \\ &=526-t+474+2t\\\\ &= t+1000 \end{aligned}

Challenge problem

The graphs of y, equals, f, left parenthesis, x, right parenthesis and y, equals, g, left parenthesis, x, right parenthesis are plotted on the grid below.
Which is the graph of y, equals, left parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis?
Choose 1 answer:
Choose 1 answer:

Let's find left parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis for a particular value of x. Then we can use that to select the correct graph. Let's try x, equals, 4.
(f+g)(4)=f(4)+g(4)=4+g(4)            Since f(4)=4=4+0                 Since g(4)=0=4\begin{aligned} (f+g)(4) &=f(4)+g(4) \\\\ &= 4+g(4)~~~~~~~~~~~~\gray{\text{Since }}{\gray{f(4)=4}}\\\\ &= 4+0~~~~~~~~~~~~~~~~~\gray{\text{Since }}{\gray{g(4)=0}}\\\\ &=4 \end{aligned}
So left parenthesis, f, plus, g, right parenthesis, left parenthesis, 4, right parenthesis, equals, 4, which implies that the graph of y, equals, left parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis must pass through left parenthesis, 4, comma, 4, right parenthesis. Since only graph A goes through left parenthesis, 4, comma, 4, right parenthesis, it must be the correct graph.
The above explanation was given for x, equals, 4, but you could think about this for any value of x. The table below includes information on other "nice" values of x.
xf, left parenthesis, x, right parenthesisg, left parenthesis, x, right parenthesisleft parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis
minus, 8minus, 8space, space, space, 0minus, 8
minus, 6minus, 6space, space, space, 1minus, 5
minus, 4minus, 4space, space, space, 0minus, 4
minus, 2minus, 2minus, 1minus, 3
0space, space, space, 0space, space, space, 0space, space, space, 0
2space, space, space, 2space, space, space, 1space, space, space, 3
4space, space, space, 4space, space, space, 0space, space, space, 4
6space, space, space, 6minus, 1space, space, space, 5
8space, space, space, 8space, space, space, 0space, space, space, 8
So, the graph of y, equals, left parenthesis, f, plus, g, right parenthesis, left parenthesis, x, right parenthesis must pass through left parenthesis, minus, 8, comma, minus, 8, right parenthesis, left parenthesis, minus, 6, comma, minus, 5, right parenthesis, left parenthesis, minus, 4, comma, minus, 4, right parenthesis, left parenthesis, minus, 2, comma, minus, 3, right parenthesis, left parenthesis, 0, comma, 0, right parenthesis, left parenthesis, 2, comma, 3, right parenthesis, left parenthesis, 4, comma, 4, right parenthesis, left parenthesis, 6, comma, 5, right parenthesis, and left parenthesis, 8, comma, 8, right parenthesis. This corresponds to graph A.