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

Source: https://practicecalculus.com/rules/sum-and-difference-rule
Updated: 2026-11-03

$$ \frac{d}{dx}\,[f(x) \pm g(x)] = f'(x) \pm g'(x) $$

## 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$

## Key takeaways

- The derivative of a sum is the sum of the derivatives, and the same for differences.
- It works for any number of terms, which is how you differentiate polynomials term by term.
- There is no matching shortcut for products: $(fg)' \ne f'g'$.

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

$$\frac{d}{dx}\,[f(x) + g(x)] = f'(x) + g'(x)$$

$$\frac{d}{dx}\,[f(x) - g(x)] = f'(x) - g'(x)$$

The rule extends to any number of terms. Combined with the [constant multiple rule](/rules/constant-multiple-rule), it says differentiation is **linear**:

$$\frac{d}{dx}\,[a\,f(x) + b\,g(x)] = a\,f'(x) + b\,g'(x)$$

## Examples

**Example 1: a polynomial.** Use the [power rule](/rules/power-rule) on each term and the [constant rule](/rules/constant-rule) on the constant:

$$\frac{d}{dx}\left(3x^2 - 5x + 8\right) = 6x - 5 + 0 = 6x - 5$$

**Example 2: mixed function types.** Each term uses its own rule:

$$\frac{d}{dx}\left(x^4 + \sin x - e^x\right) = 4x^3 + \cos x - e^x$$

**Example 3: a difference with a logarithm.**

$$\frac{d}{dx}\left(2\ln x - \sqrt{x}\right) = \frac{2}{x} - \frac{1}{2\sqrt{x}}$$

**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:

$$\frac{x^2 + 1}{x} = x + x^{-1} \quad\Rightarrow\quad \frac{d}{dx}\left(x + x^{-1}\right) = 1 - x^{-2} = 1 - \frac{1}{x^2}$$

This avoids the [quotient rule](/rules/quotient-rule) entirely.

```graph
title: 'Graph of y = x³ − 3x and its derivative y = 3x² − 3'
caption: 'Differentiating term by term gives $3x^2 - 3$. It is zero at $x = \pm 1$, exactly where $x^3 - 3x$ has its turning points.'
x: [-2.5, 2.5]
y: [-4, 6]
functions:
  - expr: x^3 - 3x
    label: y = x³ − 3x
  - expr: 3x^2 - 3
    label: y = 3x² − 3 (derivative)
    dashed: true
points:
  - [-1, 2, '(−1, 2)']
  - [1, -2, '(1, −2)']
```

## Why the sum rule works

In the [limit definition of the derivative](/blog/limit-definition-of-the-derivative), regroup the difference quotient into two difference quotients:

$$\frac{[f(x+h) + g(x+h)] - [f(x) + g(x)]}{h} = \frac{f(x+h) - f(x)}{h} + \frac{g(x+h) - g(x)}{h}$$

As $h \to 0$, the sum law for limits (see the [limit laws](/rules/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](/rules/product-rule) | $2x\sin x + x^2\cos x$ |
| $\frac{x^2}{\sin x}$ | [Quotient rule](/rules/quotient-rule) | $\frac{2x\sin x - x^2\cos x}{\sin^2 x}$ |
| $\sin(x^2)$ | [Chain rule](/rules/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

1. **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.
2. **Extending the rule to products.** $(fg)' \ne f'g'$. Use the product rule.
3. **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](/blog/power-rule).

## Frequently asked questions

### What is the sum rule for derivatives?

The sum rule says $\frac{d}{dx}[f(x) + g(x)] = f'(x) + g'(x)$. You differentiate each term separately and add the results.

### Does the sum rule work for more than two terms?

Yes. Apply it repeatedly and every term is differentiated on its own. That is why a polynomial can be differentiated term by term.

### Is the derivative of a product the product of the derivatives?

No. The sum rule has no product version. The derivative of $f(x)g(x)$ is $f'g + fg'$ by the product rule.

### Can I split a fraction to use the sum rule?

Yes, when the denominator is a single term. For example $\frac{x^3 + 2}{x} = x^2 + 2x^{-1}$, which differentiates to $2x - 2x^{-2}$.
