Sum and Difference Rule for Derivatives: Formula and Examples
The sum and difference rule: differentiate a sum or difference one term at a time. The formula, worked examples, a proof and where students go wrong.
Derivative rules Updated 2 min read
At a glance
- Applies to
- Any sum or difference of differentiable functions, with any number of terms
- In words
- Differentiate term by term and keep the plus and minus signs
- Combined with
- The constant multiple rule, giving (af + bg)' = af' + bg'
- Does not apply to
- Products and quotients, which need the product and quotient rules
- Integral version
- \int [f(x) \pm g(x)]\,dx = \int f(x)\,dx \pm \int g(x)\,dx
On this page
The sum and difference rule says that you can differentiate a sum or difference one term at a time. The derivative of f + g is f' + g', and the derivative of f - g is f' - g'. It is the rule that makes polynomials easy.
The sum and difference rule formula
If f and g are differentiable, then
The rule extends to any number of terms. Combined with the constant multiple rule, it says differentiation is linear:
Examples
Example 1: a polynomial. Use the power rule on each term and the constant rule on the constant:
Example 2: mixed function types. Each term uses its own rule:
Example 3: a difference with a logarithm.
Example 4: split a fraction first. When the denominator is a single term, divide it into each term of the numerator, then use the sum rule:
This avoids the quotient rule entirely.
Why the sum rule works
In the limit definition of the derivative, regroup the difference quotient into two difference quotients:
As h \to 0, the sum law for limits (see the limit laws) turns the right side into f'(x) + g'(x). The difference rule is the same argument with a minus sign.
What the sum rule does not cover
The sum rule is so natural that students sometimes assume products and quotients behave the same way. They do not:
| Expression | Correct rule | Correct derivative |
|---|---|---|
| x^2 + \sin x | Sum rule | 2x + \cos x |
| x^2 \sin x | Product rule | 2x\sin x + x^2\cos x |
| \frac{x^2}{\sin x} | Quotient rule | \frac{2x\sin x - x^2\cos x}{\sin^2 x} |
| \sin(x^2) | Chain rule | 2x\cos(x^2) |
Check that x^2 \sin x is not 2x\cos x: for example at x = \frac{\pi}{2} the correct derivative is \pi, while 2x\cos x gives 0.
Common mistakes
- Losing a minus sign. In \frac{d}{dx}(x^3 - \cos x), the derivative of \cos x is -\sin x, so the answer is 3x^2 + \sin x. Keep track of both signs.
- Extending the rule to products. (fg)' \ne f'g'. Use the product rule.
- Splitting a fraction over a sum in the denominator. \frac{1}{x + 1} \ne \frac{1}{x} + 1. You can only split when the denominator is a single term.
For a complete set of polynomial and power-rule examples, read the full guide to the power rule.
Practice it now
Sums and constants
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson