Grade by Grade
D. Characteristics of Functions · Combining Functions and Modelling

Sums 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−1012
f(x) = x²941014
g(x) = 2x − 3−9−7−5−3−11
(f + g)(x)0−3−4−305
(f − g)(x)18116323
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.
-5-4-3-2-1123-10-8-6-4-224681012xy4 + 1 = 59 + (−9) = 0(−1, −4)f(x) = x²g(x) = 2x − 3(f + g)(x) = x² + 2x − 3At every x, add thetwo heights (y-values).Zeros of f + g:x = −3 and x = 1
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 example

Example 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.

  1. Add: (f + g)(x) = x² + 2x − 3.
  2. Both f and g are defined for all real numbers, so the domain of f + g is {x ∈ ℝ}.
  3. Complete the square to find the vertex: x² + 2x − 3 = (x² + 2x + 1) − 1 − 3 = (x + 1)² − 4. The minimum point is (−1, −4).
  4. The parabola opens up and its lowest value is −4, so the range is {y ∈ ℝ | y ≥ −4}.
  5. 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.

-3-2-1123-22468xy-3-2-1123-22468xy(−1, 0)(2, 0)f(x) = x²g(x) = x + 2(f − g)(x) = x² − x − 2
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 example

Example 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.

  1. f is defined when x + 2 ≥ 0, so x ≥ −2. g is defined when 4 − x ≥ 0, so x ≤ 4.
  2. Intersect the domains: −2 ≤ x ≤ 4.
  3. Check the endpoints: h(−2) = √0 + √6 = √6 ≈ 2.45 and h(4) = √6 + √0 = √6 ≈ 2.45.
  4. 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.
  5. 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.
−2π−ππ2π-6-4-2246xyy = x + sin xy = x
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 example

Example 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.

  1. Subtracting the constant 4 moves every point of y = 2ˣ down 4 units.
  2. f has horizontal asymptote y = 0, so f − g has horizontal asymptote y = −4.
  3. The graphs of f and g intersect where 2ˣ = 4, that is x = 2. So f − g has its zero at x = 2.
  4. The y-intercept of f − g is 2⁰ − 4 = −3.
  5. 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 fun

Adding functions is like a group project: the result only exists where everyone shows up. Mathematicians call that the intersection of the domains.

Hands-on activity

Add 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.

  1. 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.
  2. 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).
  3. 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.
  4. 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.
  5. 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

1

f(x) = 3x + 1 and g(x) = x² − 4. Find (f + g)(x) and (f − g)(x).

2

Use f and g from the previous question. Find (f + g)(2) in two ways.

3

f(x) = log x and g(x) = √(5 − x). State the domain of f + g.

4

The graphs of p and q intersect at x = −2, x = 1 and x = 4. What are the zeros of p − q?

5

f(x) = x² and g(x) = −x² + 8. Find the zeros of f − g and the maximum of f + g.

6

Without graphing technology, describe y = x + cos x near x = 0 and its range.

More practice: warm-up

1

f(x) = 5x and g(x) = x − 2. Find (f + g)(x).

2

f(x) = 5x and g(x) = x − 2. Find (f − g)(x).

3

f(1) = 7 and g(1) = −3. Find (f + g)(1) and (f − g)(1).

4

What is the domain of f + g if f has domain x ≥ 0 and g has domain ℝ?

5

True or false: f − g is always the same function as g − f.

More practice: on your own

1

f(x) = x³ and g(x) = −3x. Find the zeros of f + g and describe its end behaviour.

2

f(x) = 10(0.5)ˣ and g(x) = 2. Describe f + g: asymptote, y-intercept, range, increasing or decreasing.

3

Find the domain of h(x) = √(x − 1) − 1/(x − 3).

4

A 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?

5

f(x) = sin x and g(x) = 1 on 0 ≤ x ≤ 2π. Find the maximum and minimum of f − g and where they occur.

Challenge

1

f(x) = √(9 − x²) and g(x) = −√(9 − x²). Describe the graphs of f, g, f + g and f − g.

2

Show that y = x + sin x has only one zero.

3

Two functions f and g each have exactly two zeros. Must f + g have a zero? Give an example or explain.

Check your understanding

Quiz

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 teachers

Big 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.