# Section5.8Differentiation¶ permalink

The most important application of limit rules is to develop rules
for derivatives. Every time we need a derivative, we currently must
use the definition and compute the limit
\begin{equation*} f'(x) = \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} \end{equation*}
and then go through the algebra and simplification to find the resulting
formula. Finding the formula for \(f'(x)\) from the formula for
\(f(x)\) is a process called *differentiation*.
The rules for derivatives will provide us with a methodical way to
differentiate algebraic formulas.

Differentiation is a process of taking a function and using it to
determine another function. In a sense, we are using a function as an
input and creating a new function as the output. Can you see that this is
something like a function of functions instead of a function of numbers.
We call such a process an *operator* and most commonly use
the differential operator \(\displaystyle \frac{d}{dx}\) where \(x\)
is the independent variable for the function. (The variable changes depending
on the relevant independent variable.)

# Subsection5.8.1Derivative Rules

Derivative rules are theorems that take as a hypothesis that one or two functions have known derivatives and the conclusion tells how to find the derivative of some combination of those functions. We start by stating the basic rules together for convenience in finding them.

##### Theorem5.8.2Differentiation Rules

This theorem is a collection of multiple theorems. The hypothesis for any statement that involves \(f(x)\) or \(g(x)\) is that \(\displaystyle \frac{d}{dx}[f(x)] = f'(x)\) or that \(\displaystyle \frac{d}{dx}[g(x)] = g'(x)\). Further, \(k\) is assumed to be a constant.

\(\displaystyle \frac{d}{dx}[k \cdot f(x)] = k \cdot f'(x)\) | Constant Multiple Rule |

\(\displaystyle \frac{d}{dx}[f(x)+g(x)] = f'(x)+g'(x)\) | Sum Rule |

\(\displaystyle \frac{d}{dx}[f(x)-g(x)] = f'(x)-g'(x)\) | Difference Rule |

\(\displaystyle \frac{d}{dx}[\frac{1}{g(x)}] = \frac{-g'(x)}{(g(x))^2}\) | Reciprocal Rule |

\(\displaystyle \frac{d}{dx}[f(x) \cdot g(x)] = f'(x) g(x) +f(x) g'(x)\) | Product Rule |

\(\displaystyle \frac{d}{dx}[\frac{f(x)}{g(x)}] = \frac{g(x)f'(x)-f(x)g'(x)}{(g(x))^2}\) | Quotient Rule |

\(\displaystyle \frac{d}{dx}[f\Big(g(x)\Big)] = f'\Big(g(x)\Big) \cdot g'(x)\) | Chain Rule |

One of these differentiation rules, the chain rule, will require its own discussion. That rule is focused on how to differentiate compositions of functions. The other rules focus on arithmetic combinations of functions and are the primary focus of this section. The chain rule was included for completeness in the listing of differentiation rules.

The proofs for these differentiation rules are based on applying the definition of a derivative to the formula in question while knowing that the limits that define the derivatives in the hypothesis are valid. To illustrate, we will look at four of the differentiation rules in detail. Before doing this, we will also need the following theorem, that a function must be continuous wherever the derivative is defined.

##### Theorem5.8.3

If \(f'(c)\) is defined, then \(f\) is continuous at \(c\), which means that \begin{equation*} \lim_{x \to c} f(x) = f(c) \end{equation*} or equivalently \begin{equation*} \lim_{h \to 0} f(c+h) = f(c). \end{equation*}# Subsubsection5.8.1.1Proof of Constant Multiple Rule

By hypothesis, \(\displaystyle \frac{d}{dx}[f(x)] = f'(x)\). This means that \(f'(x)\) is defined by its limit \begin{equation*} \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} = f'(x). \end{equation*} The rule is interested in finding the rate of change of a new function \(k \cdot f(x)\). We will use that function to compute the derivative. \begin{align*} \frac{d}{dx}[k \cdot f(x)] &= \lim_{h \to 0} \frac{k \cdot f(x+h) - k \cdot f(x)}{h} \\ &= \lim_{h \to 0} \frac{k (f(x+h)-f(x))}{h}. \end{align*} Now notice that the formula is a product of the constant \(k\) and the average rate of change of \(f\). Because we already know that the limit of the average rate of change of \(f\) is equal to \(f'(x)\), we can use the Limit Rule for a Constant Multiple. \begin{align*} \frac{d}{dx}[k \cdot f(x)] &= \lim_{h \to 0} \frac{k (f(x+h)-f(x))}{h} \\ &= k \cdot f'(x). \end{align*}

# Subsubsection5.8.1.2Proof of Reciprocal Rule

By hypothesis, \(\displaystyle \frac{d}{dx}[g(x)] = g'(x)\). This means that \(g'(x)\) is defined by its limit \begin{equation*} \lim_{h \to 0} \frac{g(x+h)-g(x)}{h} = g'(x). \end{equation*} The rule is interested in finding the rate of change of a new function \(1/g(x)\). We will use that function to compute the derivative using the definition, which will require finding a common denominator. \begin{align*} \frac{d}{dx}[\frac{1}{g(x)}] &= \lim_{h \to 0} \frac{\frac{1}{g(x+h)} - \frac{1}{g(x)}}{h} \\ &= \lim_{h \to 0} \frac{\frac{g(x)}{g(x)g(x+h)} - \frac{g(x+h)}{g(x)g(x+h)}}{h} \\ &= \lim_{h \to 0} \frac{g(x)-g(x+h)}{g(x)g(x+h)}\cdot \frac{1}{h} \\ &= \lim_{h \to 0} \frac{-1}{g(x)g(x+h)}\cdot \frac{g(x+h)-g(x)}{h} \end{align*} Since the limit involves \(h \to 0\), \(g(x)\) is a constant and \(g(x+h) \to g(x)\) (by continuity) so that \begin{equation*} \lim_{h \to 0} \frac{-1}{g(x)g(x+h)} = \frac{-1}{(g(x))^2}. \end{equation*} Using the Limit Rule of a Product, we have \begin{align*} \frac{d}{dx}[\frac{1}{g(x)}] &= \lim_{h \to 0} \frac{-1}{g(x)g(x+h)}\cdot \frac{g(x+h)-g(x)}{h} \\ &= \frac{-1}{(g(x))^2} \cdot g'(x) = \frac{-g'(x)}{(g(x))^2}. \end{align*}

# Subsubsection5.8.1.3Proof of Sum Rule

By hypothesis, \(\displaystyle \frac{d}{dx}[f(x)] = f'(x)\) and \(\displaystyle \frac{d}{dx}[g(x)] = g'(x)\). This means that \begin{gather*} \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} = f'(x), \\ \lim_{h \to 0} \frac{g(x+h)-g(x)}{h} = g'(x). \end{gather*} The sum rule is interested in finding the rate of change of a new function \(f(x)+g(x)\). We will use that function to compute the derivative using the definition: \begin{align*} \frac{d}{dx}[f(x)+g(x)] &= \lim_{h \to 0} \frac{[f(x+h)+g(x+h)] - [f(x)+g(x)]}{h} \\ &= \lim_{h \to 0} \frac{f(x+h)+g(x+h)-f(x)-g(x)}{h} \\ &= \lim_{h \to 0} \frac{f(x+h)-f(x)+g(x+h)-g(x)}{h} \\ &= \lim_{h \to 0} \left[\frac{f(x+h)-f(x)}{h}+\frac{g(x+h)-g(x)}{h}\right] \\ &= f'(x)+g'(x), \end{align*} using the Limit Rule of a Sum.

# Subsubsection5.8.1.4Proof of Product Rule

By hypothesis, \(\displaystyle \frac{d}{dx}[f(x)] = f'(x)\) and \(\displaystyle \frac{d}{dx}[g(x)] = g'(x)\). This means that \begin{gather*} \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} =\lim_{h \to 0} \frac{\Delta f}{h} = f'(x), \\ \lim_{h \to 0} \frac{g(x+h)-g(x)}{h} = \lim_{h \to 0} \frac{\Delta g}{h} =g'(x). \end{gather*} The product rule is interested in finding the rate of change of a new function \(f(x)g(x)\). In the course of this calculation, we will also need the following substitutions, \begin{gather*} f(x+h) = f(x+h)-f(x) + f(x) = \Delta f + f(x), \\ g(x+h) = g(x+h)-g(x) + g(x) = \Delta g + g(x). \end{gather*} When \(f'(x)\) and \(g'(x)\) both exist, \(f\) and \(g\) are both continuous so that \begin{gather*} \lim_{h \to 0} \Delta f = \lim_{h \to 0} f(x+h)-f(x) = 0, \\ \lim_{h \to 0} \Delta g = \lim_{h \to 0} g(x+h)-g(x) = 0. \end{gather*} The derivative in question is defined by \begin{align*} \frac{d}{dx}[f(x)g(x)] &= \lim_{h \to 0} \frac{[f(x+h)g(x+h)] - [f(x)g(x)]}{h} \\ &= \lim_{h \to 0} \frac{(\Delta f + f(x))(\Delta g + g(x)) - f(x)g(x)}{h} \\ &= \lim_{h \to 0} \frac{\Delta f \Delta g + \Delta f g(x) + f(x) \Delta g + f(x)g(x) - f(x)g(x)}{h} \\ &= \lim_{h \to 0} \frac{\Delta f \Delta g + \Delta f g(x) + f(x) \Delta g}{h} \\ &= \lim_{h \to 0} \left[\frac{\Delta f \Delta g}{h} + \frac{\Delta f g(x)}{h} + \frac{f(x) \Delta g}{h} \right]. \\ &= \lim_{h \to 0} \left[\Delta f \cdot \frac{\Delta g}{h} + \frac{\Delta f}{h} \cdot g(x) + f(x) \cdot \frac{\Delta g}{h} \right]. \\ &= 0 \cdot g'(x) + f'(x) \cdot g(x) + f(x) \cdot g'(x) \\ &= f'(x) \cdot g(x) + f(x) \cdot g'(x), \end{align*} using the Limit Rule of a Sum and the Limit Rule of a Product.

# Subsection5.8.2Using the Derivative Rules

A traditional development of calculus begins applying these rules to find formulas to derivatives. We will instead begin applying the rules by interpreting some specific applied applications involving rates of change.

##### Example5.8.4

A tank is being filled with water two supply hoses. If the first hose is pumping water at a rate of 20 gal/min and the second hose is pumping water at a rate of 30 gal/min, what is the total rate of change for the tank?

The sum rule for derivatives feels very intuitive. If a quantity is the sum of parts, then the total rate of change for the quantity is the sum of the rates of change for each of the parts. The product rule is less intuitive because we don't get to multiply rates of change when a quantity is a product. To illustrate this example, we focus on a geometric example on the area of a rectangle when the lengths of the sides are changing.

##### Example5.8.5

A city is in the shape of a rectangle with sides aligned with North-South and East-West lines. Suppose that the city is currently 5 miles east-to-west and 3 miles north-to-south and plans to expand to a size 8 miles east-to-west by 5 miles north-to-south over the next 10 years. What is the average rate of change of the total area in the city over the 10 years? If the borders were to move at a constant rate over those 10 years, what is the instantaneous rate of change of the total area of the city at the beginning and at the end of the 10 years?

Quotients often appear when working with densities, concentrations, or other ratios.

##### Example5.8.6

A salt-water solution is being formulated. At a particular instant, the solution consists of 10 L of water with 5 kg of salt. At that instant, water is being added at a rate of 0.5 L/s while salt is being added at a rate of 0.2 kg/s. What is the instantaneous rate of change of the concentration?

# Subsection5.8.3Derivative Building Blocks

In order to apply the differentiation rules for formulas, we need to have some elementary rules to get started. Just as with the limit rules, we begin with the basics. The justification of the derivatives of the elementary derivatives must be based on the definition of the derivative. The derivatives of more complex functions can then be justified using the derivative rules.

##### Theorem5.8.7Derivative of a Constant

If \(k\) is a real number, then \begin{equation*}\frac{d}{dx}[k] = 0. \end{equation*}##### Theorem5.8.8Derivative of the Identity Function

\begin{equation*}\frac{d}{dx}[x] = 1. \end{equation*}Although the derivatives of other functions can be found using the limit definition of the derivative, these two elementary derivatives along with the the rules of differentiation allow us to find other derivatives.

##### Example5.8.9

Find \(f'(x)\) for \(f(x) = 3x-5\), citing the differentiation rules you used.The rules of derivatives can also allow us to create new differentiation rules. The following theorem uses the same steps as the previous example but with arbitrary constants.

##### Theorem5.8.10

If \(a\) and \(b\) are real numbers, then \begin{equation*} \frac{d}{dx}[ax+b] = a. \end{equation*}Integer powers correspond to repeated multiplication, so the product rule of differentiation will lead to a rule for the derivative of a power. The following examples lead to a natural pattern called the power rule for derivatives.

##### Example5.8.11

Use the product rule of derivatives to show that \begin{gather*} \frac{d}{dx}[x^2] = 2x ,\\ \frac{d}{dx}[x^3] = 3x^2, \\ \frac{d}{dx}[x^4] = 4x^3. \end{gather*}We can continue to find more derivatives using these results.