3.4 Differentiation Rules

Up until now, our toolkit for finding derivatives has been robust but primitive. We have relied entirely on the ε−δ\varepsilon-\delta definition. While technically sufficient, returning to the definition every time we encounter a new combination of functions is akin to building a house using only a spoon.

Recall from Chapter 1 that a complicated function is usually built from compositions, products, sums, and inverse relationships acting on old, familiar functions. In this section, we will observe how these arithmetic operations interact with differentiation. Our ultimate goal is to construct a machinery of differentiation—a set of rigorous, algebraic rules that can take the derivative of a horribly complicated function and systematically dismantle it into bite-sized pieces that we can easily differentiate.

3.4.1 Linearity: The Easiest Combinations

Let us start with the most straightforward arithmetic operations: addition, subtraction, and multiplication by a constant.

Theorem 3.4.1 (Derivative of sums, differences, and constant multiples).

If ff and gg are differentiable at xx, and cc is any constant, then f+gf+g, f−gf-g, and c⁢fcf are differentiable at xx, and:

(f+g)′⁢(x)=f′⁢(x)+g′⁢(x)(f−g)′⁢(x)=f′⁢(x)−g′⁢(x)(c⁢f)′⁢(x)=c⁢f′⁢(x)\begin{split}(f+g)^{\prime}(x)&{}=f^{\prime}(x)+g^{\prime}(x)\\ (f-g)^{\prime}(x)&{}=f^{\prime}(x)-g^{\prime}(x)\\ (cf)^{\prime}(x)&{}=cf^{\prime}(x)\end{split}
Intuition (The Limit Under the Hood).

Always remember that differentiation is, at its core, simply a limit taking place under the hood. Because the limit operator interacts so predictably with basic arithmetic operations, the derivative inherits these pleasant properties seamlessly.

Proof.

The proofs of all three assertions are straightforward and are based on limit rules, specifically observations that relate the difference quotients of f+gf+g, f−gf-g, and c⁢fcf to those of ff and gg. We also rely on the existence of the individual derivatives f′⁢(x)f^{\prime}(x) and g′⁢(x)g^{\prime}(x).

For the sum rule, we compute:

(f+g)′⁢(x)=limh→0(f⁢(x+h)+g⁢(x+h))−(f⁢(x)+g⁢(x))h=limh→0(f⁢(x+h)−f⁢(x)h+g⁢(x+h)−g⁢(x)h)=limh→0f⁢(x+h)−f⁢(x)h+limh→0g⁢(x+h)−g⁢(x)h=f′⁢(x)+g′⁢(x).\begin{split}(f+g)^{\prime}(x)&{}=\lim_{h\to 0}\frac{\big{(}f(x+h)+g(x+h)\big{% )}-\big{(}f(x)+g(x)\big{)}}{h}\\ &{}=\lim_{h\to 0}\left(\frac{f(x+h)-f(x)}{h}+\frac{g(x+h)-g(x)}{h}\right)\\ &{}=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}+\lim_{h\to 0}\frac{g(x+h)-g(x)}{h}\\ &{}=f^{\prime}(x)+g^{\prime}(x).\end{split}

The proof that (f−g)′⁢(x)=f′⁢(x)−g′⁢(x)(f-g)^{\prime}(x)=f^{\prime}(x)-g^{\prime}(x) follows an identical structure. Finally, for the constant multiple:

(c⁢f)′⁢(x)=limh→0c⁢f⁢(x+h)−c⁢f⁢(x)h=c⁢limh→0f⁢(x+h)−f⁢(x)h=c⁢f′⁢(x).\begin{split}(cf)^{\prime}(x)&{}=\lim_{h\to 0}\frac{cf(x+h)-cf(x)}{h}\\ &{}=c\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\\ &{}=cf^{\prime}(x).\end{split}

This completes the proof. ∎

Let us see this in action.

Example 3.4.2.

Consider the function h⁢(x)=x2+3h(x)=x^{2}+3. We can decompose this into f⁢(x)=x2f(x)=x^{2} and g⁢(x)=3g(x)=3. By the sum rule, Example 3.1.6, and Example 3.1.4, we find:

h′⁢(x)=f′⁢(x)+g′⁢(x)=2⁢x+0=2⁢x.h^{\prime}(x)=f^{\prime}(x)+g^{\prime}(x)=2x+0=2x.
Example 3.4.3.

Similarly, if h⁢(x)=2⁢xh(x)=2x, we can let f⁢(x)=xf(x)=x, meaning h⁢(x)=2⁢f⁢(x)h(x)=2f(x). The constant multiple rule and Example 3.1.5 yield:

h′⁢(x)=2⁢f′⁢(x)=2⋅1=2.h^{\prime}(x)=2f^{\prime}(x)=2\cdot 1=2.
Exercise 3.4.4.

Do we have (f1+f2+f3)′=f1′+f2′+f3′(f_{1}+f_{2}+f_{3})^{\prime}=f_{1}^{\prime}+f_{2}^{\prime}+f_{3}^{\prime}?

Hint: Group (f1+f2)(f_{1}+f_{2}) as a single function and apply the two-function sum rule.

Similarly, use this logic to convince yourself that the linearity principle holds for any finite sum of functions:

(f1+f2+⋯+fn)′=f1′+f2′+⋯+fn′.(f_{1}+f_{2}+\dots+f_{n})^{\prime}=f_{1}^{\prime}+f_{2}^{\prime}+\dots+f_{n}^{% \prime}.

3.4.2 The Product Rule

If limits play so nicely with sums, one might naively hope that the derivative of a product is simply the product of the derivatives. Let us disabuse ourselves of this notion immediately.

In our last example, suppose we redefine our constant as a function, letting g⁢(x)=2g(x)=2. Then our function h⁢(x)=2⁢xh(x)=2x can be written as h⁢(x)=g⁢(x)⁢f⁢(x)h(x)=g(x)f(x). The result seems to say that:

h′⁢(x)=2⁢f′⁢(x)=g⁢(x)⁢f′⁢(x).h^{\prime}(x)=2f^{\prime}(x)=g(x)f^{\prime}(x).

But this clean formulation is merely an artifact of gg being a constant! If gg is a bona-fide function that changes as xx varies, the fundamental symmetry of the expression h=g⁢fh=gf suggests something more profound: since gg and ff play the exact same role in the product, they must play the same role in the derivative. The symmetry suggests the appearance of an additional g′⁢(x)⁢f⁢(x)g^{\prime}(x)f(x) term. Indeed, we have the following.

Theorem 3.4.5 (Product Rule).

If ff and gg are differentiable at xx, then their product f⁢gfg is differentiable at xx, and

equation (3.8) (3.8)
(f⁢g)′⁢(x)=f⁢(x)⁢g′⁢(x)+f′⁢(x)⁢g⁢(x).(fg)^{\prime}(x)=f(x)g^{\prime}(x)+f^{\prime}(x)g(x).
Story (Leibniz’s Blunder).

Even the giants of mathematics stumble. When Gottfried Wilhelm Leibniz first investigated the derivative of a product in 1672, he erroneously assumed that (f⁢g)′(fg)^{\prime} was simply f′⁢g′f^{\prime}g^{\prime}. It wasn’t until a few years later, after recognizing the internal inconsistencies of this assumption, that he discovered the correct formulation. Today, the product rule is affectionately known as the Leibniz rule.

To prove this, we must evaluate the difference quotient for the product. The algebraic hurdle is that both ff and gg are changing simultaneously. A classic problem-solving strategy in mathematics is to change only one variable at a time. This motivates the middle-man trick—adding and subtracting a mixed term—mentioned in Section 3.3.

Proof of Theorem 3.4.5.

We evaluate the limit of the difference quotient:

(f⁢g)′⁢(x)=limh→0f⁢(x+h)⁢g⁢(x+h)−f⁢(x)⁢g⁢(x)h\begin{split}(fg)^{\prime}(x)&{}=\lim_{h\to 0}\frac{f(x+h)g(x+h)-f(x)g(x)}{h}% \end{split}

We now introduce our middle-man by adding and subtracting f⁢(x+h)⁢g⁢(x)f(x+h)g(x) in the numerator:

=limh→0f⁢(x+h)⁢g⁢(x+h)−f⁢(x+h)⁢g⁢(x)+f⁢(x+h)⁢g⁢(x)−f⁢(x)⁢g⁢(x)h=limh→0(f⁢(x+h)⁢g⁢(x+h)−g⁢(x)h+f⁢(x+h)−f⁢(x)h⁢g⁢(x))=limh→0f⁢(x+h)⋅limh→0g⁢(x+h)−g⁢(x)h+(limh→0f⁢(x+h)−f⁢(x)h)⁢g⁢(x)=f⁢(x)⁢g′⁢(x)+f′⁢(x)⁢g⁢(x).\begin{split}&{}=\lim_{h\to 0}\frac{f(x+h)g(x+h)-f(x+h)g(x)+f(x+h)g(x)-f(x)g(x% )}{h}\\ &{}=\lim_{h\to 0}\left(f(x+h)\frac{g(x+h)-g(x)}{h}+\frac{f(x+h)-f(x)}{h}g(x)% \right)\\ &{}=\lim_{h\to 0}f(x+h)\cdot\lim_{h\to 0}\frac{g(x+h)-g(x)}{h}+\left(\lim_{h% \to 0}\frac{f(x+h)-f(x)}{h}\right)g(x)\\ &{}=f(x)g^{\prime}(x)+f^{\prime}(x)g(x).\end{split}

∎

Caveat (Differentiability Implies Continuity).

In the last two steps of the proof, we distributed the limit and evaluated limh→0f⁢(x+h)=f⁢(x)\lim_{h\to 0}f(x+h)=f(x). This is legally permissible only because we assumed ff is differentiable at xx, which rigorously guarantees that ff is also continuous at xx.

You have seen the middle-man trick save the proof again! For those who prefer visual intuition, we have a geometric picture of them too: see Figure 3.5.

A geometric manifestation of the middle-man trick. The total area of the large rectangle is f(x+h) g(x+h), while the white area is f(x) g(x). The difference, represented by the two shaded regions, perfectly maps to the algebraic decomposition in our proof.
Figure 3.5: A geometric manifestation of the middle-man trick. The total area of the large rectangle is f⁢(x+h)⁢g⁢(x+h)f(x+h)g(x+h), while the white area is f⁢(x)⁢g⁢(x)f(x)g(x). The difference, represented by the two shaded regions, perfectly maps to the algebraic decomposition in our proof.

3.4.3 The Power Rule: Climbing the Ladder

Having mastered the product rule, we are naturally led to ask: what happens when a function is multiplied by itself?

Example 3.4.6.

Note that the function x2x^{2} is a product. By the product rule:

(x2)′=(x⋅x)′=x⋅x′+x′⋅x=x+x=2⁢x.(x^{2})^{\prime}=(x\cdot x)^{\prime}=x\cdot x^{\prime}+x^{\prime}\cdot x=x+x=2x.
Example 3.4.7.

The function x3x^{3} is also a product, so:

(x3)′=(x2⋅x)′=(x2)′⋅x+x2⋅x′=(2⁢x)⁢x+x2=2⁢x2+x2=3⁢x2.(x^{3})^{\prime}=(x^{2}\cdot x)^{\prime}=(x^{2})^{\prime}\cdot x+x^{2}\cdot x^% {\prime}=(2x)x+x^{2}=2x^{2}+x^{2}=3x^{2}.

A clear pattern emerges: the exponent “drops down” to become a coefficient, and the new exponent is reduced by one. This brings us to a sweeping generalization.

Proposition 3.4.8 (Power Rule).

For every positive integer nn,

equation (3.9) (3.9)
(xn)′=n⁢xn−1.(x^{n})^{\prime}=nx^{n-1}.
Moral (The Domino Effect of Induction).

Mathematical induction is a profoundly elegant method for proving that a statement P⁢(n)P(n) is true for all natural numbers. It is akin to climbing an infinitely tall ladder or knocking over an endless line of dominoes. To succeed, you must establish two things:

  1. 1.
    ​

    The Base Case: You can get onto the bottom rung of the ladder (n=1n=1).

  2. 2.
    ​

    The Inductive Step: From any given rung kk, you are guaranteed to be able to step up to the next rung k+1k+1.

Once both conditions are met, you have established the truth of the statement for all natural numbers.

We use mathematical mathematical induction. We prove the inductive step: if the result holds for n−1n-1, then it holds for nn. Since the result fundamentally holds for n=1n=1, namely (x)′=1⁢x0(x)^{\prime}=1x^{0}, its validity will then cascade for n=2,3,…n=2,3,\dots This is precisely the type of step we made in Example 3.4.7, in going from knowledge of (x2)′(x^{2})^{\prime} to (x3)′(x^{3})^{\prime}.

To prove the inductive step, we write xn=xn−1⁢xx^{n}=x^{n-1}x and apply the product rule:

(xn)′=(xn−1⁢x)′=(xn−1)′⁢x+xn−1⁢x′.(x^{n})^{\prime}=(x^{n-1}x)^{\prime}=(x^{n-1})^{\prime}x+x^{n-1}x^{\prime}.

Using the assumed validity of the previous rung, (xn−1)′=(n−1)⁢xn−2(x^{n-1})^{\prime}=(n-1)x^{n-2}, we get:

(xn)′=(xn−1)′⁢x+xn−1⁢x′=(n−1)⁢xn−2⁢x+xn−1=(n−1)⁢xn−1+xn−1=n⁢xn−1.\begin{split}(x^{n})^{\prime}&{}=(x^{n-1})^{\prime}x+x^{n-1}x^{\prime}\\ &{}=(n-1)x^{n-2}x+x^{n-1}\\ &{}=(n-1)x^{n-1}+x^{n-1}\\ &{}=nx^{n-1}.\end{split}

The result holds for nn, completing the proof. ∎

Armed with the rules of linearity and the power rule, we have effectively constructed a machine that can effortlessly devour any polynomial.

Example 3.4.9.

Let pp be a general polynomial function of the form:

p⁢(x)=an⁢xn+an−1⁢xn−1+⋯+a1⁢x+a0.p(x)=a_{n}x^{n}+a_{n-1}x^{n-1}+\dots+a_{1}x+a_{0}.

Using the rules for differentiating a sum, a constant multiple, and the formula already verified for the derivative of xnx^{n}, we immediately obtain:

p′⁢(x)=n⁢an⁢xn−1+(n−1)⁢an−1⁢xn−2+⋯+a1.p^{\prime}(x)=na_{n}x^{n-1}+(n-1)a_{n-1}x^{n-2}+\dots+a_{1}.
Example 3.4.10.

If p⁢(x)=2⁢x4+7⁢x3+6⁢x2+2⁢x+15p(x)=2x^{4}+7x^{3}+6x^{2}+2x+15, then our newly minted machinery yields:

p′⁢(x)=4⁢(2)⁢x3+3⁢(7)⁢x2+2⁢(6)⁢x+1⁢(2)⁢x0+0=8⁢x3+21⁢x2+12⁢x+2.\begin{split}p^{\prime}(x)&{}=4(2)x^{3}+3(7)x^{2}+2(6)x+1(2)x^{0}+0\\ &{}=8x^{3}+21x^{2}+12x+2.\end{split}
Exercise 3.4.11.

Find the derivative of f⁢(x)=x2⁢x3−x3+1f(x)=x^{2}\sqrt[3]{x}-x^{3}+1.

Exercise 3.4.12.

Suppose f1,f2f_{1},f_{2}, and f3f_{3} are differentiable on ℝ\mathbb{R}. Is f1⁢f2⁢f3f_{1}f_{2}f_{3} differentiable? If so, what is the product rule for (f1⁢f2⁢f3)′(f_{1}f_{2}f_{3})^{\prime}? Can you generalize this result to nn functions f1,f2,…,fnf_{1},f_{2},\ldots,f_{n}?