Just as we combine numbers with arithmetic, we can combine functions by addition, subtraction, multiplication, and division. The resulting function's domain is determined by where all component functions are simultaneously defined.
Quick Reference
| Operation | Formula | Domain |
|---|---|---|
| Sum $f + g$ | $(f+g)(x) = f(x) + g(x)$ | $\operatorname{Dom}(f) \cap \operatorname{Dom}(g)$ |
| Difference $f - g$ | $(f-g)(x) = f(x) - g(x)$ | $\operatorname{Dom}(f) \cap \operatorname{Dom}(g)$ |
| Product $f \cdot g$ | $(f \cdot g)(x) = f(x) \cdot g(x)$ | $\operatorname{Dom}(f) \cap \operatorname{Dom}(g)$ |
| Quotient $f/g$ | $(f/g)(x) = f(x)/g(x)$ | $\operatorname{Dom}(f) \cap \operatorname{Dom}(g) \cap \{x \mid g(x) \neq 0\}$ |
Arithmetic of Functions
Given two functions $f$ and $g$, we define:
$ \begin{aligned} (f+g)(x) &= f(x) + g(x), \\ (f-g)(x) &= f(x) - g(x), \\ (f \cdot g)(x) &= f(x) \cdot g(x), \\ (f/g)(x) &= \frac{f(x)}{g(x)}. \end{aligned} $The domains of $f+g$, $f-g$, and $f \cdot g$ are
$\operatorname{Dom}(f) \cap \operatorname{Dom}(g),$the set of $x$-values where both $f(x)$ and $g(x)$ are defined simultaneously.
For $f/g$, we additionally exclude any $x$ where $g(x) = 0$:
$\operatorname{Dom}(f/g) = \operatorname{Dom}(f) \cap \operatorname{Dom}(g) \cap \{x \mid g(x) \neq 0\}.$Let $f(x) = \dfrac{1}{x-3}$ and $g(x) = \sqrt{x-2}$. Find $f+g$, $f-g$, $f \cdot g$, $f/g$, and $g/f$, with their domains. Also evaluate each at $x = 5$.
Solution
Domains of $f$ and $g$: $\operatorname{Dom}(f) = \mathbb{R} - \{3\}, \qquad \operatorname{Dom}(g) = [2, \infty).$ Intersection: $\{x \mid x \geq 2 \text{ and } x \neq 3\} = [2,3) \cup (3,\infty)$. Combined functions and their domains: $(f+g)(x) = \frac{1}{x-3} + \sqrt{x-2}, \quad \operatorname{Dom} = [2,3) \cup (3,\infty).$ $(f-g)(x) = \frac{1}{x-3} - \sqrt{x-2}, \quad \operatorname{Dom} = [2,3) \cup (3,\infty).$ $(f \cdot g)(x) = \frac{\sqrt{x-2}}{x-3}, \quad \operatorname{Dom} = [2,3) \cup (3,\infty).$ For $f/g$, also exclude $x = 2$ where $g(2) = 0$: $\left(\frac{f}{g}\right)(x) = \frac{1}{(x-3)\sqrt{x-2}}, \quad \operatorname{Dom} = (2,3) \cup (3,\infty).$ Since $f(x) = 1/(x-3) \neq 0$ for all $x$ in its domain: $\left(\frac{g}{f}\right)(x) = (x-3)\sqrt{x-2}, \quad \operatorname{Dom} = [2,3) \cup (3,\infty).$ Values at $x = 5$: $ \begin{aligned} (f+g)(5) &= \frac{1}{2} + \sqrt{3}, \\ (f-g)(5) &= \frac{1}{2} - \sqrt{3}, \\ (fg)(5) &= \frac{\sqrt{3}}{2}, \\ \left(\frac{f}{g}\right)(5) &= \frac{1}{2\sqrt{3}}, \\ \left(\frac{g}{f}\right)(5) &= 2\sqrt{3}. \end{aligned} $
A Subtle Domain Issue with Roots
Are the functions $h_1(x) = \sqrt{x-1}\,\sqrt{2-x}$ and $h_2(x) = \sqrt{(x-1)(2-x)}$ equal? What about $u_1(x) = \sqrt{x-1}\,\sqrt{x-2}$ and $u_2(x) = \sqrt{(x-1)(x-2)}$?
Solution
(a) $h_1$ vs. $h_2$: $\operatorname{Dom}(h_1) = [1,\infty) \cap (-\infty,2] = [1,2]$. For $h_2$, we need $(x-1)(2-x) \geq 0$. A sign chart shows this holds on $[1,2]$. So $\operatorname{Dom}(h_1) = \operatorname{Dom}(h_2) = [1,2]$, and $h_1(x) = h_2(x)$ on $[1,2]$. They are equal.

Graphs of Combined Functions
To graph $f + g$: for each $x$, add the $y$-coordinates of $f$ and $g$ geometrically.
The graphs of $f(x) = x$ and $g(x) = x^3 - 4x + 1$ are given. Sketch the graph of $h = f + g$ by graphical addition.
Solution
$h(x) = f(x) + g(x) = x^3 - 3x + 1$. For each $x$, the height of $h$ equals the sum of the heights of $f$ and $g$:
