The Sum and Difference Rule
You're on a train doing a steady 30 metres per second, and you
stroll towards the front of the carriage at 1.5 metres per
second. How fast are you moving over the ground? You don't reach for anything clever — you
just add: 30 + 1.5 = 31.5 m/s. The train contributes its rate,
your legs contribute theirs, and the rates stack.
The same instinct works everywhere rates live. If your savings account grows by
£40 a month and your side business brings in
£120 a month, your total wealth grows at
£160 a month — each income stream changes at its own rate, and
the total changes at the sum of them. Fill a bath with the tap adding
8 litres a minute while the plughole drains
3: the water level changes at 8 - 3 = 5
litres a minute.
A derivative is a rate of change — so this everyday instinct is secretly a theorem
of calculus. Differentiation distributes over + and
-: the derivative of a sum is the sum of the
derivatives, the derivative of a difference is the difference. This page makes that precise,
shows exactly why it's true, and — just as important — marks where the shortcut
stops working.
The rule
In symbols, the rule says you may differentiate term by term: pull an
expression apart at its + and - signs,
differentiate each piece with whatever rule fits it, and reassemble with the same signs.
-
If f and g are both
differentiable at x, then so are their sum and difference,
and
\frac{d}{dx}\big[f(x) + g(x)\big] = f'(x) + g'(x),
\frac{d}{dx}\big[f(x) - g(x)\big] = f'(x) - g'(x).
-
Applied repeatedly, the rule covers any finite string of terms:
\frac{d}{dx}\big[f + g - h\big] = f' + g' - h', and so on for
as many terms as you like.
Notice what the rule does not require: f and
g don't have to be related to each other in any way. One can be a
polynomial and the other a sine wave; each term minds its own business. You never have to
wrestle a whole expression at once — break it at the signs, handle the pieces, and the signs
carry straight through to the answer.
Why it works: slopes just add
The derivative measures a slope — a rate of change. If at some instant
f is climbing at 3 units per step and
g is climbing at 2, then their sum
f + g climbs at 3 + 2 = 5. Stacking
one curve on top of the other adds their heights at every point — and a small step
to the right raises each height by its own slope's worth, so the stacked height rises by the
two slopes' worth combined. Adding heights everywhere means adding slopes everywhere.
See it live. The faint dashed curves below are f(x) = \sin(x) and
the straight line g(x) = cx; the bold curve is their sum. Drag
the slider to tilt the line. At c = 0 the bold sum is just the
sine wave; make c positive and every part of the sum tilts
upward by exactly that much — where the sine was momentarily flat, the sum now has slope
c. Push c negative and the whole wave
leans downhill instead. The line donates its slope to the sum at every single point:
In symbols, what you're watching is
\frac{d}{dx}\big[\sin(x) + cx\big] = \cos(x) + c — the sine's own
slope, shifted up or down by the constant c.
Once, honestly: the proof in one line
"Slopes add" is a picture; here is the same fact from the limit definition of the
derivative, and it's almost embarrassingly short. Write the difference quotient for the sum
f + g, and watch it split at the plus sign:
\frac{\big[f(x+h) + g(x+h)\big] - \big[f(x) + g(x)\big]}{h}
= \frac{f(x+h) - f(x)}{h} + \frac{g(x+h) - g(x)}{h}
All we did was regroup the numerator — collect the f-parts
together and the g-parts together — and share the
h between them. The quotient for the sum is exactly the
quotient for f plus the quotient for g,
for every step size h. Now let h \to 0:
the limit of a sum is the sum of the limits, so the left side becomes
(f+g)'(x) while the right becomes
f'(x) + g'(x). Done.
Concretely, for f(x) + g(x) = x^2 + x^3 the split looks like
this:
\frac{\big[(x+h)^2 + (x+h)^3\big] - \big[x^2 + x^3\big]}{h}
= \underbrace{\frac{(x+h)^2 - x^2}{h}}_{\to\ 2x}
+ \underbrace{\frac{(x+h)^3 - x^3}{h}}_{\to\ 3x^2}
Each brace is a difference quotient you have already tamed on its own — the square's tends
to 2x, the cube's to 3x^2 — so
\frac{d}{dx}\big[x^2 + x^3\big] = 2x + 3x^2.
That's the whole justification, and you only ever need to see it once. From here on,
"differentiate term by term" is a licence you hold, not a leap of faith — every time you use
it, this one-line regrouping is silently doing the work.
A worked example — and its picture
Suppose h(x) = x^2 + 3x. This is a sum of two terms, so we handle
each on its own. Using the
power rule on
x^2 and the
constant multiple rule
on 3x:
\frac{d}{dx}\big[x^2\big] = 2x, \qquad \frac{d}{dx}\big[3x\big] = 3
Now just add the two results back together:
h'(x) = \frac{d}{dx}\big[x^2 + 3x\big] = 2x + 3
Here is that example drawn out — h(x) = x^2 + 3x (solid) beside
its derivative h'(x) = 2x + 3 (dashed). The dashed line crosses
zero at x = -1.5, exactly where the solid curve bottoms out and
stops falling — the derivative doesn't just come from the curve, it narrates it:
negative while the parabola descends, zero at the turn, positive on the climb back up.
A difference is no different. For x^2 - 3x the second term enters
with a minus sign and leaves with one: 2x - 3. Same two
derivatives, same reassembly — the sign is just along for the ride.
Minding the minus signs
Longer expressions bring more signs, and signs are where marks are lost. The safest habit:
read each minus sign as glued to the term that follows it, so the
expression is a sum of signed terms. Take
p(x) = x^3 - 5x^2 + 4x - 7
and hear it as "x^3, plus (-5x^2),
plus 4x, plus (-7)". Now differentiate
the four signed terms one at a time:
\frac{d}{dx}\big[x^3\big] = 3x^2, \quad
\frac{d}{dx}\big[-5x^2\big] = -10x, \quad
\frac{d}{dx}\big[4x\big] = 4, \quad
\frac{d}{dx}\big[-7\big] = 0
The -5x^2 keeps its minus through the whole computation — the
constant multiple rule with the constant -5 — and the lone
-7 is a constant, so it vanishes entirely. Reassemble:
p'(x) = 3x^2 - 10x + 4.
Note the ending: three terms came out of four, because the constant's
derivative is 0 and simply drops off. Shifting a whole curve up
or down by 7 changes none of its slopes, so the
-7 was never going to leave a fingerprint on the derivative.
A physical check: two cars, one total
Rates adding isn't a formal trick — nature does it constantly. Send two delivery cars out
from the depot along the same road. Car A is accelerating from rest, so its distance after
t seconds is A(t) = t^2; car B cruises
at a steady 3 m/s, so B(t) = 3t. The
total distance the fleet has covered is the sum,
A(t) + B(t) = t^2 + 3t — the very function from the worked
example above.
Now ask how fast that total is growing. Physically it's obvious: each second, car A adds its
current speed's worth of metres and car B adds its own, so the total grows at
speed of A plus speed of B. Calculus says the same thing term by term:
\frac{d}{dt}\big[t^2 + 3t\big] = \underbrace{2t}_{\text{A's speed}} + \underbrace{3}_{\text{B's speed}}
At t = 4 seconds, car A is doing 8 m/s
and car B its usual 3, so the fleet's total distance is growing
at 11 m/s. The sum rule is the mathematical shadow of a fact you
already believed: independent contributions to a total contribute their rates
independently too.
Three traps, in rising order of danger:
-
The rule is a privilege of + and
- — it does NOT extend to \times and
\div. It is very tempting to guess
\frac{d}{dx}\big[f \cdot g\big] = f' \cdot g'. One example
demolishes it: take f(x) = g(x) = x. Then
f \cdot g = x^2, whose derivative is
2x — but f' \cdot g' = 1 \cdot 1 = 1.
Not even close. Products (and quotients) need rules of their own, and the true product
rule has a genuine surprise in it — that story is coming.
-
Why does the sum split but the product doesn't? Look back at the
one-line proof: the difference quotient of a sum regroups into two difference
quotients, because addition lets you shuffle terms freely. Try the same with
f(x+h)\,g(x+h) - f(x)\,g(x) and it refuses to come apart —
the two functions are entangled inside the product. Term-by-term is a theorem you proved,
not a law of nature about every operation.
-
Keep each minus sign attached to its term. Differentiating
x^3 - 5x^2, treat the second term as
-5x^2 \to -10x in one move. Students who differentiate
"5x^2 \to 10x" and plan to restore the sign later routinely
don't — writing 3x^2 + 10x and losing the mark. The sign is
part of the term, not punctuation between terms.
The sum rule is your first meeting with one of the biggest ideas in mathematics:
linearity. Together with the constant multiple rule it says the derivative
is a linear operator — it respects addition and scaling — and linear things are
everywhere:
-
Waves. Drop two pebbles in a pond and the ripples pass straight through
each other; the surface height is simply the sum of the two ripple patterns. Physicists
call this superposition, and it works because the wave equation is built from
derivatives — so it treats a sum of waves as the sum of two separate problems. Noise-cancelling
headphones exploit exactly this: add a second wave that's the negative of the noise, and
the sum — and every rate of change in it — cancels to silence.
-
Forces. Gravity pulls a bridge down, wind pushes it sideways, traffic
shakes it. Engineers analyse each load separately and add the results — legitimate only
because the underlying equations differentiate term by term.
-
Money. A portfolio's value is the sum of its holdings, so its growth rate
is the sum of each holding's growth rate. Every fund report that breaks performance down
"by asset" is quietly invoking the sum rule.
"Break it into pieces, solve the pieces, add" is arguably science's favourite strategy — and
it works precisely where the mathematics is linear. When you later meet operations that
aren't linear (squaring, multiplying functions, most of real life), you'll know to
put the shortcut down.
It chains across many terms
The rule isn't limited to two terms — apply it repeatedly and a long sum comes apart into as
many pieces as you like, each differentiated independently while the
+ and - signs carry straight through:
\frac{d}{dx}\big[f + g - h\big] = f' + g' - h'
This is the engine behind differentiating
any polynomial:
a polynomial is nothing but powers of x chained together with
+ and -, so the sum rule reduces it to
power-rule snacks. You'll assemble that full recipe next. First, see Sal work through the
basic rules: