You can combine two functions into a new one just by adding or subtracting their outputs. This happens all the time in the real world: profit is revenue minus cost, and the sound of a chord or a phone’s dial tone is two waves added together. In this lesson you’ll add and subtract functions with equations, tables, and graphs, and see which properties of the pieces carry over to the result. Trig functions here use radians.
In words: put the same x into both functions, then add (or subtract) the two outputs. For example, if f(2)=7 and g(2)=−3, then (f+g)(2)=7+(−3)=4 and (f−g)(2)=7−(−3)=10.
Order matters for subtraction: (g−f)(x)=−(f−g)(x), so the two differences are opposites.
(f+g)(x) only makes sense when bothf(x) and g(x) exist. So the domain of f+g (and of f−g) is the set of x-values that are in the domain of fand in the domain of g: the intersection, or overlap, of the two domains.
Adding sinusoidal functions is called superposition. A musical chord, a phone’s dial tone (each key plays two pure tones at once), and noise-cancelling headphones all work by adding waves. The period of a sum like sinx+cos2x is the smallest length after which both pieces repeat: sinx repeats every 2π and cos2x every π, so the sum repeats every 2π. The sum is usually not a simple sinusoid: its shape can be quite different from either piece (see Example 3).
For example, if f and g are both even, then (f+g)(−x)=f(−x)+g(−x)=f(x)+g(x)=(f+g)(x).
Increasing behaviour adds up too: if f and g are both increasing on an interval, so is f+g. But the difference of two increasing functions can do anything (see Practice question 9).
Let h(x)=2sinx+cos2x, with x in radians. Make a table of values for 0≤x≤2π, sketch the graph, and find the period, the zeros, and the largest and smallest values.
Solution. Add the outputs of 2sinx and cos2x at multiples of 4π (decimals rounded to 2 places):
x
0
4π
2π
43π
π
45π
23π
47π
2π
2sinx
0
1.41
2
1.41
0
−1.41
−2
−1.41
0
cos2x
1
0
−1
0
1
0
−1
0
1
h(x)
1
1.41
1
1.41
1
−1.41
−3
−1.41
1
The solid curve is the sum of the dashed and dotted waves: at every x, its height is the sum of their heights.
Period.sinx repeats every 2π, and cos2x repeats every π (so also every 2π). Both pieces are back to the start after 2π, so the period of h is 2π.
Zeros. Use the double angle identity cos2x=1−2sin2x (you’ll see it in double angle formulas) to write everything in terms of sinx:
h(x)=2sinx+1−2sin2x=−2sin2x+2sinx+1
This is a quadratic in sinx. Setting it to 0 and using the quadratic formula on 2sin2x−2sinx−1=0:
sinx=42±4+8=21±3
21+3≈1.37 is impossible, since sinx≤1. So sinx=21−3≈−0.366. Sine is negative in quadrants III and IV, and sin−1(0.366)≈0.375, so the zeros in [0,2π] are
x≈π+0.375≈3.52andx≈2π−0.375≈5.91
Check with the table: h(π)=1>0 and h(45π)≈−1.41<0, so there is a zero between 3.14 and 3.93; and h(47π)<0<h(2π) puts the other between 5.50 and 6.28. ✓
Largest and smallest values. The quadratic −2s2+2s+1, with s=sinx, has its vertex at s=21, where it equals −21+1+1=1.5. So the maximum is 1.5, at x=6π and x=65π (where sinx=21). The table missed it because those x-values aren’t multiples of 4π. The smallest value is at s=−1: −2−2+1=−3, at x=23π.
Notice how different the sum looks from either wave: two humps and one deep valley. The minimum, −3, is exactly −2+(−1), because both pieces reach their lowest points together at x=23π. But the maximum is only 1.5, not 2+1=3: where 2sinx peaks, at x=2π, cos2x is at its lowest.
Not distributing the minus sign.(x2−3x)−(2x+5) is x2−5x−5, not x2−5x+5. Always put brackets around the function you’re subtracting.
Using every x that works for either function. The domain of f+g is where both are defined, not where at least one is. In Example 2, x=6 works for f but not for g, so it’s not in the domain of the sum.
Adding the x-values on a graph. Graphical addition adds heights at the same x. The point (2,3) on f and (2,5) on g give (2,8) on f+g, not (4,8).
Treating f − g and g − f as the same. They’re opposites: if (f−g)(3)=4, then (g−f)(3)=−4.
Assuming the period of a sum is the smaller period.2sinx+cos2x does not repeat every π: the sinx part hasn’t come back yet. Look for the first length after which both pieces repeat.
Assuming even + odd is even (or odd). It’s usually neither, as in x2+x. Test with f(−x), or try one number like x=1 and x=−1.
2. (Warm-up) Use the table to complete a table of values for f+g and f−g.
x
−2
−1
0
1
2
f(x)
5
2
1
2
5
g(x)
−3
−1
1
3
5
Solution
Add or subtract down each column:
x
−2
−1
0
1
2
(f+g)(x)
2
1
2
5
10
(f−g)(x)
8
3
0
−1
0
The difference is 0 at x=0 and x=2, exactly where f(x)=g(x).
3. (Warm-up) On the same axes, the graph of f passes through (1,4) and the graph of g passes through (1,−6). Which point is on the graph of y=f(x)+g(x)? Which is on y=f(x)−g(x)?
Solution
Keep x=1 and add or subtract the heights.
f+g: 4+(−6)=−2, so the point is (1,−2).
f−g: 4−(−6)=10, so the point is (1,10).
4. (Core) Let f(x)=x+3 and g(x)=x−21. State the domain of f+g, and evaluate (f+g)(1).
Solution
f needs x≥−3. g needs x=2. The sum needs both:
{x∈R∣x≥−3,x=2}(f+g)(1)=4+1−21=2−1=1
5. (Core) A bakery’s daily revenue from selling n loaves is R(n)=15n dollars, and its daily cost is C(n)=0.02n2+3n+800 dollars.
(a) Find the profit function P(n)=R(n)−C(n).
(b) Find the profit when 200 loaves are sold.
(c) How many loaves give the maximum profit, and what is that profit?
Solution
(a)
P(n)=15n−(0.02n2+3n+800)=−0.02n2+12n−800
(b) P(200)=−0.02(40000)+2400−800=−800+2400−800=800, so the profit is $800.
(c) P is a parabola opening down. Its vertex is at n=−2ab=−2(−0.02)12=300:
P(300)=−0.02(90000)+3600−800=−1800+3600−800=1000
Selling 300 loaves gives the maximum profit, $1000.
6. (Core) Decide whether each function is even, odd, or neither. Show your reasoning.
(a) f(x)=x3+2x
(b) g(x)=x2−cosx
(c) h(x)=x2+sinx
Solution
(a) f(−x)=−x3−2x=−(x3+2x)=−f(x). Odd (odd + odd).
(b) g(−x)=(−x)2−cos(−x)=x2−cosx=g(x). Even (even − even).
(c) h(−x)=x2−sinx, which is neither h(x) nor −h(x). Neither (even + odd). For example, h(2π)=4π2+1≈3.47 but h(−2π)=4π2−1≈1.47.
7. (Core) Let h(x)=sinx+cosx, with x in radians.
(a) Make a table of values at multiples of 4π from 0 to 2π. Give exact values.
(b) State the zeros in [0,2π], the period, and the largest value in your table.
Solution
(a) Use the special values sin4π=cos4π=22:
x
0
4π
2π
43π
π
45π
23π
47π
2π
h(x)
1
2
1
0
−1
−2
−1
0
1
(b) The zeros are x=43π and x=47π, where sinx and cosx are opposites. Both pieces have period 2π, so h has period 2π. The largest value in the table is 2≈1.41 at x=4π.
(In fact this sum is a sinusoid: sinx+cosx=2sin(x+4π), so 2 really is its maximum. Adding two waves with the same period always gives a sinusoid; adding waves with different periods, as in Example 3, usually doesn’t.)
8. (Challenge) Let f(x)=2x+2−x.
(a) Show that f is even.
(b) Make a table of values for x=−2,−1,0,1,2.
(c) Show that f(x)≥2 for every x. (Hint: expand (2x/2−2−x/2)2≥0.)
Solution
(a) f(−x)=2−x+2x=f(x), so f is even. (It’s the sum of 2x and its mirror image 2−x.)
(b)
x
−2
−1
0
1
2
f(x)
4.25
2.5
2
2.5
4.25
(c) A square is never negative, and 2x/2⋅2−x/2=20=1, so
So the minimum value of f is 2, reached at x=0, matching the table.
9. (Challenge)f and g are both increasing for all real x.
(a) Explain why f+g must be increasing.
(b) Give an example showing that f−g does not have to be increasing.
Solution
(a) Take any a<b. Because both functions increase, f(a)<f(b) and g(a)<g(b). Adding these inequalities gives f(a)+g(a)<f(b)+g(b), which says (f+g)(a)<(f+g)(b). So f+g is increasing.
(b) Let f(x)=x and g(x)=2x. Both are increasing, but (f−g)(x)=x−2x=−x is decreasing. (You can’t subtract inequalities the way you can add them.)
Try these independently after the practice questions. Show your setup and explain your reasoning. Use exact answers where possible, and check that your answers fit the question. Homework solutions are not provided on the published site.
State domains in set notation, and use radians for any trig functions.
H3. (Core) Find the domain of each function, then evaluate it where asked.
(a) h(x)=x+x−21. Evaluate h(4) and h(1), and explain why h(−1) and h(2) don’t exist.
(b) k(x)=6−x−x+2. Evaluate k(−2) and k(2).
H4. (Core) Let f(x)=−x+2 and g(x)=x2−1.
(a) Make a table of f(x), g(x) and f(x)+g(x) for x=−2,−1,0,1,2,3.
(b) Without using the equation of f+g, name the points where the graph of f+g meets the graph of f, and the point where it meets the graph of g. Explain how you found them.
(c) Sketch f, g and f+g on the same axes by adding heights.
(d) Find (f+g)(x) algebraically and check it against your table. Does f+g have any zeros? Explain what that says about the heights of f and g.
H5. (Core) A small hockey-stick maker in Saskatchewan uses this hypothetical weekly model, where x is the number of sticks made and sold: revenue R(x)=90x−0.05x2 dollars and cost C(x)=30x+10000 dollars.
(a) Find the profit function P(x)=R(x)−C(x).
(b) Find P(100) and interpret it.
(c) Find the break-even quantities, where profit is zero.
(d) How many sticks give the maximum weekly profit, and what is it?
H6. (Core) A hypothetical model for the monthly average temperature in a Canadian city combines a seasonal wave with a slow warming trend:
S(t)=−12cos(6πt)+7L(t)=0.003t
Here t is the time in months after mid-January, temperatures are in °C, and the cosine uses radians.
(a) Write the combined model T(t)=(S+L)(t).
(b) Evaluate T(0), T(6), T(120) and T(126). What do these four values describe?
(c) Show that T(t+12)−T(t) is the same for every t, and interpret that number. Is T periodic?
(d) Describe the shape of the graph of T in words: what does it oscillate around?
H7. (Challenge) Let f(x)=3x2−2x+5 and g(x)=x2−4x−1. Sam writes:
(f−g)(x)=3x2−2x+5−x2−4x−1=2x2−6x+4=2(x−1)(x−2)
so Sam concludes that f(x)=g(x) when x=1 and x=2.
(a) Show with x=1 that Sam’s formula is wrong, and explain the mistake.
(b) Find the correct (f−g)(x).
(c) Are there any x-values where f(x)=g(x)? Justify your answer.
H8. (Challenge) Let f(x)=x2−3x+2.
(a) The sum (f+g)(x)=4x2+x−7. Find g(x), then find (f−g)(x).
(b) Another function h satisfies (f−h)(x)=−x2+2x+10. Find h(x).
For each part, check your answer by recombining.
H9. (Challenge) Jordan says: “The sum of two even functions is always even, and the sum of two odd functions is always even too, because two negatives make a positive.”
(a) Prove that the first claim is true for any two even functions f and g.
(b) Decide whether the second claim is true. Give a proof or a counterexample.
(c) Suppose f is even, g is odd, and f+g turns out to be even. What must g be? Explain.
H10. (Challenge) Let f(x)=x−a and g(x)=8−2x, where a is a constant.
(a) Find the domain of f+g when a=−1, and evaluate (f+g)(0) for that value of a.
(b) Find every value of a for which the domain of f+g contains exactly one number. What is (f+g) at that number?
(c) For which values of a is the domain of f+g empty?