Tutorials on Advanced Math and Computer Science Concepts

The Product and Quotient Rule

The product rule allows us to find the derivative of two functions being multiplied together. This is helpful for functions that are tough to simplify, such as $f(x) = (x^2+2x)*(x^3+3x+7)$. If we expand this function, it will take a bit of time and effort, so it is valuable to be able to evaluate the derivative as is.

The Product Rule: Let f(x) and g(x) be differentable functions. Then, $\frac{dy}{dx}(f(x)g(x)) = f(x) * \frac{dy}{dx}(g(x)) + \frac{dy}{dx}(f(x))g(x)$

Let's take a look at the definition of a derivative to see if we can get intuition why this is true.

$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)+f(x)g(x_h)-f(x)g(x)}{h}$
$=lim_{h \to 0} \frac{[f(x+h)-f(x)]g(x+h)+f(x)[g(x+h)-g(x)]}{h}$
$=lim_{h \to 0} \frac{f(x+h)-f(x)}{h}*lim_{h \to 0} g(x+h) + lim_{h \to 0} f(x) * lim_{h \to 0} \frac{g(x+h)-g(x)}{h}$
$=lim_{h \to 0} \frac{f(x+h)-f(x)}{h}*g(x) + f(x) * lim_{h \to 0} \frac{g(x+h)-g(x)}{h}$
$=\frac{dy}{dx}(f(x))*g(x) + f(x) * \frac{dy}{dx}(g(x))$

1. We introduce the $-f(x)g(x+h)+f(x)g(x+h)$ in the second line to allow us to factor the equation at the top. We can do this since $-f(x)g(x+h)+f(x)g(x+h) = 0$, meaning nothing changes by adding it, the resulting function is equivelent.
2. In the second last step, we assert that $lim_{h \to 0}g(x+h) = g(x)$. This is true since if you let h go to 0, $g(x+h) = g(x)$

This proof is one of the trickier ones that we have seen in this series of articles, however once you understand the two notes above, it becomes clear how we arrive at the result.

Now that we have a rule for finding the derivative of products, let's try an example.

Example: Given $f(x) = (x^2 + 2x)(x^3 + 3x + 7)$, determine f'(x)

First, let's make it clear what our two functions are. Let $g(x) = (x^2+2x)$ and $h(x) = (x^3 + 3x + 7)$. Product rule states that: $\frac{dy}{dx}(g(x)h(x)) = g(x) * \frac{dy}{dx}(h(x)) + \frac{dy}{dx}(g(x))*h(x)$, so let's go ahead and do exactly that.

$\frac{dy}{dx}((x^2 + 2x)(x^3 + 3x + 7))$
$=(x^2 + 2x) * \frac{dy}{dx}(x^3 + 3x + 7) + \frac{dy}{dx}(x^2 + 2x) * (x^3 + 3x + 7)$
$=(x^2 + 2x)(3x^2 + 3) + (2x + 2)(x^3 + 3x + 7)$

The next rules we will discuss deal with quotients. We will first introduce the reciprocal rule, which is a rule to help us understand the derivatives of functions in the form $\frac{1}{g(x)}$. After this, we will turn to equations in the form $\frac{f(x)}{g(x)}$ with the quotient rule.

Reciprocal rule: Let g(x) be differentiable, and $g(x) \ne 0.$ Then, $\frac{1}{g(x)} = -\frac{g'(x)}{(g(x))^2}$

This rule is really a special case of the quotient rule that we will see later. It is a nice tool for quickly finding derivatives for reciprocal functions. It is also required to prove the quotient rule, which is another reason why I cover it first. The proof of the reciprocal rule works with the limit definition of derivatives.

$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+h)g(x)}-\frac{g(x+h)}{g(x)g(x+h)}}{h}$
$=lim_{h \to 0} \frac{\frac{g(x)-g(x+h)}{g(x+h)g(x)}}{h}$
$=lim_{h \to 0} \frac{g(x)-g(x+h)}{g(x+h)g(x)h}$
$=lim_{h \to 0} \frac{g(x)-g(x+h)}{h} * lim_{h \to 0} \frac{1}{g(x+h)} * \lim_{h \to 0} \frac{1}{g(x)}$
$= -g(x) * \frac{1}{g(x)} * \frac{1}{g(x)}$
$= - \frac{g'(x)}{(g(x))^2}$

Just as a note, $lim_{h \to 0} \frac{g(x) - g(x+h)}{h} = -g'(x)$, since
$lim_{h \to 0} \frac{g(x) - g(x+h)}{h}$
$= lim_{h \to 0} \frac{-g(x+h) + g(x)}{h}$
$= - lim_{h \to 0} \frac{g(x+h) - g(x)}{h}$
$= -g'(x)$

The Quotient Rule: Let f(x) and g(x) be differentiable functions. Then, $\frac{dy}{dx}(\frac{f(x)}{g(x)}) = \frac{g(x) * \frac{dy}{dx}(f(x)) - f(x)*\frac{dy}{dx}(g(x))}{(g(x))^2}$

You will notice that this is very similar to the result of the product rule. This is because of the relationship between multiplication and division. We can use this intuition, with the reciprocal rule, to prove the quotient rule.

$\frac{dy}{dx}(\frac{f(x)}{g(x)}$
$=\frac{dy}{dx}(f(x)*\frac{1}{g(x)})$
$= \frac{dy}{dx}(f(x)) * g(x) + f(x) * \frac{dy}{dx}(\frac{1}{g(x)}) * f(x)$
$= f'(x)\frac{1}{g(x)} - f(x)\frac{g'(x)}{(g(x))^2}$
$= \frac{f'(x)g(x)}{(g(x))^2} - \frac{f(x)g'(x)}{(g(x))^2}$
$= \frac{f'(x)g(x)-f(x)g'(x)}{(g(x))^2}$

Now that we know the quotient rule, let's try an example.

Example: Suppose $f(x) = \frac{x^2 + 2x}{\sqrt{x}}$. Find f'(x)

$f'(x) = \frac{f'(x)g(x)-f(x)g'(x)}{(g(x))^2}$
$= \frac{\frac{dy}{dx}(x^2 + 2x) * \sqrt{x} - (x^2+2x) * \frac{dy}{dx}(\sqrt{x})}{(\sqrt{x})^2}$
$= \frac{(2x + 2) * \sqrt{x} - (x^2 + 2x) * (\frac{1}{2}x^{\frac{-1}{2}})}{x}$