D. Characteristics of Functions · Combining Functions and ModellingSums and Differences of Functions
D2.1About 70 minutes
Learning goals- I can find the sum f + g and the difference f − g of two functions from equations, tables and graphs.
- I can sketch the graph of a sum or difference by adding or subtracting y-values (ordinates).
- I can state the domain of a sum or difference as the set of x-values where both functions are defined.
- I can describe key features of a sum or difference: domain, range, maximum and minimum points, and number of zeros.
Words to know
sum of functions
The function (f + g)(x) = f(x) + g(x). At each x, add the two outputs.
difference of functions
The function (f − g)(x) = f(x) − g(x). At each x, subtract the second output from the first.
ordinate
Another word for the y-coordinate (the height) of a point. Graphing f + g is called adding ordinates.
intersection of domains
The x-values that are in the domain of both functions. A combined function only exists there.
zero of a function
An x-value that makes the output 0. It is an x-intercept of the graph.
Two notes, one sound
Play two keys on a piano at the same time. Your ear does not hear two separate waves. The air pressure at your ear is the sum of the two waves, moment by moment. A noise-cancelling headset does the opposite: it adds a wave that is the negative of the noise, so the total is close to zero.
That is the idea of this unit. Functions can be added, subtracted, multiplied, divided and fed into each other, just like numbers. Complicated models (a pendulum slowly stopping, a phone's dial tone, a company's profit) are often simple functions combined.
Remember from Grade 11: in Functions (MCR3U), in the unit Functions and Equivalent Expressions, you used function notation f(x), found domain and range, and added and subtracted polynomials. Earlier units of this course gave you the polynomial, rational, exponential, logarithmic and trigonometric functions you will now combine.
Adding and subtracting functions
If f and g are two functions, we define new functions:
- (f + g)(x) = f(x) + g(x)
- (f − g)(x) = f(x) − g(x)
In words: pick an x, find both outputs, then add (or subtract) them. You do this for every x.
For example, if f(x) = x² and g(x) = 2x − 3, then
- (f + g)(x) = x² + 2x − 3
- (f − g)(x) = x² − (2x − 3) = x² − 2x + 3
Notice the brackets in the difference. You subtract all of g(x), so every sign inside g changes. Also note that f − g and g − f are different: (g − f)(x) = −x² + 2x − 3, the negative of f − g.
| x | −3 | −2 | −1 | 0 | 1 | 2 |
|---|
| f(x) = x² | 9 | 4 | 1 | 0 | 1 | 4 |
| g(x) = 2x − 3 | −9 | −7 | −5 | −3 | −1 | 1 |
| (f + g)(x) | 0 | −3 | −4 | −3 | 0 | 5 |
| (f − g)(x) | 18 | 11 | 6 | 3 | 2 | 3 |
Each entry in the last two rows comes from the two entries above it in the same column.Adding graphs: stack the heights
You can add two graphs without any equations. At each x, measure the height of f and the height of g, and stack them. A height below the x-axis is negative, so it pulls the sum down.
Useful checkpoints when you sketch f + g:
- Where f(x) = 0, the sum equals g(x). The graph of f + g crosses the graph of g there.
- Where g(x) = 0, the sum equals f(x).
- Where f(x) and g(x) are opposites (like 9 and −9), the sum is 0: a zero of f + g.
- Far to the left and right, the term that grows fastest takes over the end behaviour.
The thick solid curve is f + g. At x = 2 the heights 4 and 1 stack to 5. At x = −3 the heights 9 and −9 cancel, so f + g has a zero there. The minimum of the sum is (−1, −4).Worked exampleExample 1: Key features of a sum
Let f(x) = x² and g(x) = 2x − 3. Find (f + g)(x) and describe its domain, range, minimum point and zeros.
- Add: (f + g)(x) = x² + 2x − 3.
- Both f and g are defined for all real numbers, so the domain of f + g is {x ∈ ℝ}.
- Complete the square to find the vertex: x² + 2x − 3 = (x² + 2x + 1) − 1 − 3 = (x + 1)² − 4. The minimum point is (−1, −4).
- The parabola opens up and its lowest value is −4, so the range is {y ∈ ℝ | y ≥ −4}.
- Factor to find the zeros: x² + 2x − 3 = (x + 3)(x − 1). The zeros are x = −3 and x = 1 (two zeros).
f + g has domain ℝ, range y ≥ −4, minimum (−1, −4) and two zeros, x = −3 and x = 1. These match the graph above.
Differences and intersections
Here is a powerful fact: the zeros of f − g are exactly the x-values where the graphs of f and g intersect. That is because
(f − g)(x) = 0 means f(x) − g(x) = 0, which means f(x) = g(x).
The graph of f − g also tells you which function is bigger: where f − g is above the x-axis, f(x) > g(x); where it is below, f(x) < g(x). You will use this idea again to solve hard equations and inequalities in the lesson When Algebra Is Not Enough: Solving Graphically and Numerically.
Left: f(x) = x² and g(x) = x + 2 meet at x = −1 and x = 2. Right: their difference f − g has its zeros at exactly those x-values, and it is negative between them, where g is above f.The domain of a sum or difference
A sum only makes sense where both outputs exist. So
domain of f + g = domain of f − g = (domain of f) ∩ (domain of g),
the intersection of the two domains (the x-values they share). Watch for square roots (the inside must be ≥ 0), logarithms (the inside must be > 0) and denominators (they cannot be 0).
Worked exampleExample 2: A domain that shrinks
Let f(x) = √(x + 2) and g(x) = √(4 − x). Find the domain of h(x) = f(x) + g(x), and find its maximum and minimum values.
- f is defined when x + 2 ≥ 0, so x ≥ −2. g is defined when 4 − x ≥ 0, so x ≤ 4.
- Intersect the domains: −2 ≤ x ≤ 4.
- Check the endpoints: h(−2) = √0 + √6 = √6 ≈ 2.45 and h(4) = √6 + √0 = √6 ≈ 2.45.
- The two pieces are mirror images about x = 1 (halfway between −2 and 4), so try the middle: h(1) = √3 + √3 = 2√3 ≈ 3.46.
- To be sure, square h: h(x)² = (x + 2) + (4 − x) + 2√((x + 2)(4 − x)) = 6 + 2√((x + 2)(4 − x)). The product (x + 2)(4 − x) is a downward parabola with its largest value 9 at x = 1, and its smallest value 0 at the endpoints. So h² goes from 6 up to 6 + 2(3) = 12.
Domain {x ∈ ℝ | −2 ≤ x ≤ 4}. Maximum value 2√3 ≈ 3.46 at x = 1; minimum value √6 ≈ 2.45 at x = −2 and x = 4. The range is √6 ≤ y ≤ 2√3.
Domain first, then everything else
Always find the domain of a combined function before you simplify it. Simplifying can hide a restriction. For example, if f(x) = √x and g(x) = −√x + 5, then f + g simplifies to 5, but its domain is still x ≥ 0, so its graph is only the half-line y = 5 for x ≥ 0.
Adding functions from different families
The sum of two different kinds of functions can have a shape neither one has alone. Look at y = x + sin x (x in radians, as in the unit Radian Measure and Trigonometric Functions). The line y = x sets the overall direction, and sin x adds a wiggle between −1 and 1 on top of it.
- Domain: all real numbers (both pieces are defined everywhere).
- Range: all real numbers (the line keeps climbing).
- The graph stays within 1 unit of y = x, touching y = x + 1 when sin x = 1 and y = x − 1 when sin x = −1.
- It has no maximum or minimum, and only one zero, at x = 0, because for x > 0 the line x outruns the most that sin x can subtract.
y = x + sin x (solid) wiggles around the line y = x (dashed). The short vertical bars show the gap at x = π/2 (1 unit above the line) and at x = 3π/2 (1 unit below); it never gets farther away than that.Worked exampleExample 3: Sketching a difference from two graphs
Let f(x) = 2ˣ and g(x) = 4. Describe the graph of (f − g)(x) = 2ˣ − 4 using the graphs of f and g.
- Subtracting the constant 4 moves every point of y = 2ˣ down 4 units.
- f has horizontal asymptote y = 0, so f − g has horizontal asymptote y = −4.
- The graphs of f and g intersect where 2ˣ = 4, that is x = 2. So f − g has its zero at x = 2.
- The y-intercept of f − g is 2⁰ − 4 = −3.
- Range: 2ˣ > 0, so 2ˣ − 4 > −4.
y = 2ˣ − 4 is an increasing exponential curve with asymptote y = −4, y-intercept −3, one zero at x = 2, domain ℝ and range y > −4. (Subtracting a constant function is the vertical translation you learned in Grade 11.)
Just for funAdding functions is like a group project: the result only exists where everyone shows up. Mathematicians call that the intersection of the domains.
Hands-on activityAdd two graphs with a strip of paper
You need: grid paper (or lined paper with a ruler grid you draw), a ruler, a pencil and a thin strip of scrap paper.
- Draw axes from x = −4 to 4 and y = −8 to 10. Sketch f(x) = x² carefully (plot x = −3 to 3) and the line g(x) = 2x − 3.
- Pick x = 2. Lay the paper strip along the vertical line x = 2. Put a tick on the strip at the x-axis and another at the height of g (that is the length 1).
- Slide the strip up so the bottom tick sits on the curve f at x = 2. The top tick now marks f(2) + g(2). Plot it.
- Repeat for x = −3, −2, −1, 0, 1 and 3. When g is below the axis, the strip shows a downward length, so slide it down from f instead.
- Join your points with a smooth curve and compare with the table in this lesson.
What to look for: your points should be (−3, 0), (−2, −3), (−1, −4), (0, −3), (1, 0), (2, 5) and (3, 12) (the last may be off your grid). The curve is a parabola with its lowest point at (−1, −4). If a point is off, check the sign of g at that x.
Your turn
1f(x) = 3x + 1 and g(x) = x² − 4. Find (f + g)(x) and (f − g)(x).
(f + g)(x) = x² + 3x − 3. (f − g)(x) = 3x + 1 − x² + 4 = −x² + 3x + 5.
2Use f and g from the previous question. Find (f + g)(2) in two ways.
Directly: f(2) + g(2) = 7 + 0 = 7. From the equation: 4 + 6 − 3 = 7. (f + g)(2) = 7.
3f(x) = log x and g(x) = √(5 − x). State the domain of f + g.
log x needs x > 0. √(5 − x) needs x ≤ 5. Domain: {x ∈ ℝ | 0 < x ≤ 5}.
4The graphs of p and q intersect at x = −2, x = 1 and x = 4. What are the zeros of p − q?
x = −2, 1 and 4, because p − q = 0 exactly where p(x) = q(x).
5f(x) = x² and g(x) = −x² + 8. Find the zeros of f − g and the maximum of f + g.
f − g = 2x² − 8 = 2(x − 2)(x + 2): zeros x = ±2. f + g = 8 for every x, so its maximum (and minimum) is 8.
6Without graphing technology, describe y = x + cos x near x = 0 and its range.
At x = 0, y = 0 + 1 = 1. The graph wiggles within 1 unit of y = x. Since the line rises without bound in both directions, the range is all real numbers.
More practice: warm-up
1f(x) = 5x and g(x) = x − 2. Find (f + g)(x).
2f(x) = 5x and g(x) = x − 2. Find (f − g)(x).
3f(1) = 7 and g(1) = −3. Find (f + g)(1) and (f − g)(1).
4What is the domain of f + g if f has domain x ≥ 0 and g has domain ℝ?
x ≥ 0 (the intersection).
5True or false: f − g is always the same function as g − f.
False. g − f = −(f − g); it is the reflection of f − g in the x-axis.
More practice: on your own
1f(x) = x³ and g(x) = −3x. Find the zeros of f + g and describe its end behaviour.
x³ − 3x = x(x² − 3) = 0, so x = 0, ±√3 (three zeros). The x³ term takes over: as x → ∞, y → ∞; as x → −∞, y → −∞.
2f(x) = 10(0.5)ˣ and g(x) = 2. Describe f + g: asymptote, y-intercept, range, increasing or decreasing.
y = 10(0.5)ˣ + 2: asymptote y = 2, y-intercept 12, range y > 2, decreasing (it is f shifted up 2).
3Find the domain of h(x) = √(x − 1) − 1/(x − 3).
√(x − 1) needs x ≥ 1; 1/(x − 3) needs x ≠ 3. Domain: {x ∈ ℝ | x ≥ 1, x ≠ 3}.
4A table gives f(−1) = 4, f(0) = 1, f(1) = 0 and g(−1) = −4, g(0) = 2, g(1) = 3. Which of these x-values is a zero of f + g? Where do f and g meet?
(f + g)(−1) = 0, so x = −1 is a zero of f + g. f − g = 8, −1, −3 at these points, never 0, so f and g do not meet at any of these three x-values. (If both are continuous, they cross somewhere between −1 and 0, where f − g changes sign.)
5f(x) = sin x and g(x) = 1 on 0 ≤ x ≤ 2π. Find the maximum and minimum of f − g and where they occur.
f − g = sin x − 1. Maximum 0 at x = π/2; minimum −2 at x = 3π/2.
Challenge
1f(x) = √(9 − x²) and g(x) = −√(9 − x²). Describe the graphs of f, g, f + g and f − g.
f is the upper half and g the lower half of the circle x² + y² = 9, both with domain −3 ≤ x ≤ 3. f + g = 0 on −3 ≤ x ≤ 3: a segment of the x-axis, not the whole axis. f − g = 2√(9 − x²): the upper half of the ellipse with x-intercepts ±3 and maximum 6 at x = 0 (the semicircle stretched vertically by 2). Range of f − g: 0 ≤ y ≤ 6.
2Show that y = x + sin x has only one zero.
At x = 0, y = 0. For x > 1, x + sin x ≥ x − 1 > 0. For 0 < x ≤ 1 (which is less than π), sin x > 0, so x + sin x > 0. By the same reasoning with signs flipped, y < 0 for all x < 0. So x = 0 is the only zero.
3Two functions f and g each have exactly two zeros. Must f + g have a zero? Give an example or explain.
No. Example: f(x) = x² − 1 (zeros ±1) and g(x) = −x² + 4x − 3 = −(x − 1)(x − 3) (zeros 1 and 3). Then f + g = 4x − 4 has one zero, x = 1. Change g to −x² + 5: zeros ±√5, and f + g = 4, which has no zeros. Zeros are not preserved by addition.
Check your understandingQuiz
1. If f(x) = x² − 1 and g(x) = 3 − x, what is (f − g)(x)?
2. f has domain x ≥ −1 and g has domain x < 6. What is the domain of f + g?
3. The graphs of f and g cross at exactly two points, x = 0 and x = 5. Which statement must be true?
4. At x = 4, f(4) = −2 and g(4) = 7. Which point is on the graph of y = (f + g)(x)?
5. What is the range of y = 3ˣ + 2?
6. How many zeros does (f + g)(x) have if f(x) = x² and g(x) = 4?
For parents and teachersBig idea: expectation D2.1 asks students to find key features (domain, range, maximum and minimum points, number of zeros) of functions made by adding, subtracting, multiplying or dividing functions. This lesson does sums and differences; the next two lessons do products and quotients.
How to help: pick two simple functions and an x-value, and ask your teen to find (f + g)(x) two ways: by adding the outputs, and from the combined equation. The answers must match. Ask "Where do these two graphs cross?" and connect it to the zeros of f − g.
Common difficulties:
- Forgetting the brackets when subtracting: x² − (2x − 3) is x² − 2x + 3, not x² − 2x − 3.
- Simplifying first and losing a domain restriction (√x − √x is 0, but only for x ≥ 0).
- Adding x-values instead of y-values when adding graphs.
- Forgetting that a negative height pulls the sum down.
Graphing technology (a free online grapher such as Desmos, or a graphing calculator) is expected in this course for checking, but every question here can be done by hand.