Functions are rules that make numbers, so you can add, subtract, multiply and divide them the same way you combine numbers. You already add and subtract polynomials (Adding and Subtracting Polynomials); here the polynomials have names.
Key idea
$(f + g)(x) = f(x) + g(x)$, $(f - g)(x) = f(x) - g(x)$, $(fg)(x) = f(x)\,g(x)$ and $\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}$. The domain is every $x$ where both $f$ and $g$ are defined, and for $\frac{f}{g}$ you also remove every $x$ with $g(x) = 0$.
Why it works
To find $(f + g)(3)$ you need $f(3)$ and $g(3)$, so both rules must accept the input 3. If either refuses it, the combination can't be computed. Division adds one more refusal, because dividing by 0 has no answer.
Worked examples
Worked example: Subtracting functions
Let $f(x) = 2x + 3$ and $g(x) = x^2 - 1$. Find $(f - g)(x)$.
- Put $g(x)$ in parentheses: $(2x + 3) - (x^2 - 1)$.
- The minus sign reaches every term of $g$: $2x + 3 - x^2 + 1$.
- Combine and write in standard form: $-x^2 + 2x + 4$.
Answer: $(f - g)(x) = -x^2 + 2x + 4$
Worked example: The domain of a quotient
With the same $f$ and $g$, find the domain of $\frac{f}{g}$.
- $f$ and $g$ are polynomials, so both accept every real number.
- Remove the zeros of $g$: $x^2 - 1 = 0$ when $x = 1$ or $x = -1$.
Answer: $(-\infty, -1) \cup (-1, 1) \cup (1, \infty)$
Worked example: A root and a denominator together
Let $f(x) = \sqrt{x}$ and $g(x) = x - 4$. Find the domain of $\frac{f}{g}$.
- $f$ needs $x \ge 0$.
- $g(x) = 0$ at $x = 4$, which is inside $[0, \infty)$, so take it out.
Answer: $[0, 4) \cup (4, \infty)$
Common mistake
Forgetting that $\frac{f}{g}$ is undefined where $g(x) = 0$, especially after simplifying. With $f(x) = x^2 - 4$ and $g(x) = x - 2$, the quotient simplifies to $x + 2$, but the domain still leaves out $x = 2$, because $g(2) = 0$. Always find the domain from the original $f$ and $g$, before you simplify.