Derivative Product Rule

# The Product Rule

 Theorem 1 (The Product Rule): If $f$ and $g$ are differentiable functions, then the derivative of the product $fg$ is $\frac{d}{dx} [f(x)g(x)] = f(x) \cdot \frac{d}{dx} g(x) + g(x) \cdot \frac{d}{dx} f(x)$.

We will now derive the product rule geometrically. Suppose $f$ and $g$ are positive functions that are differentiable, and denote $\Delta x$ to be the change in $f(x)$ and $g(x)$. Therefore, we can denote the change in $f(x)$ and the change in $g(x)$ to be:

(1)
\begin{align} \quad \Delta f(x) = f(x + \Delta x) - f(x) \quad \Delta g(x) = g(x + \Delta x) - g(x) \end{align}

The diagram below illustrates the area of $f(x)g(x)$ as well as the area $(f(x) + \Delta f(x))(g(x) + \Delta g(x))$.

Thus, the change in the rectangles' area can be denoted as:

(2)
\begin{align} \quad \Delta(f(x)g(x)) = (f(x) + \Delta f(x))(g(x) + \Delta g(x)) - f(x)g(x) = f(x) \Delta g(x) + g(x) \Delta f(x) + \Delta f(x) \Delta g(x) \end{align}

If we now divide all terms by $\Delta x$ and then take $\lim_{\Delta x \to 0}$, we then get the derivative of the product $f(x)g(x)$.

(3)
\begin{align} \quad \frac{\Delta (f(x)g(x))}{\Delta x} = f(x) \frac{\Delta g(x)}{\Delta x} + g(x) \frac{\Delta f(x)}{\Delta x} + \Delta f(x) \frac{\Delta g(x)}{\Delta x} \\ \quad \lim_{\Delta x \to 0 } \frac{\Delta (f(x)g(x))}{\Delta x} = \lim_{\Delta x \to 0 } \left ( f(x) \frac{\Delta g(x)}{\Delta x} + g(x) \frac{\Delta f(x)}{\Delta x} + \Delta f(x) \frac{\Delta g(x)}{\Delta x} \right ) \\ \quad \frac{d}{dx} [f(x)g(x)] = \lim_{\Delta x \to 0 } f(x) \frac{\Delta g(x)}{\Delta x} + \lim_{\Delta x \to 0 } g(x) \frac{\Delta f(x)}{\Delta x} + \lim_{\Delta x \to 0 } \Delta f(x) \frac{\Delta g(x)}{\Delta x} \end{align}

We note that $\lim_{\Delta x \to 0 } f(x) \frac{\Delta g(x)}{\Delta x} = f(x) \cdot \frac{d}{dx} g(x)$, $\lim_{\Delta x \to 0 } g(x) \frac{\Delta f(x)}{\Delta x} + \lim_{\Delta x \to 0 } = g(x) \cdot \frac{d}{dx} f(x)$. Furthermore, $\lim_{\Delta x \to 0 } \Delta f(x) \frac{\Delta g(x)}{\Delta x} = 0 \cdot \frac{dv}{dx}$, since as $\Delta x \to 0$, $\Delta f(x) \to 0$, and therefore:

(4)
\begin{align} \: \frac{d}{dx} [f(x)g(x)] = f(x) \cdot \frac{d}{dx} g(x) + g(x) \cdot \frac{d}{dx} f(x) \end{align}

So we have derived the product rule. We will now formally prove the product rule.

• Proof: We will do a special trick to derive the product rule. It will be necessary to perform somewhat of a "trick" in this proof, that is we will add the term $-f(x + h)g(x) + f(x + h)g(x)$ (which is really just adding 0) to the numerator. Noting that $\lim_{h \to 0} f(x+h) = f(x)$ we proceed as follows:
(5)
\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} \\ \frac{d}{dx} [f(x)g(x)] = \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} \\ \frac{d}{dx} [f(x)g(x)] = \lim_{h \to 0} \frac{f(x+h)[g(x+h) - g(x)] + g(x)[f(x + h) - f(x)]}{h} \\ \frac{d}{dx} [f(x)g(x)] = \lim_{h \to 0} \frac{f(x+h)[g(x+h) - g(x)]}{h} + \lim_{h \to 0} \frac{g(x)[f(x + h) - f(x)]}{h} \\ \frac{d}{dx} [f(x)g(x)] = f(x)\lim_{h \to 0} \frac{g(x+h) - g(x)}{h} + g(x)\lim_{h \to 0} \frac{f(x+h) - f(x)}{h} \\ \frac{d}{dx} [f(x)g(x)] = f(x) \frac{d}{dx} g(x) + g(x) \frac{d}{dx} f(x) \quad \blacksquare \end{align}

We will now look at some examples of apply the derivative product rule.

## Example 1

Find the derivative of the function $f(x) = x^2 e^x$.

Well we can clearly see that $f(x)$ consists of a product of two parts, namely $x^2$ and $e^x$, so we can apply the product rule to get that:

(6)
\begin{align} \frac{d}{dx} f(x) = x^2 e^x + e^x \cdot 2x \end{align}
 Note: Simplification is often not necessary when applying the product rule.

## Example 2

Find the derivative of the function $y = 2x^3 \sin x$.

In this example, the function $y$ is composed of two parts, namely $2x^3$ and $\sin x$, and thus applying the product rule again we get:

(7)
\begin{align} \quad \frac{dy}{dx} = 2x^3 \cos x + \sin x \cdot 6x^2 \end{align}

## Example 3

Find the derivative of the function $y = x^2 x^3$.

You may be tempted to use the product rule, and it would work sufficiently. However, notice that both terms can be combined such that $x^2 x^3 = x^5$, to which we can applying the power rule to get that:

(8)
\begin{align} \frac{dy}{dx} = 5x^4 \end{align}

# Derivatives for Functions of Large Products

Suppose that $f$ is not a product of two other functions, but rather of three functions (or more), such that $f(x) = g(x)h(x)m(x)$ such as the function $f(x) = x^2 e^x \sin x$. We can apply the product rule twice in the same sense and we'll eventually derive the following rule:

(9)
$$f'(x) = g(x)h(x)m'(x) + g(x)h'(x)m(x) + g'(x)h(x)m(x) = g'(x)h(x)m(x) + g(x)h'(x)m(x) = g(x)h(x)m'(x)$$

You may be able to see a clear pattern that $f'(x)$ is equal to the derivative of the first function $g$ multiplied by the other two functions plus the derivative of the second function $h$ multiplied by the other two functions plus the derivative of the third function $m$ multiplied by the other two functions.

## Example 4

Find the derivative of the function $f(x) = \sin x \cos x \tan x$.

Applying the product rule as necessary we get that:

(10)
\begin{align} f'(x) = g'(x)h(x)m(x) + g(x)h'(x)m(x) = g(x)h(x)m'(x) \\ \quad f'(x) = \cos x \cos x \tan x + \sin x (-\sin x) \tan x + \sin x \cos x \sec ^2 x \\ f'(x) = \cos ^2 x \tan x - \sin ^2 x \tan x + \sin x \sec x \end{align}