Combine two functions with arithmetic
Quick review (2 minutes)
Imagine two pay envelopes for the same year.
(f + g)(x) = f(x) + g(x); (f − g)(x) = f(x) − g(x); (fg)(x) = f(x)·g(x); ()(x) = .
Use inputs allowed by both functions; for the quotient also require g(x) ≠ 0.
1. Find the requested operation and its order. g − f means the g answer minus the f answer.
2. Use the same input in both original functions, because their outputs must refer to the same starting value.
3. Record where both formulas work and, for division, where the bottom output is nonzero.
4. Put each whole expression in parentheses before combining it. Simplify while keeping every original domain restriction.
5. Check one permitted input directly in the original functions.
Let f(x) = x + 1 and g(x) = 2x. Find their sum, difference f − g, product, and quotient f divided by g at input 2. The question asks you to get both outputs at 2, then combine those outputs in four ways. Plan: evaluate both functions at the same input 2, combine their outputs in four ways, then derive the four combined formulas.
Sum: 7.
Difference: −1.
Product: 12.
Quotient: .
Subtracting only the first term of a function. ( − 1) − (x − 1) subtracts the entire second expression, so both of its signs change.
Write the accepted inputs of each original function. Keep inputs accepted by both.
For a quotient, solve bottom function = 0 to locate the additional inputs to remove. Plug each proposed excluded input back into that bottom.
Substitute the formulas with parentheses around the whole second expression.
Simplify and keep all original exclusions. Check using the two original outputs.
Function
A rule that gives exactly one output for each input it accepts.
Input
The starting value you give a function. It goes inside the parentheses in function notation.
Output
The answer a function produces from an accepted input.
Evaluate
Find the output of a function or the value of an expression for a given input.
Algebraic operations
The familiar actions of addition, subtraction, multiplication, and division, applied to numbers or expressions.
Sum of functions
A new function that adds two outputs produced from the same input. Both original functions must accept that input.
Difference of functions
A new function that subtracts one output from another at the same input. Subtract the entire second expression.
Product of functions
A new function that multiplies two outputs produced from the same input. Both original functions must accept that input.
Quotient of functions
A new function that divides two outputs at the same input. Both outputs must exist, and the bottom output must not be zero.
Ratio
A comparison made by division. The first amount is divided by the second, so the second must not be zero.
Domain
All inputs for which a function is defined.
Inner function
The function evaluated first in a composition. Its output becomes the next function's input.
Outer function
The function evaluated second in a two-function composition. It receives the inner function's output.
Substitution
Replacing a variable with a number or expression everywhere that variable appears. Parentheses hold a multi-term replacement together.
Reciprocal
One divided by a nonzero number. A fraction's reciprocal swaps its top and bottom, and their product is 1.
Decomposition
Writing a function as a composition of simpler functions by naming an inside job and an outside job.
Intersection
The values shared by all the sets or conditions being combined.
Formula
A written rule using numbers, symbols, and operations to describe how a quantity is calculated.
Table
An organized display of matching values. In a function table, each input and its output share a column or row.
Graph
A picture of coordinate pairs. A function graph shows each input horizontally and its output vertically.
Denominator
The bottom of a fraction. It names the divisor and cannot be zero.
Real number
A number on the ordinary number line, including negatives, zero, fractions, and numbers such as .
Nonnegative
Greater than or equal to zero. Zero is included, while positive means greater than zero and excludes zero.
Difference of squares
One squared expression minus another. It factors into the first expression minus the second, times the first plus the second.
Factor
One of the quantities multiplied together in a product.
Factoring
Rewriting an expression as a product of factors without changing its value.
Cancellation
Dividing a fraction's top and bottom by the same nonzero factor. It preserves the value on the original domain.
Fraction
One number divided by another nonzero number. The top is divided by the bottom; equal pieces give a picture of its size.
Linear
A formula built from a constant times the input plus a constant. Its graph is a straight line.
Constant function
A function that gives the same output for every input it accepts.
Hole
One missing graph point, shown with an open dot. Its input does not have that plotted value.
Solve
Find every input that makes a stated equality or inequality true. This differs from evaluating at a given input.
Endpoint
A boundary number at an end of an interval. A bracket includes it; a parenthesis leaves it out.
Like terms
Terms with the same variable part and powers. Their number factors can be added or subtracted.
Distribute
Multiply each term inside parentheses by the outside factor.
Numerator
The top of a fraction. It is the amount divided by the denominator.
Power
The result of repeatedly multiplying a number or expression by itself. A positive whole-number exponent counts the copies.
1 In plain words
Imagine two pay envelopes for the same year. One person earned f(x) dollars and another earned g(x) dollars. To find their household income, you open both envelopes and add the amounts. You use the same year for both people. Algebraic operations on functions work this way: get two answers at the same input, then add, subtract, multiply, or divide those answers. You are making a new function from two old ones. A sum of functions adds the outputs. A difference of functions subtracts them. A product of functions multiplies them. A quotient of functions divides them, provided the bottom answer is not zero.
2 Picture it
Reminder
Reminder: Substitution, Subtracting parentheses, Factoring, Domain, Shared factor, Multiplying powers
- Substitution. Replace the input letter everywhere: − 1 at x = 3 gives − 1 = 8.
- Subtracting parentheses. A minus outside reverses every sign: −(x − 1) = −x + 1.
- Factoring. − 1 = (x − 1)(x + 1), because the middle terms cancel when multiplied.
- Domain. A denominator cannot be zero: excludes x = 1.
- Shared factor. − x = x·x − x·1 = x(x − 1). Distributing x rebuilds the two terms.
- Multiplying powers. x· = x·x·x = , because three copies of x are multiplied.
3 Why
Each original function gives exactly one output at an allowed input. Arithmetic then combines those two numbers into one new answer, so the result is another function. Both original answers must exist: an unavailable answer cannot be added or multiplied. Division needs one more check, because no number multiplied by zero can give a nonzero numerator. Units also matter. Two incomes measured in dollars can be added. Dollars and hours describe different things, so their sum would not represent a meaningful total.
4 The rule
; ; (fg); .
Use inputs allowed by both functions; for the quotient also require .
The same idea, five ways
f plus g of x; f times g of x; f divided by g of x
Put one input into both recipes, then combine their two outputs.
- (f + g)(x) = f(x) + g(x)
- (fg)(x) = f(x)·g(x)
- f + g names a recipe; (f + g)(2) names its output at 2
Two pay envelopes for the same year.
(f + g)(2) = f(2) + g(2)
(fg)(2) = f(2)·g(2)
The final parentheses hold the input 2
The same idea, other ways
At one year, open both pay envelopes. Adding their amounts gives the total for that year; using different years would answer a different question. At year 2, the two incomes are 38400 and 43600 dollars. Together they give 82000 dollars in the pictured household column.
If f(2) = 3 and g(2) = 4, the sum at 2 is 7 and the product at 2 is 12. You combine 3 and 4 after evaluating, rather than putting 3 through g.
Part 1: Sum of functions
A sum collects two amounts. If f and g represent incomes in the same currency and year, their sum is household income. Both amounts must exist before you can add them.
- (f + g)(x) = f(x) + g(x).
- The domain is the intersection of the original domains: inputs accepted by both.
- The shared input may be a date or an item name instead of a number; both outputs must be real numbers.
- Addition and subtraction need matching units or two unitless outputs. If two price rules for the same book give 12 dollars and 8 dollars, their sum is 20 dollars because the quantities match.
f(x) = x + 1
g(x) = 2x
(f + g)(x) = 3x + 1
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Sum of functions
A sum collects two amounts. If f and g represent incomes in the same currency and year, their sum is household income. Both amounts must exist before you can add them.
- (f + g)(x) = f(x) + g(x).
- The domain is the intersection of the original domains: inputs accepted by both.
- The shared input may be a date or an item name instead of a number; both outputs must be real numbers.
- Addition and subtraction need matching units or two unitless outputs. If two price rules for the same book give 12 dollars and 8 dollars, their sum is 20 dollars because the quantities match.
A sum collects two amounts. If f and g represent incomes in the same currency and year, their sum is household income. Both amounts must exist before you can add them.
f(x) = x + 1
g(x) = 2x
(f + g)(x) = 3x + 1
Worked example
Add formulas
For f(x) = x + 1 and g(x) = 2x, find (f + g)(x). You want one formula for the total output at any input. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- .A sum adds the original function outputs.
- .One x and two x amounts make three x amounts.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write the input beside both function names before adding.
Part 2: Difference of functions
A difference compares two outputs at one input. Think of money earned minus money spent in one month. Subtract the whole second amount, including every term in its formula. In a cup-selling model, profit is revenue minus cost. If R(x) = 3x and C(x) = 0.75x + 18 dollars, profit is 2.25x − 18 dollars. At 24 cups, 72 dollars earned minus 36 dollars spent leaves 36 dollars.
- Subtraction order matters: a − b and b − a usually differ.
Reminder
Reminder: Pulling out a factor
- Pulling out a factor. − x = x·x − x·1 = x(x − 1), because both terms contain x.
The same idea, five ways
Difference of functions
A difference compares two outputs at one input. Think of money earned minus money spent in one month. Subtract the whole second amount, including every term in its formula. In a cup-selling model, profit is revenue minus cost. If R(x) = 3x and C(x) = 0.75x + 18 dollars, profit is 2.25x − 18 dollars. At 24 cups, 72 dollars earned minus 36 dollars spent leaves 36 dollars.
- Subtraction order matters: a − b and b − a usually differ.
A difference compares two outputs at one input. Think of money earned minus money spent in one month. Subtract the whole second amount, including every term in its formula. In a cup-selling model, profit is revenue minus cost. If R(x) = 3x and C(x) = 0.75x + 18 dollars, profit is 2.25x − 18 dollars. At 24 cups, 72 dollars earned minus 36 dollars spent leaves 36 dollars.
Worked example
Subtract the whole linear formula
Let f(x) = x − 1 and g(x) = − 1. Find (g − f)(x). You want the g output minus the whole f output. Plan: keep the second output in parentheses, change both of its signs, then collect matching terms.
Show the steps and the answer
- .The requested order is g minus f.
- .Subtracting x − 1 means adding its opposite, −x + 1.
- .The constants −1 and +1 cancel, and both remaining terms contain a factor x.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Put parentheses around the second function before distributing the subtraction.
Part 3: Product of functions
A product multiplies two outputs at the same input. If one output is a price per ticket and the other is the number of tickets, their product is the total price. Multiplication may change the units.
- (fg)(x) = f(x)·g(x).
- The product needs both functions defined, but an output of zero is allowed.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Product of functions
A product multiplies two outputs at the same input. If one output is a price per ticket and the other is the number of tickets, their product is the total price. Multiplication may change the units.
- (fg)(x) = f(x)·g(x).
- The product needs both functions defined, but an output of zero is allowed.
A product multiplies two outputs at the same input. If one output is a price per ticket and the other is the number of tickets, their product is the total price. Multiplication may change the units.
Worked example
Multiply a line by a square
Let f(x) = x + 2 and g(x) = . Find (fg)(x). You want to multiply their outputs at the same x. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
- (fg).The product multiplies f(x) by g(x).
- .Distribution multiplies both terms, and x times contains three factors x.
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- A multiplication dot belongs between the two output expressions.
Part 4: Quotient of functions
A quotient is a ratio: one output divided by another at the same input. The denominator is the bottom expression. It must not be zero, even if later cancellation makes the formula look harmless. The same cost model gives average cost per cup as , for x > 0 cups. At 24 cups, = dollars per cup. Zero cups cannot supply a cost per cup because division by zero fails.
- ()(x) = , with both functions defined and f(x) ≠ 0.
- Equal functions need matching domains and matching outputs, not only matching simplified formulas.
Reminder
Reminder: Function notation
- Function notation. The name chooses a recipe and the parentheses supply its input: f(3) is the f output at input 3.
The same idea, five ways
Quotient of functions
A quotient is a ratio: one output divided by another at the same input. The denominator is the bottom expression. It must not be zero, even if later cancellation makes the formula look harmless. The same cost model gives average cost per cup as , for x > 0 cups. At 24 cups, = dollars per cup. Zero cups cannot supply a cost per cup because division by zero fails.
- ()(x) = , with both functions defined and f(x) ≠ 0.
- Equal functions need matching domains and matching outputs, not only matching simplified formulas.
A quotient is a ratio: one output divided by another at the same input. The denominator is the bottom expression. It must not be zero, even if later cancellation makes the formula look harmless. The same cost model gives average cost per cup as , for x > 0 cups. At 24 cups, = dollars per cup. Zero cups cannot supply a cost per cup because division by zero fails.
Worked example
Cancel without restoring the forbidden input
For f(x) = x − 1 and g(x) = − 1, find ()(x). You want the g output divided by the f output and the inputs where that division works. Plan: use the quantity or input named in the question, write the first result, then finish the stated operation.
Show the steps and the answer
= x + 1 only when x ≠ 1
- . Require .The original bottom x − 1 is zero at 1.
- .Multiplying these factors gives − x + x − 1, so the middle terms cancel.
- , while keeping .A common nonzero factor can be divided out; at 1 that factor is zero, so cancellation was never legal there.
- ()(x) = x + 1, with x ≠ 1.
- Domain: (−∞, 1) ∪ (1, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Write excluded inputs before factoring.
5 How
- Find the requested operation and its order. g − f means the g answer minus the f answer.
- Use the same input in both original functions, because their outputs must refer to the same starting value.
- Record where both formulas work and, for division, where the bottom output is nonzero.
- Put each whole expression in parentheses before combining it. Simplify while keeping every original domain restriction.
- Check one permitted input directly in the original functions.
Combine two functions and keep their domains
- Write the accepted inputs of each original function. Keep inputs accepted by both.
- For a quotient, solve bottom function = 0 to locate the additional inputs to remove. Plug each proposed excluded input back into that bottom.
- Substitute the formulas with parentheses around the whole second expression.
- Simplify and keep all original exclusions. Check using the two original outputs.
6 Worked example
Worked example
The same input, four different combinations
Let f(x) = x + 1 and g(x) = 2x. Find their sum, difference f − g, product, and quotient f divided by g at input 2. The question asks you to get both outputs at 2, then combine those outputs in four ways. Plan: evaluate both functions at the same input 2, combine their outputs in four ways, then derive the four combined formulas.
Show the steps and the answer
Same input: 2
f(2) = 3; g(2) = 4
- and .Both functions receive input 2, so both answers describe that same input.
- .The sum adds the two outputs.
- .The written order puts the f output first.
- (fg).The product multiplies the outputs.
- .The quotient divides the f output by the nonzero g output.
- As formulas, and .Only matching x terms combine; the written subtraction order stays fixed.
- (fg), and , requiring .Distribution multiplies both terms. The quotient removes the input 0 that makes 2x zero.
- Sum: 7.
- Difference: −1.
- Product: 12.
- Quotient: .
Ladder: from easy to exam-hard
Try each rung before you open its steps.
Rung 1 of 6
Subtract one constant output
Let p(x) = x + 5 and q(x) = 2. This is a constant function: it returns the same output 2 for every input. Find (p − q)(x). You want the first output minus 2. Plan: write the original outputs with parentheses, record any forbidden input, then simplify and check.
Show the steps and the answer
- .Subtraction acts on the two outputs.
- .
Rung 2 of 6
Subtract a whole function: (g − f)(x)
Let f(x) = − 5x + 2 and g(x) = 3 + x − 5. Find (g − f)(x), simplify it, and state its domain. Then check your formula at x = 2 using the original functions.
Show the steps and the answer
- Find the operation and its order: means the g output minus the f output, .Subtraction does not commute: f − g would give the opposite of every value. Here f is listed first in the problem, but it must go second.
- Use the same input x in both original functions: and .(g − f)(x) subtracts two outputs that come from one starting value, so both formulas must use that same x.
- Record where both formulas work. f and g are polynomials, so each accepts every real number. This is a difference, not a quotient, so no bottom output has to be kept nonzero. Domain of : all real numbers, .An input is allowed in g − f exactly when it is allowed in both g and f. The extra nonzero condition applies only to division.
- Put each whole expression in parentheses: .The minus sign subtracts all of f(x), not just its first term. The parentheses keep the three terms of f(x) together.
- Distribute the minus sign to every term in the second parentheses: .Subtracting ( − 5x + 2) is the same as adding − + 5x − 2, so all three signs flip. Dropping the parentheses would subtract only the and give the wrong answer 2 − 4x − 3.
- Combine like terms: .Only terms with the same power of x combine. Neither f nor g had a restriction, so the domain is still all real numbers after simplifying.
- Check directly in the original functions: and , so . The formula gives , so they match.Working from f and g separately tests the order and every sign change. The dropped-parentheses answer would give −3 here, and the reversed order f − g would give −13.
- domain: all real numbers, (−∞, ∞).
Work to write
- Domain: all real numbers, (−∞, ∞), because f and g are polynomials and there is no division
- Check x = 2: g(2) − f(2) = 9 − (−4) = 13 and 2(2 + 6(2) − 7 = 13
Rung 3 of 6
Factor a difference of squares
Rewrite − 16 as a product. You want two factors whose multiplication recreates the original expression. Plan: recognize − , use the difference and sum of x and 4, then multiply to check.
Show the steps and the answer
- , so .This is a difference of two squares.
- .Expanding gives + 4x − 4x − 16; the middle terms cancel.
Rung 4 of 6
Factor and retain the hole
Let p(x) = − 16 and q(x) = x − 4. Find ()(x) and its domain. You want a quotient formula and every permitted input. Plan: write the original outputs with parentheses, record any forbidden input, then simplify and check.
Show the steps and the answer
- Start with and record .The original denominator must be nonzero.
- Factor the top: . − 16 is a difference of squares.
- Cancel the factor to obtain , still with .The cancellation divides by a factor known to be nonzero only on that restricted domain.
- Domain: (−∞, 4) ∪ (4, ∞).
Rung 5 of 6
A product and a quotient with two original exclusions
Let p(x) = x − 3 and q(x) = − 9. Find (pq)(x), ()(x), their domains, and whether they are the same function. You want to multiply the outputs, then divide them. Plan: identify the original bottom zeros before factoring or canceling.
Show the steps and the answer
- (pq).A product multiplies outputs at one shared input.
- .Every term in the first group multiplies every term in the second.
- .x· contains three x factors, and two negative factors make positive 27.
- For the quotient, start with . Solve , so and or .This finds both inputs that would make the original bottom zero, so both must be removed.
- Check: and . Exclude both 3 and .Substitution confirms that both original divisions fail.
- Factor . Then , with both exclusions retained.Canceling a common nonzero factor preserves outputs only where the original quotient existed.
- At , (pq) and .Two different outputs at one shared allowed input prove the functions are different.
- (pq)(x) = − 3 − 9x + 27, domain (−∞, ∞).
- ()(x) = , domain (−∞, −3) ∪ (−3, 3) ∪ (3, ∞).
- They are different functions.
Rung 6 of 6
The domains of the two ingredients differ
Let f(x) = and g(x) = . Find f + g, f − g, fg, f/g and g/f with their domains. You want formulas and the inputs each operation can accept. Plan: overlap the two original domains, then remove any zero bottom output for each quotient.
Show the steps and the answer
- f needs , so . g needs , so .The root requires a nonnegative inside, and the fraction requires a nonzero bottom.
- The overlap is .Arithmetic needs both original outputs at the same starting input.
- ; ; (fg).Apply the requested operation to the two complete outputs.
- For , g(x) never equals zero on its domain, since its top is 2. Thus .Division multiplies by the reciprocal of the nonzero bottom output.
- For , also require . It equals zero at , because . Remove .This finds and confirms the extra starting input that would make the quotient bottom zero.
- , with domain .The bottom combines the original fraction bottom and the root output; both must stay nonzero.
- (f + g)(x) = + , domain [−6, 5) ∪ (5, ∞).
- (f − g)(x) = − , domain [−6, 5) ∪ (5, ∞).
- (fg)(x) = , domain [−6, 5) ∪ (5, ∞).
- ()(x) = , domain [−6, 5) ∪ (5, ∞).
- ()(x) = , domain (−6, 5) ∪ (5, ∞).
Counterexamples
What it is not, and the tempting wrong moves.
Tips and tricks
- Know cold.
Arithmetic gives both functions the same input. Memory cue: same input, two answers, one operation.
Composition runs the inner function first. Memory cue: read ∘ as after, so f ∘ g means f after g.
Replace every input slot with the whole expression. Memory cue: every slot gets the whole package.
Check both domain gates. Memory cue: gate 1 checks x, gate 2 checks the first answer.
An ordinary root permits zero; a denominator forbids it. Memory cue: root zero can stay, bottom zero goes away.
When decomposing, identify the last operation. Memory cue: the last calculator step is the outer function. - Understand, then rebuild when needed.
Expanded sums, products, factorizations, and composition formulas can be recreated with substitution and distribution. Do not memorize each final formula.
Rebuild a table or graph path by carrying the inner output to the outer input.
Rebuild domain intervals from the allowed points and the endpoint checks.
Rebuild a decomposition by identifying the final operation, then recomposing to check. - Put on the cheat sheet for study.
Arithmetic: (f + g)(x) = f(x) + g(x); (f − g)(x) = f(x) − g(x); (fg)(x) = f(x)·g(x); ()(x) = . Use the shared domain, with g(x) ≠ 0 for the quotient.
Composition: (f ∘ g)(x) = f(g(x)). Its domain keeps x allowed by g and g(x) allowed by f.
Roots: needs A ≥ 0; needs A > 0.
Square expansion: (a + b = + 2ab + . Difference of squares: − = (a − b)(a + b).
Intervals: brackets include finite endpoints, parentheses exclude them, and infinity always takes parentheses.
This is a study sheet. For a closed-book exam, practice recalling the short definitions and rebuilding the rest without looking. - A function name before parentheses means input: f(2) reads f of 2. A number before parentheses means multiplication: 3(2) = 6.
7 The trap
Subtracting only the first term of a function. ( − 1) − (x − 1) subtracts the entire second expression, so both of its signs change.
Problems marked OpenStax come from Precalculus 2e by Jay Abramson, published by OpenStax, under the CC BY-NC-SA 4.0 licence. Access for free at https://openstax.org/books/precalculus-2e/pages/1-introduction-to-functions.