# 17.3.1: Arithmetic Operations with Functions

- Page ID
- 77006

- Given two functions, \(\ f\) and \(\ g\), find their sum, \(\ f+g\).
- Given two functions, \(\ f\) and \(\ g\), find their difference, \(\ f-g\).
- Given two functions, \(\ f\) and \(\ g\), find their product, \(\ f g\).
- Given two functions, \(\ f\) and \(\ g\), find their quotient, \(\ \frac{f}{g}\).

## Introduction

You are used to adding, subtracting, multiplying, and dividing real numbers. You do these operations every day in a variety of situations. You have also learned how to perform these four basic operations on algebraic expressions. So while you may not need to calculate \(\ 30 x^{2}+10 x\) too often, you do know how to do it.

If you know how to perform the four basic operations on polynomials, then you can also add, subtract, multiply, and divide functions. The notation will look different at first, but knowing a couple of steps can help you arrive at the correct answer.

## Understanding Notation

A **function** is a correspondence between two sets: the domain and the range. In addition to evaluating functions, you can do operations with functions.

Let’s say you are working with the following two functions.

\(\ \begin{array}{l}

f(x)=9 x-5 \\

g(x)=4 x+1

\end{array}\)

The sum of these functions can be written \(\ f(x)+g(x)\) or as \(\ (f+g)(x)\). Watch what happens when these two functions are added.

\(\ \begin{aligned}

f(x) &=9 x-5 \\

g(x) &=4 x+1 \\

(f+g)(x) &=f(x)+g(x) \\

(f+g)(x) &=(9 x-5)+(4 x+1) \\

(f+g)(x) &=9 x+4 x-5+1 \\

(f+g)(x) &=13 x-4

\end{aligned}\)

That’s it! The sum of the two functions is the sum of the two polynomials.

Addition, subtraction, multiplication, and division will all be explained in turn. The table below shows the notation that is used for each type of arithmetic operation.

Addition | \(\ f(x)+g(x)\) | \(\ (f+g)(x)\) |

Subtraction | \(\ f(x)-g(x)\) | \(\ (f-g)(x)\) |

Multiplication | \(\ f(x) \cdot g(x)\) | \(\ (f \cdot g)(x)\) |

Division | \(\ \frac{f(x)}{g(x)}\) | \(\ \left(\frac{f}{g}\right)(x)\) |

## Adding and Subtracting

You have already seen one example of adding two functions. Let’s look at another one. The domain (x-values) for both functions is all real numbers.

\(\ \begin{array}{l}

f(x)=5 x+6 \\

g(x)=3 x^{2}-4 x+8

\end{array}\)

**Find **\(\ (f+g)(x)\).

**Solution**

\(\ \begin{aligned} (f+g)(x) &=f(x)+g(x) \\ &=(5 x+6)+\left(3 x^{2}-4 x+8\right) \\ &=3 x^{2}+5 x-4 x+6+8 \\ &=3 x^{2}+x+14 \end{aligned}\) |
Identify \(\ f(x)\) and \(\ g(x)\). Replace \(\ f(x)\) with \(\ 5 x+6\), and \(\ g(x)\) with \(\ 3 x^{2}-4 x+8\). Then add and combine like terms. |

\(\ (f+g)(x)=3 x^{2}+x+14\)

Subtracting follows the same process. As long as you remember how to subtract one polynomial from another, you can figure out how to subtract one function from another.

\(\ \begin{array}{c}

f(x)=5 x+6 \\

g(x)=3 x^{2}-4 x+8

\end{array}\)

**Find **\(\ (g-f)(x)\).

**Solution**

\(\ \begin{aligned} (g-f)(x) &=g(x)-f(x) \\ &=\left(3 x^{2}-4 x+8\right)-(5 x+6) \\ &=3 x^{2}-4 x+8-5 x-6 \\ &=3 x^{2}-4 x-5 x+8-6 \\ &=3 x^{2}-9 x+2 \end{aligned}\) |
Replace \(\ g(x)\) and \(\ f(x)\) with their respective expressions. Then subtract and combine like terms. |

\(\ (g-f)(x)=3 x^{2}-9 x+2\)

\(\ \begin{array}{c}

f(x)=5 x^{2}+2 x-5 \\

g(x)=7 x+8 \\

h(x)=4 x^{2}-10

\end{array}\)

**Find **\(\ (f-h)(x)\).

**Solution**

\(\ \begin{aligned} (f-h)(x) &=f(x)-h(x) \\ &=\left(5 x^{2}+2 x-5\right)-\left(4 x^{2}-10\right) \\ &=5 x^{2}+2 x-5-4 x^{2}+10 \\ &=5 x^{2}-4 x^{2}+2 x-5+10 \\ &=x^{2}+2 x+5 \end{aligned}\) |
Notice: \(\ (f-h)(x)=f(x)-h(x)\) You can ignore \(\ g(x)\) since it is not required to solve this problem. Replace the function notations with their appropriate polynomials and subtract. |

\(\ (f-h)(x)=x^{2}+2 x+5\)

\(\ f(x)=9 x^{3}+2\) and \(\ g(x)=x^{3}-4 x^{2}-3\). What is \(\ (f-g)(x)\)?

- \(\ 10 x^{3}-4 x^{2}-1\)
- \(\ 8 x^{3}-4 x^{2}-1\)
- \(\ 8 x^{3}+4 x^{2}+5\)
- \(\ -8 x^{3}-4 x^{2}-5\)

**Answer**-
- \(\ 10 x^{3}-4 x^{2}-1\)
Incorrect. \(\ (f+g)(x)=10^{3}-4 x^{2}-1\); this question is looking for \(\ (f-g)(x)\). The correct answer is \(\ 8 x^{3}+4 x^{2}+5\).

- \(\ 8 x^{3}-4 x^{2}-1\)
Incorrect. It looks like you tried to calculate \(\ (f-g)(x)\), but you subtracted incorrectly. Remember: \(\ (f-g)(x)=\left(9 x^{3}+2\right)-\left(x^{3}-4 x^{2}-3\right)=9 x^{3}+2-x^{3}+4 x^{2}+3\). The correct answer is \(\ 8 x^{3}+4 x^{2}+5\).

- \(\ 8 x^{3}+4 x^{2}+5\)
Correct. To find \(\ (f-g)(x)\), subtract \(\ g(x)\) from \(\ f(x)\). \(\ (f-g)(x)=\left(9 x^{3}+2\right)-\left(x^{3}-4 x^{2}-3\right)=8 x^{3}+4 x^{2}+5\).

- \(\ -8 x^{3}-4 x^{2}-5\)
Incorrect. It looks like you tried to calculate \(\ (g-f)(x)\). This question is looking for \(\ (f-g)(x)\). The correct answer is \(\ 8 x^{3}+4 x^{2}+5\).

- \(\ 10 x^{3}-4 x^{2}-1\)

## Multiplying and Dividing

Multiplying and dividing functions is also just like multiplying and dividing polynomials. Review the following examples.

\(\ \begin{array}{l}

f(x)=2 x+1 \\

g(x)=5 x-3

\end{array}\)

**Find the product of \(\ f\) and \(\ g\).**

**Solution**

\(\ (f \cdot g)(x)=f(x) \cdot g(x)\) | To find the product, multiply the functions. |

\(\ \begin{aligned} (f \cdot g)(x) &=(2 x+1)(5 x-3) \\ &=10 x^{2}-6 x+5 x-3 \\ &=10 x^{2}-x-3 \end{aligned}\) |
Replace \(\ f(x)\) with \(\ (2 x+1)\), and \(\ g(x)\) with \(\ (5 x-3)\). |

\(\ (f \cdot g)(x)=10 x^{2}-x-3\)

\(\ \begin{aligned}

f(x)&=12 x^{3}+15 x^{2}-6 x \\

g(x)&=3 x

\end{aligned}\)

**Find **\(\ \left(\frac{f}{g}\right)(x)\).

**Solution**

\(\ \begin{aligned} \left(\frac{f}{g}\right)(x) &=\frac{f(x)}{g(x)} \\ &=\frac{12 x^{3}+15 x^{2}-6 x}{3 x}, x \neq 0 \\ &=\frac{3 x\left(4 x^{2}+5 x-2\right)}{3 x} \\ &=1 \cdot\left(4 x^{2}+5 x-2\right) \\ &=4 x^{2}+5 x-2, x \neq 0 \end{aligned}\) |
To find the quotient, divide \(\ f\) by \(\ g\). Substitute the polynomials in for \(\ f(x)\) and \(\ g(x)\) and divide. We add \(\ x \neq 0\) because \(\ x=0\) would make the denominator \(\ g(x)=0\) and \(\ \frac{f(x)}{g(x)}\) undefined. Remember to rename \(\ \frac{3 x}{3 x}\) as 1. |

\(\ \left(\frac{f}{g}\right)(x)=4 x^{2}+5 x-2\)

Operations with three functions work the same way. In the example below, two functions are added and then divided by a third. It is no different than what you have already done with polynomials; just continue to substitute the polynomials in for the correct functions, combine, divide, and simplify.

\(\ \begin{aligned}

f(x)&=8 x^{3}-3 x^{2} \\

g(x)&=4 x^{3}+9 x^{2} \\

h(x)&=3 x^{2}

\end{aligned}\)

**Find **\(\ \left(\frac{f+g}{h}\right)(x)\).

**Solution**

\(\ \begin{aligned} \left(\frac{f+g}{h}\right)(x) &=\frac{f(x)+g(x)}{h(x)} \\ &=\frac{\left(8 x^{3}-3 x^{2}\right)+\left(4 x^{3}+9 x^{2}\right)}{3 x^{2}}, x \neq 0 \end{aligned}\) |
Replace \(\ f(x)\), \(\ g(x)\), and \(\ h(x)\) with the equivalent polynomials.e add \(\ x \neq 0\) because that would make the denominator \(\ h(x)\) of \(\ \frac{f(x)+g(x)}{h(x)}\) zero and the fraction undefined. |

\(\ \begin{aligned} \left(\frac{f+g}{h}\right)(x) &=\frac{3 x^{2}(4 x+2)}{3 x^{2}} \\ &=1 \cdot(4 x+2) \\ &=4 x+2, x \neq 0 \end{aligned}\) |
Add \(\ f(x)\) and \(\ g(x)\). Divide by \(\ h(x)\). Pull out a factor of \(\ 3 x^{2}\) from the numerator, and then simplify the expression, using \(\ \frac{3 x^{2}}{3 x^{2}}=1\). |

\(\ \left(\frac{f+g}{h}\right)(x)=4 x+2, x \neq 0\)

\(\ \begin{aligned}

f(x)&=9 x^{2} \\

g(x)&=-4 x \\

h(x)&=-10 x^{3}

\end{aligned}\)

Find \(\ (f \cdot h)(x)\).

- \(\ -90 x^{5}\)
- \(\ -36 x^{3}\)
- \(\ 40 x^{4}\)
- \(\ 360 x^{6}\)

**Answer**-
- \(\ -90 x^{5}\)
Correct. \(\ (f \cdot h)(x)=9 x^{2} \cdot\left(-10 x^{3}\right)=90 x^{5}\).

- \(\ -36 x^{3}\)
Incorrect. It looks like you found \(\ (f \cdot g)(x)\); this problem is looking for \(\ (f \cdot h)(x)\). The correct answer is \(\ -90 x^{5}\).

- \(\ 40 x^{4}\)
Incorrect. It looks like you found \(\ (g \cdot h)(x)\); this problem is looking for \(\ (f \cdot h)(x)\). The correct answer is \(\ -90 x^{5}\).

- \(\ 360 x^{6}\)
Incorrect. It looks like you found \(\ (f \cdot g \cdot h)(x)\); this problem is looking for \(\ (f \cdot h)(x)\). The correct answer is \(\ -90 x^{5}\).

- \(\ -90 x^{5}\)

## Summary

Just like integers and algebraic expressions, functions can be added, subtracted, multiplied, and divided. To perform an arithmetic operation upon two or more functions, replace the indicated function with its respective polynomial, then combine using the regular rules of addition, subtraction, multiplication, and division.