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+sin2x is the smallest length after which both pieces repeat: sinx repeats every 2π and sin2x 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)=sinx+sin2x, with x in radians. Make a table of values for 0≤x≤2π, sketch the graph, and find the period and the zeros.
Solution. Add the outputs of sinx and sin2x at multiples of 4π (decimals rounded to 2 places):
x
0
4π
2π
43π
π
45π
23π
47π
2π
sinx
0
0.71
1
0.71
0
−0.71
−1
−0.71
0
sin2x
0
1
0
−1
0
1
0
−1
0
h(x)
0
1.71
1
−0.29
0
0.29
−1
−1.71
0
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 sin2x 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 sin2x=2sinxcosx (you’ll see it in double angle formulas):
sinx+2sinxcosx=sinx(1+2cosx)=0
So sinx=0, giving x=0,π,2π, or cosx=−21, giving x=32π,34π. The zeros in [0,2π] are 0, 32π, π, 34π and 2π.
Notice how different the sum looks from either wave. Its maximum, about 1.76 near x≈0.94, is less than 1+1=2, because sinx and sin2x never reach their peaks at the same x.
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.sinx+sin2x 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.)