Lesson Objectives
• Demonstrate an understanding of function notation
• Learn how to find the sum/difference of functions
• Learn how to find the product/quotient of functions
• Learn how to find the domain when combining functions

## How to Perform Operations with Functions

Many lessons ago, we introduced the concept of a function. Additionally, we learned how to write functions using function notation. Two functions f and g can be combined to form new functions using addition, subtraction, multiplication, and division.

### Finding the Sum/Difference of Functions

$$(f + g)(x) = f(x) + g(x)$$ $$(f - g)(x) = f(x) - g(x)$$ We can find the sum or difference of functions f and g by adding or subtracting the two functions to create a new function.
As an example, suppose a local manufacturing company has a fixed cost of $600 to set up shop. Each unit they produce will cost$10 and be sold for $20. How could you set up a revenue function and a cost function? $$R(x) = 20x, x ≥ 0$$ $$C(x) = 10x + 600, x ≥ 0$$ R(x) is the revenue function. The company will receive$20 per unit sold, where x is the number of units sold. Here, x can be 0 (no units sold) or some positive amount. C(x) is the cost function. The company will incur a cost of $10 per unit produced. Additionally, that + 600 is used for the fixed cost of setting up shop. As an example, if they produced 1 unit, the total cost would be$600 (fixed) + $10 (cost of 1 unit) or$610, then two units would be $620, three would be$630, and so on. Again, the domain is restricted to be 0 or larger as we can't produce a negative amount. Let's now suppose you want to find a profit function P(x). How would you do this? You would want to subtract the cost function from the revenue function. $$P(x) = R(x) - C(x)$$ $$P(x) = 20x - (10x + 600)$$ $$P(x) = 20x - 10x - 600$$ $$P(x) = 10x - 600, x ≥ 0$$ Again, the domain here would be restricted to 0 or larger. This is coming from the intersection of the two domains for f and g (we will discuss this in more detail later on in the tutorial).
A company could use something like this to determine their profit for some number of units sold. Let's suppose they want to know the profit on 100 units sold. $$P(100) = 10(100) - 600$$ $$P(100) = 1000 - 600$$ $$P(100) = 400$$ Where would the company break-even? We want P(x) set equal to 0 and then solve. $$10x - 600 = 0$$ $$10x = 600$$ $$x = \frac{600}{10} = 60$$ The company would break even after selling 60 units. Let's look at some examples.
Example #1: Find f + g and f - g. $$f(x) = -2x - 5$$ $$g(x) = 7x - 2$$ $$(f + g)(x) = (-2x - 5) + (7x - 2)$$ $$(f + g)(x) = -2x + 7x - 5 - 2$$ $$(f + g)(x) = 5x - 7$$ $$(f - g)(x) = (-2x - 5) - (7x - 2)$$ $$(f - g)(x) = -2x - 5 - 7x + 2$$ $$(f - g)(x) = -2x - 7x - 5 + 2$$ $$(f - g)(x) = -9x - 3$$ Example #2: Find (f + g)(1). $$f(x) = 4x^2 + 2x - 7$$ $$g(x) = -2x^2 - x + 1$$ Method #1: Find f(1) and g(1), then perform the addition. $$f(1) = 4(1)^2 + 2(1) - 7$$ $$f(1) = 4 + 2 - 7 = -1$$ $$g(1) = -2(1)^2 - (1) + 1$$ $$g(1) = -2 - 1 + 1 = -2$$ $$f(1) + g(1) = -1 + (-2) = -3$$ Method #2: Find (f + g)(x), and then plug in a 1 for x. $$(f + g)(x) = (4x^2 + 2x - 7) + (-2x^2 - x + 1)$$ $$(f + g)(x) = 4x^2 - 2x^2 + 2x - x - 7 + 1$$ $$(f + g)(x) = 2x^2 + x - 6$$ $$(f + g)(1) = 2(1)^2 + 1 - 6$$ $$(f + g)(1) = 2 + 1 - 6$$ $$(f + g)(1) = 3 - 6 = -3$$ The result of -3 is the same using either method.

### Domains of f + g and f - g

For functions f and g, the domains of f + g and f - g, include all real numbers in the intersection of the domains of f and g. Recall that for the intersection of two domains, you are looking at all elements that are found in both of those sets. Let's look at an example.
Example #3: Find f + g, f - g, and state the domain. $$f(x) = \frac{1}{x - 3}$$ $$g(x) = 2x$$ $$(f + g)(x) = \frac{1}{x - 3} + 2x$$ $$(f + g)(x) = \frac{1}{x - 3} + \frac{2x}{1} \cdot \frac{x - 3}{x - 3}$$ $$(f + g)(x) = \frac{1}{x - 3} + \frac{2x^2 - 6x}{x - 3}$$ $$(f + g)(x) = \frac{2x^2 - 6x + 1}{x - 3}$$ $$(f - g)(x) = \frac{1}{x - 3} - 2x$$ $$(f - g)(x) = \frac{1}{x - 3} - \frac{2x}{1} \cdot \frac{x - 3}{x - 3}$$ $$(f - g)(x) = \frac{1}{x - 3} - \frac{2x^2 - 6x}{x - 3}$$ $$(f - g)(x) = \frac{1 - (2x^2 - 6x)}{x - 3}$$ $$(f - g)(x) = \frac{-2x^2 + 6x + 1}{x - 3}$$ The domain of f is all real numbers except for 3 (division by zero). $$\{x | x ≠ 3\}$$ The domain of g is all real numbers. Note: the R below represents the set of real numbers. $$\{x | x ∈ \mathbb{R}\}$$ The domain of f + g or f - g is just the intersection of the two domains. $$\{x | x ≠ 3\}$$

### Finding the Product/Quotient of Functions

$$(fg)(x) = f(x) \cdot g(x)$$ $$\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}$$ We can find the product or quotient of functions f and g by multiplying or dividing the two functions to create a new function.

### Domains of fg and f/g

For functions f and g, the domains of fg and f/g, include all real numbers in the intersection of the domains of f and g. In the case of f/g, we must remember that we can't divide by 0. Let's look at some examples.
Example #4: Find fg, f/g, and state the domain. $$f(x) = \sqrt{5 - x}$$ $$g(x) = \sqrt{x + 2}$$ $$(fg)(x) = \sqrt{5 - x} \cdot \sqrt{x + 2}$$ $$(fg)(x) = \sqrt{(5 - x)(x + 2)}$$ $$(f/g)(x) = \frac{\sqrt{5 - x}}{\sqrt{x + 2}}$$ The domain of f (the radicand must be non-negative): $$5 - x ≥ 0$$ $$-x ≥ -5$$ Don't forget to flip the direction of the inequality symbol. $$x ≤ 5$$ $$\{x | x ≤ 5\}$$ The domain of g (the radicand must be non-negative): $$x + 2 ≥ 0$$ $$x ≥ -2$$ $$\{x | x ≥ -2\}$$ What's the intersection of the two domains? $$\{x | x ≥ -2 \hspace{.2em} \text{and} \hspace{.2em} x ≤ 5\}$$ $$\{x | {-}2 ≤ x ≤ 5\}$$ This works for the domain of fg but what about the domain of f/g? In this case, we must remember that we can't divide by zero. $$\{x | {-}2 < x ≤ 5\}$$ We must exclude -2 from the domain as this creates a denominator of zero.
Example #5: Find (fg)(6). $$f(x) = \sqrt{x + 3}$$ $$g(x) = \frac{2}{x - 1}$$ $$f(6) = \sqrt{6 + 3}$$ $$f(6) = \sqrt{9} = 3$$ $$g(6) = \frac{2}{6 - 1} = \frac{2}{5}$$ $$(fg)(6) = 3 \cdot \frac{2}{5} = \frac{6}{5}$$ Another type of problem involves multiplying our functions by some constant before performing the given operation. Let's look at an example.
Example #6: Find 3f + 2g. $$f(x) = x^2 + 5$$ $$g(x) = 9x^2 - 1$$ Let's start with 3f: $$3 \cdot f(x) = 3(x^2 + 5) = 3x^2 + 15$$ Now let's find 2g: $$2 \cdot g(x) = 2(9x^2 - 1) = 18x^2 - 2$$ Now let's find 3f + 2g: $$3f + 2g = 3x^2 + 15 + 18x^2 - 2$$ $$3f + 2g = 3x^2 + 18x^2 + 15 - 2$$ $$3f + 2g = 21x^2 + 13$$

#### Skills Check:

Example #1

Perform each indicated operation. $$h(x)=4x - 5$$ $$g(x)=4x + 5$$ $$\text{Find}: \left(\frac{h}{g}\right)(4)$$

A
$$\frac{41}{31}$$
B
$$\frac{21}{11}$$
C
$$\frac{91}{13}$$
D
$$\frac{5}{17}$$
E
$$\frac{11}{21}$$

Example #2

Perform each indicated operation. $$g(x)=x + 4$$ $$f(x)=2x + 5$$ $$\text{Find}: (g + f)(5)$$

A
$$8$$
B
$$22$$
C
$$15$$
D
$$24$$
E
$$19$$

Example #3

Perform each indicated operation. $$h(x)=x^2 - 4$$ $$g(x)=2x$$ $$\text{Find}: (-3h + 5g)(-1)$$

A
$$-21$$
B
$$-9$$
C
$$1$$
D
$$-1$$
E
$$19$$