Difference rule – Derivation, Explanation, and Example

The difference rule is an essential derivative rule that you’ll often use in finding the derivatives of different functions – from simpler functions to more complex ones.

The difference rule is one of the most used derivative rules since we use this to find the derivatives between terms that are being subtracted from each other.

Given how often we’ll be using this rule throughout the different differential calculus topics, we must understand what makes this rule special, learn how we can derive the formula for the difference rule, and apply other derivative rules along with the difference rule.

In this article, we’ll be using past topics discussed, so make sure to take a refresh your knowledge and make the most out of our discussion.

Let’s begin by understanding how we could derive this helpful rule and then eventually learn how to apply the difference rule in our given examples.

What is the difference rule?                

The difference rule allows us to differentiate expressions that can be expressed as the difference between simpler functions. One of the most helpful techniques in differential calculus is applying the difference rule on a wide range of functions. The difference rule helps us determine the derivative of expressions of the form $\boldsymbol{f(x) = g(x) – h(x)}$ such as the following:

  • $6x^2 – 7x – 1$
  • $-2x^3 – \sqrt{x}$
  • $\sqrt[4]{x} – \sqrt{x} – 5x$

This means that whenever you see a polynomial expression with subtraction in the middle, you’ll be applying the difference rule to find its derivative. According to the derivative rule, when given an expression of the form, $f(x) – g(x)$, we can find its derivative by finding the difference between the derivatives of $\boldsymbol{f(x)}$ and $\boldsymbol{g(x)}$.

\begin{aligned}\dfrac{d}{dx} [f(x) – g(x)] = \dfrac{d}{dx} [f(x)] – \dfrac{d}{dx} [g(x)]\\&= f’(x) – g’(x)\end{aligned}

We’ll show how this rule was derived to make you appreciate how quick and easy it is for us to differentiate polynomials through this rule.

How to derive the derivative difference rule formula?

Let’s say we have $f(x)$ and $g(x)$, we can find their respective derivatives using the formal definition of the derivative. Hence, we have the following expressions for $f’(x)$ and $g’(x)$.

\begin{aligned}\boldsymbol{f’(x)}\end{aligned}

\begin{aligned}f'(x) &= \lim_{h \rightarrow 0} \dfrac{f(x + h) -f(x)}{h} \end{aligned}

\begin{aligned}\boldsymbol{g’(x)}\end{aligned}

\begin{aligned}g'(x) &= \lim_{h \rightarrow 0} \dfrac{g(x + h) -g(x)}{h} \end{aligned}

Now, what happens if we take the derivative of $f(x) – g(x)$? We’ll use the definition of a derivative and have the expression shown below.

\begin{aligned} \dfrac{d}{dx}[f(x) -g(x) ]&= \lim_{h \rightarrow 0} \dfrac{ [f(x + h) – g(x + h) ]- [f(x) – g(x)]}{h} \end{aligned}

We rearrange the terms and apply the limit laws to have the following expression for $\dfrac{d}{dx} [f(x)- g(x)]$.

  • Rearrange the expressions $f(x + h)$ and $f(x)$ as well as $g(x+h)$ and $g(x)$.
  • Apply the subtraction law, $\lim_{x\rightarrow a} [f(x) –g(x)] = \lim_{x\rightarrow a} f(x) – \lim_{x\rightarrow a} g(x)$.

\begin{aligned} \dfrac{d}{dx}[f(x) -g(x) ]&= \lim_{h \rightarrow 0} \dfrac{ [f(x + h) – f(x)]- [ g(x + h) – g(x)]}{h}\\&=\lim_{h \rightarrow 0} \left[ \dfrac{f(x + h) – f(x)}{h}- \dfrac{g(x + h) – g(x)}{h} \right ] \\&=\lim_{h \rightarrow 0} \dfrac{f(x + h) – f(x)}{h}- \lim_{h \rightarrow 0}  \dfrac{g(x + h) – g(x)}{h} \end{aligned}

Notice something about the expression? Each grouped limits represent $f’(x)$ and $g’(x)$.

\begin{aligned} \dfrac{d}{dx}[f(x) -g(x) ]&= \dfrac{d}{dx} [f(x)]- \dfrac{d}{dx}[g(x)]\\&= f'(x) – g'(x)\end{aligned}

This shows that the derivative of $f(x) – g(x)$ is equal to $f’(x) – g’(x)$.

How to use the difference rule?                

Now that we’ve established the difference rule, $\dfrac{d}{dx} [f(x) – g(x)] = f’(x) – g’(x)$, let’s see how we can apply this with actual functions. Before we do so, let’s recall some fundamental derivative rules that we’ve learned in the past and are often used along with the difference rule:

Constant Rule

\begin{aligned}\dfrac{d}{dx} c = 0\end{aligned}

Constant Multiple Rule

\begin{aligned}\dfrac{d}{dx} [c \cdot f(x)] = c\cdot \dfrac{d}{dx} [f(x)]\end{aligned}

Power Rule

\begin{aligned}\dfrac{d}{dx} x^{n} = nx^{n-1}\end{aligned}

For example, if we want to find the derivative of $f(x) = 2x^3 – 4x^2$, we can use the difference rule along with these other derivative rules to find the expression for $f’(x)$.

  • Take the derivative of $2x^3$ and $4x^2$ first.
  • Use the constant multiple and power rules to find the derivatives of these terms.

\begin{aligned} \dfrac{d}{dx} f(x)&= \dfrac{d}{dx} (2x^3 – 4x^2)\\&= \dfrac{d}{dx} (2x^3) – \dfrac{d}{dx} (4x^2),\phantom{x}\color{green}{\text{Difference Rule}}\\&= \left(2 \cdot \dfrac{d}{dx}x^3 \right )- \left(4 \cdot \dfrac{d}{dx}x^2 \right ),\phantom{x}\color{green}{\text{Constant Multiple Rule}}\\&= 2(3)x^{2 -1}- 4(2)x^{3-1},\phantom{x}\color{green}{\text{Power Rule}}\\&= 6x^2 – 8x\end{aligned}

Hence, through the amazing derivative rules, we can quickly differentiate $f(x) = 2x^3 – 4x^2$ and have $f’(x) = 6x^2 – 8x$. Are you ready to try out more examples? We’ve prepared more exercises for you to work on!

Example 1

Find the derivative of $h(x) = 12x^3 – \pi$.

Solution

Since $h(x)$ is the result of $\pi$ being subtracted from $12x^3$, so we can apply the difference rule. This means that $h’(x)$ is simply equal to finding the derivative of $12^3$ and $\pi$.

 \begin{aligned} \dfrac{d}{dx} h(x)&= \dfrac{d}{dx} (12x^3 – \pi)\\&= \dfrac{d}{dx} (12x^3)- \dfrac{d}{dx} (\pi) \end{aligned}

We can use the constant multiple, power, and constant rules to find the derivative of $h(x)$.

\begin{aligned} h'(x) &=\dfrac{d}{dx} (12x^3)- \dfrac{d}{dx} (\pi)\\&= 12 \cdot \dfrac{d}{dx}(x^3) – \dfrac{d}{dx} \pi,\phantom{x} \color{green}\text{Constant Multiple Rule}\\&= 12 \cdot \dfrac{d}{dx}3(x^{2-1}) – \dfrac{d}{dx} \pi,\phantom{x} \color{green}\text{Power Rule} \\&= 36(x^{2}) – 0,\phantom{x} \color{green}\text{Constant Rule}\\&= 36x^2 \end{aligned}

This shows that that the derivative of $h(x)$ is equal to $36x^2$.

Example 2

Find the derivative of $f(x) = 4x^8 – 2x^3 – 3x^2 – 1$.

Solution

Since the function, $f(x)$, is a polynomial with multiple subtraction operations in between, we can apply the difference rule by taking the derivative of each term to find the derivative of $f(x)$.

\begin{aligned} \dfrac{d}{dx} f(x)&= \dfrac{d}{dx} (4x^8-2x^3-3x^2-1)\\&= \dfrac{d}{dx} (4x^8) – \dfrac{d}{dx} (2x^3)- \dfrac{d}{dx} (3x^2)- \dfrac{d}{dx} (1) \end{aligned}

We can use the constant multiple and power rules to derive the first four expressions. We can simplify this further by simplifying $\dfrac{d}{dx} 1$ using the constant rule.

\begin{aligned}\boldsymbol{\dfrac{d}{dx} (4x^8)}\end{aligned}

\begin{aligned}\dfrac{d}{dx} (4x^8) &= 4 \cdot \dfrac{d}{dx}(x^8),\phantom{x}\color{green}{\text{Constant Multiple Rule}}\\&= 4(8)x^{8 -1},\phantom{x}\color{green}{\text{Power Rule}}\\&= 32x^7\end{aligned}

\begin{aligned}\boldsymbol{\dfrac{d}{dx} (2x^3)}\end{aligned}

\begin{aligned}\dfrac{d}{dx} (2x^3) &= 2 \cdot \dfrac{d}{dx}(x^3),\phantom{x}\color{green}{\text{Constant Multiple Rule}}\\&= 2(3)x^{3 -1},\phantom{x}\color{green}{\text{Power Rule}}\\&= 6x^2\end{aligned}

\begin{aligned}\boldsymbol{\dfrac{d}{dx} (3x^2)}\end{aligned}

\begin{aligned}\dfrac{d}{dx} (3x^2) &= 3 \cdot \dfrac{d}{dx}(x^2),\phantom{x}\color{green}{\text{Constant Multiple Rule}}\\&= 3(2)x^{2 -1},\phantom{x}\color{green}{\text{Power Rule}}\\&= 6x\end{aligned}

\begin{aligned}\boldsymbol{\dfrac{d}{dx} (1)}\end{aligned}

\begin{aligned}\dfrac{d}{dx} (1) &= 0,\phantom{x}\color{green}{\text{Constant Rule}}\end{aligned}

Now that we have the derivative of the respective terms, we have can now rewrite the derivative of $f(x)$ as shown below.

\begin{aligned}\dfrac{d}{dx} (4x^8) – \dfrac{d}{dx} (2x^3)- \dfrac{d}{dx} (3x^2)- \dfrac{d}{dx} (1) &= 32x^7 – 6x^2 – 6x \end{aligned}

This means that $f’(x)$ is equal to $32x^7-6x^2-6x$.

Example 3

Find the derivative of $g(x) = \sqrt[4]{x} – \dfrac{1}{x^5}$.

Solution

We can find the derivative of $g(x) = \sqrt[4]{x} – \dfrac{1}{x^5}$ by first rewriting the terms as powers of $x$.

  • Recall that $\sqrt[m]{x} = x^{\frac{1}{m}}$, so $\sqrt[4]{x} = x^{\frac{1}{4}}$.
  • We can also rewrite $\dfrac{1}{x^5}$ as $x^{-5}$.

Once we’ve rewritten $g(x)$ as $g(x) = x^{\frac{1}{4}} – x^{-5}$, we can use the difference rule and eventually find the derivative of each of the term using the power rule.

\begin{aligned} \dfrac{d}{dx} g(x)&= \dfrac{d}{dx} \left(\sqrt[4]{x} – \dfrac{1}{x^5}\right)\\&= \dfrac{d}{dx} \left(x^{\frac{1}{4}} – x^{-5}\right)\\&= \dfrac{d}{dx} (x^{\frac{1}{4}} ) – \dfrac{d}{dx} (x^{-5}),\phantom{x}\color{green}{\text{Difference Rule}}\\&= \dfrac{1}{4}x^{\frac{1}{4} -1}- (-5)x^{-5-1},\phantom{x}\color{green}{\text{Power Rule}}\\&= \dfrac{1}{4}x^{-\frac{3}{4}} + 5x^{-6}\end{aligned}

Hence, we have $g’(x) = \dfrac{1}{4}x^{-\frac{3}{4}} + 5x^{-6}$. We can also rewrite this expression as $g’(x) = \dfrac{1}{4x^{\frac{3}{4}}} + \dfrac{5}{x^6}$.

Practice Questions

1. Find the derivative of $f(x) = -24x^2 – \pi x- 12$.
2. Find the derivative of $f(x) = 6x^9 – 3x^4 – 6x^3 – 5$.
3. Find the derivative of $f(x) = -2x^{12} – 6x^8 – 5x^4 – 12$.
4. Find the derivative of $g(x) = 32x^4 – \dfrac{1}{x}$.
5. Find the derivative of $g(x) = \sqrt[6]{x} – \dfrac{1}{x^8}$.

Answer Key

1. $-48x – \pi$
2. $54x^8 -12x^3-18x^2$
3. $-24x^{11}-48x^{7} -20x^3$
4. $128x^3 +\dfrac{1}{x^2}$
5. $\dfrac{1}{6} x^{-\frac{5}{6}} + 8x^{-9} =\dfrac{1}{6^{\frac{5}{6}}}+ \dfrac{8}{x^9} = \dfrac{x^9 + 48x^{\frac{5}{6}}}{6x^{\frac{59}{6}}}$

Rate this page
Previous Lesson

Sum Rule – Explanation and Examples

Next Lesson

Product rule – Derivation, Explanation, and Example

We Create New Version

Coming Soon...