Adding And Subtracting Functions: How It Actually Works
When you first encounter operations on functions in a textbook, everything looks symmetric and clean. You plug numbers in, add or subtract, and the answer appears. The truth is messier than that image. The real trouble starts when domains differ, when you're working with piecewise definitions, or when one function introduces a restriction the other doesn't have. I spent a semester wrestling with exactly this stuff while helping students prepare for standardized exams, and the patterns that matter most aren't the ones in the chapter summaries. The core idea is straightforward enough. If you have two functions f and g, their sum is defined as (f + g)(x) = f(x) + g(x), and their difference as (f - g)(x) = f(x) - g(x). That's it. The operation is pointwise. You evaluate each function at the same x value, then perform the arithmetic. The complexity isn't in the definition. It's in what happens when the inputs don't behave nicely. Here's the part most people gloss over: the domain of f + g or f - g is the intersection of the domains of f and g. Both functions have to be defined at a given x for the sum or difference to exist there. This seems obvious until you hit a rational function paired with a radical function, and suddenly half the number line disappears from your result. I remember one student who spent twenty minutes trying to evaluate (f - g)(4) where f(x) = sqrt(x - 4) and g(x) = 1/(x - 4). She didn't stop to check that f(4) exists but g(4) doesn't. The difference function simply isn't defined at x = 4. She wrote down an answer anyway because the algebra looked clean on paper.
Let me walk through a proper workflow before we get into the harder cases. Step one is identifying the domain of each function independently. Don't skip this. Write it down explicitly. For polynomial functions the domain is all real numbers, so you can often move on quickly. For rational functions, exclude values that make the denominator zero. For radical functions with even roots, exclude values that make the radicand negative. For logarithmic functions, exclude non-positive inputs. You handle each function's domain first, then take the intersection. Step two is performing the algebraic operation. Combine like terms. Simplify if you want. But here's where students routinely lose points: simplification doesn't change the domain. If f(x) = (x^2 - 9)/(x - 3) and g(x) = x + 3, then f + g might look like it simplifies to something without a restriction at x = 3. It doesn't. f(3) is undefined, so (f + g)(3) is undefined regardless of what the simplified expression suggests. The hole at x = 3 remains. I've seen this cost students entire questions on AP exams and similar assessments.
A concrete example. Let f(x) = 2x + 1 and g(x) = x^2 - 3x + 5. The sum is (f + g)(x) = 2x + 1 + x^2 - 3x + 5 = x^2 - x + 6. The difference is (f - g)(x) = 2x + 1 - x^2 + 3x - 5 = -x^2 + 5x - 4. Both domains are all real numbers since these are polynomials. Nothing tricky here. The exercise becomes interesting when the functions have different structural constraints. Consider f(x) = sqrt(x + 2) and g(x) = 1/(x - 1). The domain of f is [-2, infinity). The domain of g is all real numbers except 1. The intersection is [-2, 1) union (1, infinity). The sum (f + g)(x) = sqrt(x + 2) + 1/(x - 1) is only valid on that intersected domain. You can't evaluate it at x = 1 no matter what. Try it numerically if you don't believe me and you'll see the calculator error immediately. One thing that trips people up repeatedly involves piecewise functions. Say f(x) is defined differently on different intervals and g(x) has its own piecewise structure. Adding them requires you to align the interval boundaries first. If f switches at x = 2 and g switches at x = 3, your sum will potentially have breakpoints at both x = 2 and x = 3. You can't just add the expressions blindly. You need to consider each interval separately: x < 2, 2 <= x < 3, and x >= 3. Each interval gets its own expression for f + g. I once had a colleague lose sleep over a problem where the piecewise functions had overlapping boundaries that didn't quite match, and the resulting sum had an apparent discontinuity that wasn't actually there because the left and right limits agreed at the boundary point. Domain analysis and continuity checking are separate steps. Don't conflate them.
Get the Full Details

Another counter-intuitive point: subtraction is not commutative. f - g is not the same as g - f. This sounds trivial but students routinely flip the order when they're tired or rushing. The result changes sign across the entire domain. On a multiple choice test where both (f - g)(x) and (g - f)(x) appear as options, picking the wrong one is a common failure mode. I recommend writing out which function comes first every single time instead of relying on memory. There's also a practical limitation worth acknowledging. Function arithmetic in the abstract is clean. When you apply it to real data or experimental measurements, the error propagation matters. Adding two measurements with uncertainty doesn't just give you a new measurement. The uncertainties combine, usually by root-sum-square for independent errors. If you're working in a science context rather than pure math, treating function addition as purely algebraic will give you answers that look correct but are physically meaningless. This is one area where the textbook framework falls short and you need to bring in error analysis separately. For most classroom settings, the key things to keep straight are: find domains first, operate pointwise, never let simplification erase a restriction, check your order of subtraction, and align piecewise boundaries before combining. The mechanics are simple. The traps are in the details. Once you internalize the domain intersection rule and the simplification trap, the rest is just arithmetic and attention to what the problem is actually asking.