Unit 4, lesson 32

Adding, Multiplying, and Dividing Functions

How to add, subtract, multiply and divide functions by combining their outputs at the same input, and how to find the domain of the result, including the inputs a quotient must exclude.

  • Theory part 63
  • Practice part 64
  • Combining and Inverting Functions

A shop’s profit is its revenue minus its costs, and both depend on how many items it sells. To find the profit at 4040 items you take the revenue at 4040 and the cost at 4040 and subtract. That is all it means to combine two functions. The care goes into one question, which inputs both functions can actually handle.

Key terms

Pointwise operation

Definition A pointwise operation builds a new function from two functions ff and gg by taking one input xx, evaluating both f(x)f(x) and g(x)g(x) at that same xx, and combining the two output numbers by an arithmetic operation. The new function is defined only at inputs where both outputs exist and the operation makes sense.

In plain words Feed the same number into both functions, then add, subtract, multiply or divide the two answers. You never mix outputs from different inputs.

Example Let f(x)=x2f(x) = x^2 and g(x)=3x+1g(x) = 3x + 1. At x=2x = 2 the outputs are f(2)=4f(2) = 4 and g(2)=7g(2) = 7, so the pointwise sum at 22 is 4+7=114 + 7 = 11.

Common domain

Definition The common domain of ff and gg is the intersection of their domains,

dom⁡f∩dom⁡g,\operatorname{dom} f \cap \operatorname{dom} g,

the set of inputs at which both ff and gg are defined. It is the domain of f+gf + g, f−gf - g and fgfg.

In plain words An input is allowed only if both functions accept it. Find each domain separately, then keep the overlap.

Example The function f(x)=x−1f(x) = \sqrt{x - 1} needs x≥1x \ge 1, and g(x)=1x−3g(x) = \frac{1}{x - 3} needs x≠3x \ne 3. Their common domain is

[1,3)∪(3,∞).[1, 3) \cup (3, \infty).

Sum of functions

Definition The sum of ff and gg is the function f+gf + g defined by

(f+g)(x)=f(x)+g(x),x∈dom⁡f∩dom⁡g.\begin{gathered} (f + g)(x) = f(x) + g(x), \\[0.4em] x \in \operatorname{dom} f \cap \operatorname{dom} g. \end{gathered}

In plain words At each allowed input, the height of f+gf + g is the height of ff plus the height of gg.

Example Let f(x)=xf(x) = \sqrt{x} and g(x)=4−xg(x) = \sqrt{4 - x}. The first needs x≥0x \ge 0 and the second needs x≤4x \le 4, so f+gf + g has domain [0,4][0, 4]. At x=1x = 1 it gives 1+31 + \sqrt{3}, and at x=2x = 2 it gives 2+2=22\sqrt{2} + \sqrt{2} = 2\sqrt{2}.

Difference of functions

Definition The difference of ff and gg is the function f−gf - g defined by

(f−g)(x)=f(x)−g(x),x∈dom⁡f∩dom⁡g.\begin{gathered} (f - g)(x) = f(x) - g(x), \\[0.4em] x \in \operatorname{dom} f \cap \operatorname{dom} g. \end{gathered}

Order matters, since (g−f)(x)=−(f−g)(x)(g - f)(x) = -(f - g)(x).

In plain words Subtract the second output from the first at the same input. Swapping the two functions flips the sign of every answer.

Example For f(x)=x2+1f(x) = x^2 + 1 and g(x)=2xg(x) = 2x, both defined everywhere,

(f−g)(x)=x2−2x+1=(x−1)2.\begin{aligned} (f - g)(x) &= x^2 - 2x + 1 \\[0.4em] &= (x - 1)^2. \end{aligned}

At x=3x = 3 this gives 10−6=410 - 6 = 4, while (g−f)(3)=−4(g - f)(3) = -4.

Product of functions

Definition The product of ff and gg is the function fgfg defined by

(fg)(x)=f(x) g(x),x∈dom⁡f∩dom⁡g.\begin{gathered} (fg)(x) = f(x)\,g(x), \\[0.4em] x \in \operatorname{dom} f \cap \operatorname{dom} g. \end{gathered}

Here fgfg means multiplying outputs. It is not the composition f∘gf \circ g, given by (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)), which feeds the output of gg into ff.

In plain words Multiply the two heights at the same input. Plugging one function into the other is a different operation with a different notation.

Example Let f(x)=xf(x) = \sqrt{x} and g(x)=x−4g(x) = x - 4. The product

(fg)(x)=x (x−4)(fg)(x) = \sqrt{x}\,(x - 4)

has domain [0,∞)[0, \infty), and (fg)(9)=3⋅5=15(fg)(9) = 3 \cdot 5 = 15. The composition gives f(g(9))=5f(g(9)) = \sqrt{5} instead, and f(g(x))=x−4f(g(x)) = \sqrt{x - 4} has the different domain [4,∞)[4, \infty).

Quotient of functions

Definition The quotient of ff by gg is the function fg\frac{f}{g} defined by

(fg)(x)=f(x)g(x)\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}

for every xx in dom⁡f∩dom⁡g\operatorname{dom} f \cap \operatorname{dom} g with g(x)≠0g(x) \ne 0. The function gg is called the denominator function. Every input where the denominator function equals zero is excluded, in addition to the inputs outside the common domain.

In plain words Divide the outputs at the same input, but only where both functions work and the bottom output is not zero.

Example Let f(x)=x+1f(x) = \sqrt{x + 1} and g(x)=x2−4g(x) = x^2 - 4. The common domain is [−1,∞)[-1, \infty), and g(x)=0g(x) = 0 at x=2x = 2 and x=−2x = -2. Only 22 lies in [−1,∞)[-1, \infty), so the domain of fg\frac{f}{g} is [−1,2)∪(2,∞)[-1, 2) \cup (2, \infty). At x=3x = 3 the quotient is 25\frac{2}{5}.

Domain restriction

Definition The domain of a combined function is fixed by the original functions, as described above. If the formula is then simplified, the simplified formula agrees with the combined function only on that domain. Every restriction inherited from ff, from gg and from g(x)≠0g(x) \ne 0 stays in force, even when the simplified formula would make sense at more inputs.

In plain words Find the domain first, from the functions as given. Simplifying may tidy the formula, but it never adds inputs back.

Example Let f(x)=x−1f(x) = x - 1 and g(x)=x−1g(x) = \sqrt{x} - 1. The function gg needs x≥0x \ge 0, and g(x)=0g(x) = 0 at x=1x = 1, so fg\frac{f}{g} has domain [0,1)∪(1,∞)[0, 1) \cup (1, \infty). On that domain

x−1x−1=(x−1)(x+1)x−1=x+1.\begin{aligned} \frac{x - 1}{\sqrt{x} - 1} &= \frac{(\sqrt{x} - 1)(\sqrt{x} + 1)}{\sqrt{x} - 1} \\[0.4em] &= \sqrt{x} + 1. \end{aligned}

The formula x+1\sqrt{x} + 1 is fine at x=1x = 1, but the quotient is not defined there, so its graph has a hole at (1,2)(1, 2). In the same way x⋅x=x\sqrt{x} \cdot \sqrt{x} = x holds only for x≥0x \ge 0, so that product is the line y=xy = x kept only on [0,∞)[0, \infty).

Check yourself

  1. Let f(x)=x+3f(x) = \sqrt{x + 3} and g(x)=2−xg(x) = \sqrt{2 - x}. Find the domain of f+gf + g and the value (f+g)(1)(f + g)(1).
Show the answer

The function ff needs x≥−3x \ge -3 and gg needs x≤2x \le 2, so the domain is [−3,2][-3, 2]. The value is 4+1=3\sqrt{4} + \sqrt{1} = 3.

  1. Let f(x)=x2−4f(x) = x^2 - 4 and g(x)=x2+x−2g(x) = x^2 + x - 2. Find the domain of fg\frac{f}{g}, simplify it and evaluate it at x=0x = 0.
Show the answer

The denominator factors as (x−1)(x+2)(x - 1)(x + 2), so the domain is all real numbers except 11 and −2-2. For those inputs

(x−2)(x+2)(x−1)(x+2)=x−2x−1,\frac{(x - 2)(x + 2)}{(x - 1)(x + 2)} = \frac{x - 2}{x - 1},

and x=−2x = -2 stays excluded. At x=0x = 0 the value is −2−1=2\frac{-2}{-1} = 2.

  1. For f(x)=xf(x) = \sqrt{x} and g(x)=x+5g(x) = x + 5, compute (fg)(4)(fg)(4) and f(g(4))f(g(4)).
Show the answer

The product multiplies outputs, so (fg)(4)=2⋅9=18(fg)(4) = 2 \cdot 9 = 18. The composition feeds g(4)=9g(4) = 9 into ff, so f(g(4))=3f(g(4)) = 3.

How this lesson connects

Used later in