Skip to main content

Subsection 2.6.1 Using the Arithmetic of Derivatives – Examples

In this section we illustrate the computation of derivatives using the arithmetic of derivatives — Theorems 2.4.22.4.3 and 2.4.5. To make it clear which rules we are using during the examples we will note which theorem we are using:

\(\bullet \lin\) to stand for “linearity” \(\diff{}{x}\{\alpha\,f(x)+\beta\,g(x)\} = \alpha\,f'(x)+\beta\,g'(x)\) Theorem 2.4.2
\(\bullet \text{PR}\) to stand for “product rule” \(\diff{}{x}\{f(x)\,g(x)\}=f'(x)\,g(x)+f(x)\,g'(x)\) Theorem 2.4.3
\(\bullet \quot\) to stand for “quotient rule” \(\diff{}{x}\Big\{\frac{f(x)}{g(x)}\Big\}= \frac{f'(x)\,g(x)-f(x)\,g'(x)}{g(x)^2}\) Theorem 2.4.5

We'll start with a really easy example.

\begin{align*} \diff{}{x} \{ 4x + 7 \} &= 4 \cdot \diff{}{x} \{ x \} + 7 \cdot \diff{}{x} \{ 1 \} & \text{LIN}\\ &= 4 \cdot 1 + 7 \cdot 0 = 4 \end{align*}

where we have used LIN with \(f(x)=x\text{,}\) \(g(x)=1\text{,}\) \(\alpha=4\text{,}\) \(\beta=7\text{.}\)

Continuing on from the previous example, we can use the product rule and the previous result to compute

\begin{align*} \diff{}{x} \big\{ x ( 4x + 7) \big\} &= x \cdot \diff{}{x} \{ 4x + 7 \} + (4x+7) \diff{}{x} \{ x \} & \text{PR}\\ &= x \cdot 4 + (4x+7) \cdot 1\\ &= 8x+7 \end{align*}

where we have used the product rule PR with \(f(x) =x\) and \(g(x)=4x+7\text{.}\)

In the same vein as the previous example, we can use the quotient rule to compute

\begin{align*} \diff{}{x} \left\{ \frac{x}{4x + 7} \right \} &= \frac{ (4x+7) \cdot \diff{}{x} \{x\} - x \cdot \diff{}{x} \{ 4x + 7 \} }{(4x+7)^2} & \text{QR}\\ &= \frac{ (4x+7) \cdot 1 - x \cdot 4 }{(4x+7)^2}\\ &= \frac{7}{(4x+7)^2} \end{align*}

where we have used the quotient rule QR with \(f(x) =x\) and \(g(x)=4x+7\text{.}\)

Now for a messier example.

Differentiate

\begin{align*} f(x)&=\frac{x}{2x+\frac{1}{3x+1}} \end{align*}

This problem looks nasty. But it isn't so hard if we just build it up a bit at a time.

  • First, \(f(x)\) is the ratio of
    \begin{gather*} f_1(x)=x\qquad\text{and}\qquad f_2(x)=2x+\frac{1}{3x+1} \end{gather*}
    If we can find the derivatives of \(f_1(x)\) and \(f_2(x)\text{,}\) we will be able to get the derivative of \(f(x)\) just by applying the quotient rule. The derivative, \(f'_1(x)=1\text{,}\) of \(f_1(x)\) is easy, so let's work on \(f_2(x)\text{.}\)
  • The function \(f_2(x)\) is the linear combination
    \begin{gather*} f_2(x)=2f_3(x)+f_4(x)\qquad\text{with}\qquad f_3(x)=x \quad\text{and}\quad f_4(x)= \frac{1}{3x+1} \end{gather*}
    If we can find the derivatives of \(f_3(x)\) and \(f_4(x)\text{,}\) we will be able to get the derivative of \(f_2(x)\) just by applying linearity (Theorem 2.4.2). The derivative, \(f'_3(x)=1\text{,}\) of \(f_3(x)\) is easy. So let's work of \(f_4(x)\text{.}\)
  • The function \(f_4(x)\) is the ratio
    \begin{equation*} f_4(x)=\frac{1}{f_5(x)}\qquad\text{with}\qquad f_5(x)=3x+1 \end{equation*}
    If we can find the derivative of \(f_5(x)\text{,}\) we will be able to get the derivative of \(f_4(x)\) just by applying the special case the quotient rule (Corollary 2.4.6). The derivative of \(f_5(x)\) is easy.
  • So we have completed breaking down \(f(x)\) into easy pieces. It is now just a matter of reversing the break down steps, putting everything back together, starting with the easy pieces and working up to \(f(x)\text{.}\) Here goes.
    \begin{align*} f_5(x)\amp=3x+1 \\ \amp\amp\hskip-1.3in \text{ so } \diff{}{x} f_5(x) \amp= 3\diff{}{x} x +\diff{}{x} 1 =3\cdot 1+0 = 3 & \text{LIN}\\ f_4(x)\amp=\frac{1}{f_5(x)}\\ \amp\amp\hskip-1.3in \text{ so } \diff{}{x} f_4(x)\amp=-\frac{f'_5(x)}{f_5(x)^2}=-\frac{3}{(3x+1)^2} & \text{QR}\\ f_2(x)\amp=2f_3(x)+f_4(x) \\ \amp\amp\hskip-1.3in \text{ so }\diff{}{x} f_2(x) \amp= 2f'_3(x)+ f'_4(x)=2-\frac{3}{(3x+1)^2} & \text{LIN}\\ f(x)\amp=\frac{f_1(x)}{f_2(x)}\\ \amp\amp\hskip-1.3in \text{ so }\diff{}{x} f(x)\amp=\frac{f'_1(x)f_2(x)-f_1(x)f'_2(x)}{f_2(x)^2} & \text{QR}\\ \amp\amp\amp =\frac{1\big[2x+\frac{1}{3x+1}\big]-x\big[2-\frac{3}{(3x+1)^2}\big]} {\big[2x+\frac{1}{3x+1}\big]^2} \end{align*}
    Oof!
  • We now have an answer. But we really should clean it up, not only to make it easier to read, but also because invariably such computations are just small steps inside much larger computations. Any future computations involving this expression will be a lot easier and less error prone if we clean it up now. Cancelling the \(2x\) and the \(-2x\) in
    \begin{align*} 1\big[2x+\frac{1}{3x\!+\!1}\big] -x\big[2-\frac{3}{(3x\!+\!1)^2}\big] &=2x+\frac{1}{3x\!+\!1} -2x+\frac{3x}{(3x\!+\!1)^2}\\ &=\frac{1}{3x\!+\!1}+\frac{3x}{(3x\!+\!1)^2} \end{align*}
    and multiplying both the numerator and denominator by \((3x+1)^2\) gives
    \begin{align*} f'(x)&=\frac{\frac{1}{3x+1}+\frac{3x}{(3x+1)^2}} {\big[2x+\frac{1}{3x+1}\big]^2} \ \frac{(3x+1)^2}{(3x+1)^2}\\ &=\frac{(3x+1)+3x}{\big[2x(3x+1)+1\big]^2}\\ &=\frac{6x+1}{[6x^2+2x+1]^2}. \end{align*}

While the linearity theorem (Theorem 2.4.2) is stated for a linear combination of two functions, it is not difficult to extend it to linear combinations of three or more functions as the following example shows.

We'll start by generalising linearity to three functions.

\begin{align*} \diff{}{x}\big\{a F(x)+ b G(x)+ c H(x)\big\} &=\diff{}{x}\big\{\ a \cdot [F(x)]\ +\ 1\cdot[b G(x)+c H(x)]\ \big\}\\ &=a F'(x)+\diff{}{x}\{b G(x)+c H(x)\}\\ &\qquad\text{by LIN with $\alpha=a, f(x)=F(x), \beta=1$,}\\ &\qquad\text{and } g(x)=b G(x)+c H(x)\\ &=a F'(x)+b G'(x)+c H'(x)\\ &\qquad\text{by LIN with } \alpha=b, f(x)=G(x), \beta=c,\\ &\qquad\text{and } g(x)=H(x) \end{align*}

This gives us linearity for three terms, namely (just replacing upper case names by lower case names)

\begin{gather*} \diff{}{x}\{af(x)+bg(x)+ch(x)\} =af'(x)+bg'(x)+ch'(x) \end{gather*}

Just by repeating the above argument many times, we may generalise to linearity for \(n\) terms, for any natural number \(n\text{:}\)

\begin{align*} \amp\diff{}{x}\{a_1f_1(x)+a_2f_2(x)+\cdots+a_n f_n(x)\}\\ \amp\hskip0.5in=a_1f'_1(x)+a_2f'_2(x)+\cdots+a_n f'_n(x) \end{align*}

Similarly, while the product rule is stated for the product of two functions, it is not difficult to extend it to the product of three or more functions as the following example shows.

Once again, we'll start by generalising the product rule to three factors.

\begin{align*} \amp\diff{}{x}\{F(x)\,G(x)\,H(x)\} =F'(x)\,G(x)\,H(x) +F(x)\, \diff{}{x}\{G(x)\,H(x)\}\\ & \hskip1in\text{by PR with} f(x)=F(x) \text{ and } g(x)=G(x)H(x)\\ &\hskip0.5in=F'(x)\,G(x)\,H(x) +F(x)\, \big\{G'(x)\,H(x)+G(x)\,H'(x)\big\}\\ &\hskip1in\text{by PR with} f(x)=G(x) \text{ and } g(x)=H(x) \end{align*}

This gives us a product rule for three factors, namely (just replacing upper case names by lower case names)

\begin{gather*} \diff{}{x}\{f(x)\,g(x)\,h(x)\} = f'(x)\,g(x)\,h(x) +f(x)\,g'(x)\,h(x)+f(x)\,g(x)\,h'(x) \end{gather*}

Observe that when we differentiate a product of three factors, the answer is a sum of three terms and in each term the derivative acts on exactly one of the original factors. Just by repeating the above argument many times, we may generalise the product rule to give the derivative of a product of \(n\) factors, for any natural number \(n\text{:}\)

\begin{align*} \diff{}{x}\{f_1(x)\,f_2(x)\,\cdots\,f_n(x)\} =\quad &f'_1(x)\,f_2(x)\,\cdots\,f_n(x)\\ +&f_1(x)\,f'_2(x)\,\cdots\,f_n(x)\\ &\qquad \qquad\vdots\\ +&f_1(x)\,f_2(x)\,\cdots\,f'_n(x) \end{align*}

We can also write the above as

\begin{align*} \amp\diff{}{x}\{f_1(x)\,f_2(x)\,\cdots\,f_n(x)\}\\ \amp\hskip0.5in= \left[ \frac{f_1'(x)}{f_1(x)}+ \frac{f_2'(x)}{f_2(x)}+ \cdots +\frac{f_n'(x)}{f_n(x)} \right] \cdot f_1(x)\,f_2(x)\,\cdots\,f_n(x) \end{align*}

When we differentiate a product of \(n\) factors, the answer is a sum of \(n\) terms and in each term the derivative acts on exactly one of the original factors. In the first term, the derivative acts on the first of the original factors. In the second term, the derivative acts on the second of the original factors. And so on.

If we make \(f_1(x) = f_2(x) = \cdots = f_n(x) = f(x)\) then each of the \(n\) terms on the right hand side of the above equation is the product of \(f'(x)\) and exactly \(n-1\) \(f(x)\)'s, and so is exactly \(f(x)^{n-1}\,f'(x)\text{.}\) So we get the following useful result

\begin{align*} \diff{}{x} f(x)^n &= n\cdot f(x)^{n-1} \cdot f'(x). \end{align*}

This last result is quite useful, so let us write it as a lemma for future reference.

This immediately gives us another useful result.

We can now compute the derivative of \(x^n\) for any natural number \(n\text{.}\) Start with Lemma 2.6.7 and substitute \(f(x)=x\) and \(f'(x)=1\text{:}\)

\begin{align*} \diff{}{x}x^n &= n \cdot x^{n-1} \cdot 1 = n\, x^{n-1} \end{align*}

Again — this is a result we will come back to quite a few times in the future, so we should make sure we can refer to it easily. However, at present this statement only holds when \(n\) is a positive integer. With a little more work we can extend this to compute \(x^q\) where \(q\) is any positive rational number and then any rational number at all (positive or negative). So let us hold off for a little longer. Instead we can make it a lemma, since it will be an ingredient in quite a few of the examples following below and in constructing the final corollary.

Back to more examples.

\begin{align*} \diff{}{x}\big\{2x^3+4x^5\big\} &=2\diff{}{x}\{x^3\}+4\diff{}{x}\{x^5\}\\ &\qquad\qquad\text{by LIN with } \alpha=2, f(x)=x^3, \beta=4 \text{ and } g(x)=x^5\\ &=2\{3x^2\}+4\{5x^4\}\\ \end{align*}

by Lemma 2.6.9, once with \(n=3\text{,}\) and once with \(n=5\)

\begin{align*} &=6x^2+20x^4 \end{align*}

In this example we'll compute \(\diff{}{x}\big\{(3x+9)(x^2+4x^3)\big\}\) in two different ways. For the first, we'll start with the product rule.

\begin{align*} \amp\diff{}{x}\big\{(3x+9)(x^2+4x^3)\big\}\\ \amp\hskip0.5in=\Big\{\diff{}{x}(3x+9)\Big\}\ (x^2+4x^3) +(3x+9)\ \diff{}{x}\{x^2+4x^3\}\\ \amp\hskip0.5in=\big\{3\times 1+9\times 0\big\}\ (x^2+4x^3) +(3x+9)\ \{2x+4(3x^2)\}\\ \amp\hskip0.5in=3(x^2+4x^3)+(3x+9)\ (2x+12x^2)\\ \amp\hskip0.5in=3x^2+12x^3+(6x^2+18x+36x^3+108x^2)\\ \amp\hskip0.5in=18x+117x^2+48x^3 \end{align*}

For the second, we expand the product first and then differentiate.

\begin{align*} \diff{}{x}\big\{(3x+9)(x^2+4x^3)\big\} &=\diff{}{x}\big\{9x^2+39x^3+12x^4\big\}\\ &=9(2x)+39(3x^2)+12(4x^3)\\ &=18x+117x^2+48x^3 \end{align*}
\begin{align*} \diff{}{x}\bigg\{\frac{4x^3-7x}{4x^2+1}\bigg\} &=\frac{(12x^2-7)(4x^2+1)-(4x^3-7x)(8x)}{(4x^2+1)^2}\\ &\qquad\qquad\text{by QR with } f(x)=4x^3-7x, f'(x)=12x^2-7,\\ &\qquad\qquad\text{and } g(x)=4x^2+1, g'(x)=8x\\ &=\frac{(48x^4-16x^2-7)-(32x^4-56x^2)}{(4x^2+1)^2}\\ &=\frac{16x^4+40 x^2-7}{(4x^2+1)^2} \end{align*}

In this example, we'll use a little trickery to find the derivative of \(\root{3}\of{x}\text{.}\) The trickery consists of observing that, by the definition of the cube root,

\begin{gather*} x= \left(\root{3}\of{x}\right)^3. \end{gather*}

Since both sides of the expression are the same, they must have the same derivatives:

\begin{gather*} \diff{}{x}\left\{x\right\} = \diff{}{x}\left(\root{3}\of{x}\right)^3. \end{gather*}

We already know by Theorem 2.2.4 that

\begin{gather*} \diff{}{x}\big\{x\big\}=1 \end{gather*}

and that, by Lemma 2.6.7 with \(n=3\) and \(f(x)=\root{3}\of{x}\text{,}\)

\begin{gather*} \diff{}{x}\big(\root{3}\of{x}\big)^3 = 3\ \big(\root{3}\of{x}\big)^2\cdot \diff{}{x}\big\{\root{3}\of{x}\big\} = 3\,x^{2/3}\cdot \diff{}{x}\big\{\root{3}\of{x}\big\}. \end{gather*}

Since we know that \(\diff{}{x}\left\{x\right\} = \diff{}{x}\left(\root{3}\of{x}\right)^3\text{,}\) we must have

\begin{align*} 1=3x^{2/3}\cdot \diff{}{x}\big\{\root{3}\of{x}\big\}\\ \end{align*}

which we can rearrange to give the result we need

\begin{align*} \diff{}{x}\big\{\root{3}\of{x}\big\} &=\tfrac{1}{3} x^{-2/3} \end{align*}

In this example, we'll use the same trickery as in Example 2.6.13 to find the derivative \(x^{p/q}\) for any two natural numbers \(p\) and \(q\text{.}\) By definition of the \(q^{\rm th}\) root,

\begin{gather*} x^p= \big(x^{p/q}\big)^q. \end{gather*}

That is, \(x^p\) and \(\big(x^{p/q}\big)^q\) are the same function, and so have the same derivative. So we differentiate both of them. We already know that, by Lemma 2.6.9 with \(n=p\text{,}\)

\begin{gather*} \diff{}{x}\big\{x^p\big\}=p x^{p-1} \end{gather*}

and that, by Lemma 2.6.7 with \(n=q\) and \(f(x)=x^{p/q}\text{,}\)

\begin{align*} \diff{}{x}\big\{\big(x^{p/q}\big)^q\big\} & = q\ \big(x^{p/q}\big)^{q-1}\ \diff{}{x}\big\{x^{p/q}\big\} \end{align*}

Remember that \((x^a)^b = x^{(a \cdot b)}\text{.}\) Now these two derivatives must be the same. So

\begin{align*} p x^{p-1} &=q\cdot x^{(pq-p)/q} \diff{}{x}\big\{x^{p/q}\big\}\\ \end{align*}

and, rearranging things,

\begin{align*} \diff{}{x}\big\{x^{p/q}\big\} & =\frac{p}{q} x^{p-1-(pq-p)/q}\\ & =\frac{p}{q} x^{(pq-q-pq+p)/q}\\ & =\frac{p}{q} x^{\frac{p}{q}-1} \end{align*}

So finally

\begin{equation*} \diff{}{x} \left\{ x^{p/q} \right\} = \frac{p}{q} x^{\frac{p}{q} -1 } \end{equation*}

Notice that this has the same form as Lemma 2.6.9, above, except with \(n=\frac{p}{q}\) allowed to be any positive rational number, not just a positive integer.

In this example we'll use the quotient rule to find the derivative of \(x^{-m}\text{,}\) for any natural number \(m\text{.}\)

By the special case of the quotient rule (Corollary 2.4.6) with \(g(x)=x^m\) and \(g'(x)=mx^{m-1}\)

\begin{gather*} \diff{}{x}\big\{x^{-m}\big\} =\diff{}{x}\bigg\{\frac{1}{x^m}\bigg\} =-\,\frac{mx^{m-1}}{{(x^m)}^2} =-m x^{-m-1} \end{gather*}

Again, notice that this has the same form as Lemma 2.6.9, above, except with \(n=-m\) being a negative integer.

In this example we'll use the quotient rule to find the derivative of \(x^{-p/q}\text{,}\) for any pair of natural numbers \(p\) and \(q\text{.}\) By the special case the quotient rule (Corollary 2.4.6) with \(g(x)=x^{\frac{p}{q}}\) and \(g'(x)=\frac{p}{q}x^{\frac{p}{q}-1}\text{,}\)

\begin{gather*} \diff{}{x}\big\{x^{-\frac{p}{q}}\big\} =\diff{}{x}\bigg\{\frac{1}{x^{\frac{p}{q}}}\bigg\} =-\,\frac{\frac{p}{q}x^{\frac{p}{q}-1}}{{(x^{\frac{p}{q}})}^2} =-\frac{p}{q}\ x^{-\frac{p}{q}-1} \end{gather*}

Note that we have found, in Examples 2.2.2, 2.6.14 and 2.6.16, the derivative of \(x^a\) for any rational number \(a\text{,}\) whether 0, positive, negative, integer or fractional. In all cases, the answer is

We shall show, in Example 2.10.5, that the formula \(\diff{}{x} x^a = a x^{a-1}\) in fact applies for all real numbers \(a\text{,}\) not just rational numbers.

Back in Example 2.2.9 we computed the derivative of \(\sqrt{x}\) from the definition of the derivative. The above corollary (correctly) gives

\begin{align*} \diff{}{x} x^{\frac{1}{2}} &= \frac{1}{2} x^{-\frac{1}{2}} \end{align*}

but with far less work.

Here's an (optional) messy example.

Find the derivative of

\begin{equation*} f(x)=\frac{(\sqrt{x}-1)(2-x)(1-x^2)}{\sqrt{x}(3+2x)} \end{equation*}
  • As we seen before, the best strategy for dealing with nasty expressions is to break them up into easy pieces. We can think of \(f(x)\) as the five–fold product
    \begin{equation*} f(x)=f_1(x)\cdot f_2(x)\cdot f_3(x)\cdot \frac{1}{f_4(x)}\cdot \frac{1}{f_5(x)} \end{equation*}
    with
    \begin{align*} f_1(x)\amp=\sqrt{x}-1\amp f_2(x)\amp=2-x\amp f_3(x)\amp=1-x^2\\ f_4(x)\amp=\sqrt{x}\amp f_5(x)\amp=3+2x \end{align*}
  • By now, the derivatives of the \(f_j\)'s should be easy to find:
    \begin{align*} f'_1(x)\amp=\frac{1}{2\sqrt{x}}\amp f'_2(x)\amp=-1\amp f'_3(x)\amp=-2x\\ f'_4(x)\amp=\frac{1}{2\sqrt{x}}\amp f'_5(x)\amp=2 \end{align*}
  • Now, to get the derivative \(f(x)\) we use the \(n\)–fold product rule which was developed in Example 2.6.6, together with the special case of the quotient rule (Corollary 2.4.6).
    \begin{align*} f'(x)&=f'_1f_2f_3\frac{1}{f_4}\frac{1}{f_5} +f_1f'_2f_3\frac{1}{f_4}\frac{1}{f_5} +f_1f_2f'_3\frac{1}{f_4}\frac{1}{f_5} -f_1f_2f_3\frac{f'_4}{f^2_4}\frac{1}{f_5}\\ \amp\hskip2.5in-f_1f_2f_3\frac{1}{f_4}\frac{f'_5}{f^2_5}\\ &=\Big[\frac{f'_1}{f_1}+\frac{f'_2}{f_2}+\frac{f'_3}{f_3}-\frac{f'_4}{f_4} -\frac{f'_5}{f_5}\Big]f_1f_2f_3\frac{1}{f_4}\frac{1}{f_5}\\ &=\bigg[\frac{1}{2\sqrt{x}(\sqrt{x}-1)} -\frac{1}{2-x}-\frac{2x}{1-x^2}-\frac{1}{2x} -\frac{2}{3+2x}\bigg]\\ \amp\hskip2.5in\frac{(\sqrt{x}-1)(2-x)(1-x^2)}{\sqrt{x}(3+2x)} \end{align*}
    The trick that we used in going from the first line to the second line, namely multiplying term number \(j\) by \(\frac{f_j(x)}{f_j(x)}\) is often useful in simplifying the derivative of a product of many factors  1 Also take a look at “logarithmic differentiation” in Section 2.10..