Skip to main content

Course Notes for Calculus I

Section 6.3 Rules for Differentiation

I have introduced the idea of a derivative in Section 3.1 and a formal limit definition in Section 6.2. However, I don’t yet have good tools to actually calculate derivatives. This section introduces tools for calculating derivatives.

Subsection 6.3.1 Important Derivatives

I’ll start with a number of standard derivatives. If a function is constant, its rate of change is zero, so its must have a zero derivative.
\begin{equation*} \frac{d}{dx} c = 0 \end{equation*}
For the linear function \(f(x) = mx + b\text{,}\) the graph is a straight line with slope \(m\text{.}\) Since the derivative measures the slope, it should be constant \(m\text{.}\)
\begin{equation*} \frac{d}{dx} mx + b = m \end{equation*}
Here are the derivatives of sine and cosine. They are given here without proof.
\begin{align*} \frac{d}{dx} \sin x \amp = \cos x \amp \frac{d}{dx} \cos x \amp = -\sin x \end{align*}
Now I want to calculate the derivative of an exponential function with exponential base. \(a\text{.}\) I start with the second version of the definition of the derivative and do some algebra with the limit.
\begin{align*} \frac{d}{dx} a^x \amp = \lim_{h \rightarrow 0} \frac{a^{x+h} - a^x}{h} = \lim_{h \rightarrow 0} \frac{a^x a^h - a^x}{h}\\ \amp = \lim_{h \rightarrow 0} a^x \frac{a^h-1}{h} = a^x \lim_{h \rightarrow 0} \frac{a^h-1}{h} = a^x \left( \left. \frac{d}{dx} a^x \right|_{x=0} \right) \end{align*}
In the last step, I changed the limit into a derivative using the definition of the derivative at the specific point \(x=0\text{.}\) The vertical line means “evaluated at \(x=0\)”.
This formula shows that derivative of \(a^x\) is a product of the same function \(a^x\) multiplied by its derivative at \(x=0\text{.}\) Note that all exponentials go through the point \((0,1)\text{.}\) Figure 6.3.1 shows the the graphs of several exponential function (for bases \(a > 1\)).
Figure 6.3.1. Four Exponential Functions
The slope at \((0,1)\) determines the derivative. As seen in Figure 6.3.1, for different choices of the base, there are different slopes of the graph when it passes through the point \((0,1)\text{.}\) There is one special base which has slope \(1\) at the point \((0,1)\text{.}\) By definition, that base is the number \(e\text{.}\) (This number was defined earlier by a limit; in Calculus II I will argue that the two definitions coincide.) By definition, the function \(e^x\) satisfies an important property.
\begin{equation*} \frac{d}{dx} e^x = e^x \end{equation*}
This is the main reason that we are so fond of \(e\) as an expoenntial base. \(e^x\) is the nicest function to differentiate, since it doesn’t change at all. Again, this is a definition of the number \(e\text{;}\) it is specifically chosen for this special property.

Subsection 6.3.2 Power Rule

So far, I’ve looked at specific derivatives and used the definition to work them out. This approach quickly becomes unreasonable due to complications in the limit calculations. Therefore, I’ll present some general rules that allow me to calculate derivatives without using the definition. The first rule is called the power rule. Let \(n \in \RR\) with \(n \neq 0\text{.}\)
\begin{equation*} \frac{d}{dx} x^n = nx^{n-1} \end{equation*}
I can give a proof when \(n\) is a positive integer, using the binomial theorem. (The power rule applies for all real exponents, but the general proof is less accessible.)
\begin{align*} \frac{d}{dx} x^n \amp = \lim_{h \rightarrow 0} \frac{(x+h)^n - x^n}{h} =\\ \amp = \lim_{h \rightarrow 0} \frac{x^n + nx^{n-1}h + \binom{n}{2} x^{n-2}h^2 + \ldots + nxh^{n-1} + h^n - x^n}{h} \end{align*}
I’ve expended the binomial in the numerator by the binomial theorem. After doing this, the first term of the expansion will always cancel with the last term in the numerator. The resulting terms all have \(h\) in them, so I can factor that \(h\) out, cancel it off, and then evaluate the limit.
\begin{align*} \frac{d}{dx} x^n \amp = \lim_{h \rightarrow 0} \frac{nx^{n-1}h + \binom{n}{2} x^{n-2}h^2 + \ldots + nxh^{n-1} + h^n}{h}\\ \amp = \lim_{h \rightarrow 0} nx^{n-1} + \binom{n}{2} x^{n-2}h + \ldots + nxh^{n-2} + h^{n-1}\\ \amp = nx^{n-1} \end{align*}

Subsection 6.3.3 Linearity

Next is a set of three rules which are collectively called linearity. Linearity shows that derivatives work nicely with addition, subtraction and multiplication by constants. In general, any operation in mathematics that cooperates with those these actions is called a linear operation. If \(f\) and \(g\) are differentiable functions and \(c\) is a real constant, then these three rules hold.
\begin{align*} \frac{d}{dx} f + g \amp = \frac{df}{dx} + \frac{dg}{dx}\\ \frac{d}{dx} f - g \amp = \frac{df}{dx} - \frac{dg}{dx}\\ \frac{d}{dx} cf \amp = c \frac{df}{dx} \end{align*}
The proof of the linearity rules is excluded here, though it is relatively easy to construct using the linearity of the limit and the definition of the derivative. Using linearity and the power rule, I can take the derivative of any polynomial.

Example 6.3.2.

Here are some example polynomial derivatives. For each polynomial, I split up the derivative over the additions and subtractions using linearity. Then I pull out the constants using linearity. What is left is a power rule calculation for each power in the polynomial.
\begin{align*} \frac{d}{dx} x^2 -3x -4 \amp = \frac{d}{dx} x^2 - \frac{d}{dx} 3x - \frac{d}{dx} 4 \\ \amp = 2x - 3 - 0 = 2x -3\\ \frac{d}{dx} 7x^3 + 9x^2 - 14x - 26 \amp = 7 \frac{d}{dx} x^3 + 9 \frac{d}{dx} x^2 - 14 \frac{d}{dx} x - \frac{d}{dx} 26\\ \amp = 7 (3x^2) + 9(2x) - 14 - 0 = 21 x^2 + 18 x - 14 \end{align*}

Subsection 6.3.4 Leibniz Rule

Limits worked well with all four arithmetic operations: addition, subtraction, multiplication and division. I might hope the same is true for derivatives, but I would be disappointed. There are rules for multiplication and division, but they are more complicated than the rules for limits. The rule for products is called the product rule or the Leibniz rule.

Proof.

The following calculation is a proof for the Leibniz rule. I start with the limit definition of the derivative, using the version with \(h \rightarrow 0\text{.}\)
\begin{equation*} \frac{d}{dx} fg = \lim_{h \rightarrow 0} \frac{f(x+h)g(x+h) - f(x)g(x)}{h} \end{equation*}
Then I’m going to use a strange but surprisingly common algebraic trick. I want to do some particular kind of factoring in the numerator. To make that work, I add and subtract the same term from the numerator. Adding and subtracting the same thing doesn’t change the expression, so equality is preserved.
\begin{equation*} = \lim_{h \rightarrow 0} \frac{f(x+h)g(x+h) - f(x+h) g(x) + f(x+h) g(x) - f(x)g(x)}{h} \end{equation*}
Then I’m going to write the first two terms as one limit and the next two terms as another limit. In the first two terms, \(f(x+h)\) is a common factor, so I can pull it out of the fraction. In the second two terms, \(g(x)\) is a common factor, so I can likewise pull it out of the fraction.
\begin{equation*} = \lim_{h \rightarrow 0} f(x+h)\frac{g(x+h) - g(x)}{h} + \lim_{h \rightarrow 0} g(x) \frac{f(x+h) - f(x)}{h} \end{equation*}
I can use the limit rules for the first limit. The limit of \(f(x+h)\) as \(h \rightarrow 0\) is just \(f(x)\text{,}\) so I’ll evaluate that piece of the product and leave the remaining limit. In the second limit, \(g(x)\) doesn’t involve the variable \(h\) at all, so it can simply be pulled out of the limitl.
\begin{equation*} = f(x) \lim_{h \rightarrow 0} \frac{g(x+h) - g(x)}{h} + g(x) \lim_{h \rightarrow 0} \frac{f(x+h) - f(x)}{h} \end{equation*}
Finally, I can simplify identify these two limits as the definitions of the derivatives of \(g(x)\) and \(f(x)\text{,}\) respectively.
\begin{equation*} = f(x) \frac{dg}{dx} + f(x) \frac{df}{dx} \end{equation*}
The Leibniz rule is, in many ways, the archetypical rule that identifies differentiation. There are many derivative-like operations in mathematics and they all conform to some version of the Leibniz rule.

Example 6.3.4.

Here are three Leibniz rules derivatives. In each one, I took the derivative of each half of the product and then wrote the form \(g(x) f^\prime(x) + f(g) g^\prime(x)\) on the right.
\begin{align*} \frac{d}{dx} x^2 e^x \amp = 2x e^x + x^2 e^x\\ \frac{d}{dx} x^2 \sin x \amp = 2x \sin x + x^2 \cos x\\ \frac{d}{dx} e^x \sin x \amp = e^x \sin x + e^x \cos x \end{align*}

Subsection 6.3.5 Quotient Rule

Like the Leibniz rule for products, there is a complicated rule for derivatives of quotients, called the quotient rule. Let \(f\) be a differentiable function and \(g\) be a differentiable function (with \(g(x) \neq 0\) on its domain).
\begin{equation*} \frac{d}{dx} \frac{f}{g} = \frac{g \frac{df}{dx} - f \frac{dg}{dx}}{g^2} \end{equation*}

Example 6.3.5.

The quotient rule is very useful for calculating the remaining trigonometric derivatives. All four remaining trig functions are quotients of sine and cosine. If I write them as these quotients, I can calculate the derivatives of the two pieces of the quotient and then place those derivatives into the pattern given by the quotient rule.
\begin{align*} \frac{d}{dx} \tan x \amp = \frac{d}{dx} \frac{\sin x}{\cos x} = \frac{\cos x \frac{d \sin x}{dx} - \sin x \frac{d \cos x}{dx}}{\cos^2 x} = \frac{\cos^2 x + \sin^2 x}{\cos^2 x} = \sec^2 x\\ \frac{d}{dx} \sec x \amp = \frac{d}{dx} \frac{1}{\cos x} = \frac{0 - - \sin x}{\cos^2 x} = \sec x \tan x \end{align*}