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 | ||
| Difference | ||
| Product | ||
| Quotient |
Arithmetic of Functions
Given two functions and , 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 , , and are
the set of -values where both and are defined simultaneously.
For , we additionally exclude any where :
Let and . Find , , , , and , with their domains. Also evaluate each at .
Solution
Domains of and :
Intersection: .
Combined functions and their domains:
For , also exclude where :
Since for all in its domain:
Values at :
\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 and equal? What about and ?
Solution
(a) vs. :
.
For , we need . A sign chart shows this holds on .
So , and on . They are equal.

(b) vs. :
.
For , we need . A sign chart shows this holds on .
So but . The domains differ, so and are not equal.

Graphs of Combined Functions
To graph : for each , add the -coordinates of and geometrically.
The graphs of and are given. Sketch the graph of by graphical addition.
Solution
.
For each , the height of equals the sum of the heights of and :

At the points where and intersect (approximately ), .

Exercises
Let and . Find , , and , and state the domain of each.
Answer
, , , all with domain ; and with domain .
Solution
Domains of the ingredients. Both and are polynomials, and a polynomial can be evaluated at every real number. So
Sum.
Domain: .
Difference. Subtracting a bracket changes the sign of every term inside it:
Domain: . Note that ; dropping that sign change is the most common error here.
Product. Multiply each term of the first bracket by each term of the second:
Domain: .
Quotient.
For the domain we must also remove the points where the denominator is zero:
So the domain is .
Check. Test in each result. and . Then , and the sum formula gives ✓. , and the difference formula gives ✓. , and the product formula gives ✓. Finally , and the quotient formula gives ✓.
Let and . Evaluate, or state that the value does not exist.
(a) (b) (c) (d) (e)
Answer
(a) (b) (c) (d) does not exist (e) does not exist
Solution
The quickest route is to evaluate and separately at the given number, then combine.
(a) and . So
(b) and . So
Be careful with : an even power of a negative number is positive, so , not .
(c) and . So
(d) and . The quotient requires dividing by :
which is undefined. So does not exist; the input is excluded from the domain of .
(e) and . Again the denominator is zero, so
does not exist.
The lesson from (d) and (e). For a quotient, always evaluate the denominator function first and check that it is not zero. Both and here have domain , yet is undefined at and is undefined at — the exclusions come from the operation, not from the ingredients.
Let and . Find the domain of , of , of and of .
Answer
and : ; : ; : .
Solution
Domain of . A square root needs a nonnegative quantity underneath:
Domain of .
Take care when solving : adding to both sides gives , which is the same as .
The common domain. A number must satisfy both conditions:
and . For sums, differences and products the domain is exactly the common part:
. Start from and remove the points where the denominator is zero:
So must go, and
. Now the denominator is , and
So must go, and
Check. At : , so is undefined ✓, while is a perfectly good value ✓. A zero in the numerator is harmless; only a zero in the denominator removes a point.
Let and . Write as a single fraction and state its domain.
Answer
, with domain .
Solution
Domains of the ingredients.
A number is allowed for the sum only if it is allowed for both, so
Combining the fractions. The two denominators are and ; they share no common factor, so the least common denominator is their product . Rewrite each fraction with that denominator:
Now add the numerators over the common denominator:
If you prefer the denominator expanded, .
A warning about the domain. The single fraction happens to have exactly the same forbidden inputs, and . But that is a lucky feature of this example, not a rule: the domain of is decided by the domains of and before any algebra, and it must be stated from there.
Check. Take . Directly: . From the single fraction: ✓.
Take . Directly: . From the fraction: ✓.
Let and . Find and its domain. Is the function equal to the function , whose domain is ?
Answer
for , with domain . It is not equal to , because the domains differ.
Solution
The domain first. Both and are polynomials, so both have domain and the common domain is . For the quotient we must remove the zeros of the denominator:
Hence
The formula. Factor the numerator by the difference-of-squares formula:
For the factor is not zero, so it may be cancelled:
Is equal to ? Two functions are equal only if they have the same domain and the same values. The values do agree wherever both are defined. But
and belongs to the second but not the first. So the two functions are not equal.
The picture. The graph of is the whole line ; the graph of is that line with a hole at .
Why the hole is real. At the original quotient reads , which is not a number. Cancelling a factor can never legalise an input that was forbidden before the cancellation.
Suppose and . Find .
Answer
Solution
By definition , so
Subtract from both sides:
Distribute the minus sign over every term of the second bracket:
Now combine like terms:
-terms: .
-terms: .
constants: .
Check. Add and the answer:
The -terms give and the constants give , matching the given sum exactly.
The graphs of two functions and , both with domain , are shown.
Here and . Find , and , then describe the graph of .
Answer
, , . The graph of is the horizontal line .
Solution
Read the two values off the formulas (or off the picture) and then combine.
. and , so
Geometrically: stack the height of above on top of the height of above .
. and , so
. and , so
Notice that a product is zero whenever either factor is zero, so the graph of meets the -axis at (a zero of ) and at (a zero of ).
The graph of . Add the formulas:
The -terms cancel, so is the constant function , whose graph is the horizontal line . Its domain is , since both and are defined everywhere.
This is visible in the picture: as increases, rises exactly as fast as falls, so their heights always total . Check a few: at , ; at , ; at , ✓.
Let and . Find a piecewise formula for and sketch its graph.
Answer
(f+g)(x) = \begin{cases} 2x & \text{if } x \geq 0 \\ 0 & \text{if } x < 0 \end{cases}
Solution
Domain. Both formulas are defined for every real number, so .
The formula. By definition,
Now replace by its two-case definition.
If : then , so
If : then , so
Hence
(f+g)(x) = \begin{cases} 2x & \text{if } x \geq 0 \\ 0 & \text{if } x < 0. \end{cases}Reading the picture. For the two graphs coincide, so adding them doubles the height. For the graph of is exactly as far below the axis as the graph of is above it, so the heights cancel and the sum sits on the axis.
Check. : , and the formula gives ✓. : , and the formula gives ✓. : , and the first line gives ✓, so the two pieces meet without a break.
Decide in each case whether the two functions are equal.
(a) and
(b) and
Answer
(a) Equal; both have domain . (b) Not equal: but .
Solution
(a) Domain of . This is a product of two square roots, so both quantities under the roots must be nonnegative:
Both conditions together give , so .
Domain of . Here only the product has to be nonnegative:
The factors are zero at and . Test one value in each of the three resulting stretches:
: .
: .
: .
So the product is nonnegative exactly on , and too.
Values. On both and are nonnegative, and for nonnegative and we have . So the two formulas agree at every point of the common domain.
Same domain and same values, so and are equal.
(b) Domain of . Both radicands must be nonnegative:
Both hold exactly when , so .
Domain of . Only the product must be nonnegative:
The factors vanish at and . Testing:
: .
: .
: .
So .
Conclusion. The number belongs to but not to : indeed , whereas would require , which is not a real number. The domains differ, so and are not equal.
The moral. Two negative factors have a positive product. So can be a real number in situations where and separately are not. The rule needs and .
Let and . Find and its domain, and find and its domain.
Answer
with domain ; with domain .
Solution
Both and are polynomials, so each has domain and the common domain is . Only the zeros of whichever function sits in the denominator need to be removed.
. The formula is
Find the zeros of . Factor the quadratic: we need two numbers with product and sum , namely and :
A product is zero exactly when a factor is zero, so at and . Hence
. The formula is
Now the denominator is , and
Hence
Check. At : , so is undefined ✓, whereas is fine ✓. At : , so is undefined ✓, while is fine ✓.
The general point. and are usually different sets. Swapping numerator and denominator swaps which zeros must be excluded.
A workshop's cost of making chairs, in dollars, is , and its revenue from selling them is .
(a) Write the profit function .
(b) Find and , and say what each means.
(c) How many chairs must be sold for the profit to be zero?
Answer
(a) (b) (a loss of $800), (a profit of $1200) (c) chairs
Solution
(a) By the definition of a difference of functions,
Distribute the minus sign over both terms of the bracket:
The number is the profit per chair (each chair sells for $85 and costs $45 to make), and is the fixed cost that has to be covered whatever happens.
(b)
A negative profit is a loss: selling only chairs leaves the workshop $800 short, because the $1200 earned above cost does not cover the $2000 of fixed costs.
Selling chairs yields a profit of $1200.
(c) Set :
Add to both sides:
Divide both sides by :
So chairs must be sold to break even.
Check. At : and . Revenue equals cost, so the profit is indeed ✓.
A remark on the domain. Only whole, nonnegative numbers of chairs make sense, so in practice we would use the formula for even though the algebraic expression is defined for every real .
Let and . A student says that the domain of is , "because the only problem is division by zero". Find the error and give the correct domain.
Answer
The correct domain is .
Solution
What the definition requires. The domain of is
There are three conditions, and the student checked only the third.
Condition 1: must be in . Since requires a nonnegative radicand,
This is what the student missed: numbers like are excluded because is not a real number, quite apart from any division.
Condition 2: must be in . Since is a polynomial, , so this condition excludes nothing.
Condition 3: .
so must be removed.
Putting the three together.
Check. At the student's answer would allow the input, but
has no meaning, since is not a real number. At : , a perfectly good value, so correctly belongs to the domain — a zero in the numerator causes no trouble.
The habit to build. Before worrying about the operation, list the domains of the ingredients. The operation can only take points away, never add them back.
Is the statement "" always, sometimes, or never true? Justify your answer.
Answer
Sometimes true: the two domains agree exactly when has no zeros in .
Solution
Write . By the definitions,
So the second set is the first with the zeros of removed. The two are equal exactly when there are no such zeros to remove.
A case where they are equal. Let and . Here , and for every real , so is never zero. Then
A case where they are not equal. Let and . Again , and . Then
and these are different sets.
Conclusion. Both situations occur, so the statement is sometimes true.
One direction is always true. Whatever and are, is contained in , since dividing can only impose an extra requirement. The quotient's domain is never larger.
Find functions and , each with domain , such that the domain of is and the domain of is .
Answer
For example and . Many other answers work.
Solution
Work out what each requirement forces.
Requirement 1: . Choosing both to be polynomials guarantees this, since a polynomial can be evaluated at every real number. So .
Requirement 2: . Since with the zeros of removed, we need to be zero at and nowhere else. The simplest such polynomial is
which is zero exactly when .
Requirement 3: . Here the denominator is , and nothing is to be removed, so must have no zeros at all. The simplest such choice is the constant
which is never zero.
Verification.
Other correct answers. Any with no real zeros and any vanishing only at will do — for instance together with , or together with . What is not allowed is a choice like , which is zero at as well and would give the domain .
Frequently Asked Questions
Why does the domain of f/g exclude points where g(x) = 0?
Division by zero is undefined. Even if is in both and , if at that point, the quotient does not exist. We must exclude those points from the domain of .
Can the domain of f + g be larger than the domain of either f or g?
No. The domain of is a subset of each individual domain. It is the intersection, which is at most as large as either factor and often smaller.
What does graphical addition mean?
Graphical addition of and means: at each -value in the common domain, stack the -value of on top of the -value of to get the -value of . This can be done visually with a ruler.
Is always equal to ?
Only when both and . If one is negative, or is not real, but might be (when both are negative, their product is positive). This is why the domains of and can differ.