Quotient rule

In calculus, the quotient rule is a method of finding the derivative of a function that is the quotient of two other functions for which derivatives exist.

If the function one wishes to differentiate, $$f(x)$$, can be written as


 * $$f(x) = \frac{g(x)}{h(x)}$$

and $$h(x)$$ ≠ $$0$$, then the rule states that the derivative of $$g(x)/h(x)$$ is equal to:


 * $$\frac{d}{dx}f(x) = f'(x) = \frac{g'(x)h(x) - g(x)h'(x)}{[h(x)]^2}.$$

Or, more precisely, for all $$x$$ in some open set containing the number $$a$$, with $$h(a)$$ ≠ $$0$$; and, such that $$g'(a)$$ and $$h'(a)$$ both exist; then, $$f'(a)$$ exists as well:


 * $$f'(a)=\frac{g'(a)h(a) - g(a)h'(a)}{[h(a)]^2}.$$

Examples
The derivative of $$(4x - 2)/(x^2 + 1)$$ is:


 * $$\begin{align}

\frac{d}{dx}\left[\frac{(4x - 2)}{x^2 + 1}\right] &= \frac{(x^2 + 1)(4) - (4x - 2)(2x)}{(x^2 + 1)^2} \\ &= \frac{(4x^2 + 4) - (8x^2 - 4x)}{(x^2 + 1)^2} \\ &= \frac{-4x^2 + 4x + 4}{(x^2 + 1)^2} \end{align}$$

In the example above, the choices


 * $$g(x) = 4x - 2$$
 * $$h(x) = x^2 + 1$$

were made. Analogously, the derivative of $$\sin(x)/x^2$$ (when $$x$$ ≠ 0) is:


 * $$\frac{\cos(x) x^2 - \sin(x)2x}{x^4}$$

Another example is:


 * $$f(x) = \frac{2x^2}{x^3}$$

whereas $$g(x) = 2x^2$$ and $$h(x) = x^3$$, and $$g'(x) = 4x$$ and $$h'(x) = 3x^2$$.

The derivative of $$f(x)$$ is determined as follows:


 * $$f'(x) = \frac {\left(4x \cdot x^3 \right) - \left(2x^2 \cdot 3x^2 \right)} {\left(x^3\right)^2} = \frac{4x^4 - 6x^4}{x^6} = \frac{-2x^4}{x^6} = -\frac{2}{x^2}$$

This can be checked by using laws of exponents and the power rule:


 * $$f(x) = \frac{2x^2}{x^3} = \frac{2}{x} = 2x^{-1}$$
 * $$f'(x) = -2x^{-2} = -\frac{2}{x^2}$$

From Newton's difference quotient
Suppose $$f(x) = g(x)/h(x)$$ where $$h(x) \neq 0$$ and $$g$$ and $$h$$ are differentiable.
 * $$f'(x) = \lim_{\Delta x \to 0} \frac{f(x + \Delta x)- f(x)}{\Delta x} = \lim_{\Delta x \to 0} \frac{\frac{g(x + \Delta x)}{h(x + \Delta x)} - \frac{g(x)}{h(x)}}{\Delta x}$$

We pull out the $$1/\Delta x$$ and combine the fractions in the numerator:
 * $$= \lim_{\Delta x \to 0} \frac{1}{\Delta x} \left(\frac{g(x+\Delta x)h(x)-g(x)h(x+\Delta x)}{h(x)h(x+\Delta x)} \right)$$

Adding and subtracting $$g(x)h(x)$$ in the numerator:
 * $$= \lim_{\Delta x \to 0} \frac{1}{\Delta x} \left( \frac{(g(x+\Delta x)h(x)-g(x)h(x)-g(x)h(x+\Delta x)+g(x)h(x)}{h(x)h(x+\Delta x)} \right)$$

We factor this and multiply the $$1/\Delta x$$ through the numerator:
 * $$= \lim_{\Delta x \to 0} \frac{\frac{g(x+\Delta x)-g(x)}{\Delta x}h(x)-g(x)\frac{h(x+\Delta x)-h(x)}{\Delta x}}{h(x)h(x+\Delta x)}$$

Now we move the limit through:
 * $$= \frac{\lim_{\Delta x \to 0} \left(\frac{g(x+\Delta x)-g(x)}{\Delta x}\right)h(x) - g(x) \lim_{\Delta x \to 0} \left(\frac{h(x+\Delta x)-h(x)}{\Delta x}\right)}{h(x)h(\lim_{\Delta x \to 0} (x+\Delta x))}$$

By the definition of the difference quotient, the limits in the numerator are derivatives, so we have:
 * $$= \frac{g'(x)h(x) - g(x)h'(x)}{[h(x)]^2}$$

From the product rule

 * Suppose $$f(x) = \frac{g(x)}{h(x)}$$


 * $$g(x) = f(x)h(x) \mbox{ } \,$$


 * $$g'(x)=f'(x)h(x) + f(x)h'(x)\mbox{ } \,$$

The rest is simple algebra to make $$f'(x)$$ the only term on the left hand side of the equation and to remove $$f(x)$$ from the right side of the equation.


 * $$f'(x)=\frac{g'(x) - f(x)h'(x)}{h(x)} = \frac{g'(x) - \frac{g(x)}{h(x)}\cdot h'(x)}{h(x)}$$


 * $$f'(x)=\frac{g'(x)h(x) - g(x)h'(x)}{\left(h(x)\right)^2}$$

Alternatively, we can just apply the product rule directly, without having to use substitution:
 * $$f(x) = \frac{g(x)}{h(x)} = g(x) [h(x)]^{-1} $$

Followed by using the chain rule to differentiate $$h(x)^{-1}$$:
 * $$f'(x) = g'(x) [h(x)]^{-1} + g(x) (-1) [h(x)]^{-2} h'(x) = \frac{g'(x) h(x) - g(x) h'(x)}{[h(x)]^2}$$

Using the Chain Rule
Consider the identity

$$ \frac{u}{v}\; =\; \frac{1}{4}\left[ \left( u+\frac{1}{v} \right)^{2}-\; \left( u-\frac{1}{v} \right)^{2} \right]$$

Then

$$\frac{d\left( \frac{u}{v} \right)}{dx}\; =\; \frac{d}{dx}\frac{1}{4}\left[ \left( u+\frac{1}{v} \right)^{2}-\; \left( u-\frac{1}{v} \right)^{2} \right]$$

Leading to

$$\frac{d\left( \frac{u}{v} \right)}{dx}\; =\; \frac{1}{4}\left[ 2\left( u+\frac{1}{v} \right)\left( \frac{du}{dx}-\frac{dv}{v^{2}dx} \right)-\; 2\left( u-\frac{1}{v} \right)\left( \frac{du}{dx}+\frac{dv}{v^{2}dx} \right) \right]$$

Multiplying out leads to

$$\frac{d\left( \frac{u}{v} \right)}{dx}\; =\; \frac{1}{4}\left[ \frac{4}{v}\frac{du}{dx}-\frac{4u}{v^{2}}\frac{dv}{dx} \right]$$

Finally, taking a common denominator leaves us with the expected result

$$\frac{d\left( \frac{u}{v} \right)}{dx}\; =\; \frac{\left[ v\frac{du}{dx}-u\frac{dv}{dx} \right]}{v^{2}}$$

By total differentials
An even more elegant proof is a consequence of the law about total differentials, which states that the total differential,
 * $$dF = \frac{\partial F}{\partial x} dx + \frac{\partial F}{\partial y} dy + \frac{\partial F}{\partial z} dz + ...$$

of any function in any set of quantities is decomposable in this way, no matter what the independent variables in a function are (i.e., no matter which variables are taken so that they may not be expressed as functions of other variables). This means that, if N and D are both functions of an independent variable x, and $$F = N(x)/D(x)$$, then it must be true both that
 * (*) $$dF = \frac{\partial F}{\partial x}dx$$

and that
 * $$dF = \frac{\partial F}{\partial N}dN + \frac{\partial F}{\partial D}dD$$.

But we know that $$dN = N'(x) dx$$ and $$dD = D'(x) dx$$.

Substituting and setting these two total differentials equal to one another (since they represent limits which we can manipulate), we obtain the equation
 * $$\frac{\partial F}{\partial x} dx = \frac{\partial F}{\partial N}N'(x) dx + \frac{\partial F}{\partial D}D'(x) dx$$

which requires that
 * (#) $$\frac{\partial F}{\partial x} = \frac{\partial F}{\partial N}N'(x) + \frac{\partial F}{\partial D}D'(x)$$.

We compute the partials on the right:
 * $$\frac{\partial F}{\partial N} = \frac{\partial (N/D)}{\partial N} = \frac{1}{D}$$;
 * $$\frac{\partial F}{\partial D} = \frac{\partial (N/D)}{\partial D} = -\frac{N}{D^2}$$.

If we substitute them into (#),
 * $$\frac{\partial F}{\partial x} = \frac{N'(x)}{D(x)} - \frac{N(x) D'(x)}{D(x)^2}$$
 * $$\frac{\partial F}{\partial x} = \frac{D(x)N'(x)}{D(x)^2} - \frac{N(x) D'(x)}{D(x)^2}$$

which gives us the quotient rule, since, by (*),
 * $$\frac{dF}{dx} = \frac{\partial F}{\partial x}$$.

This proof, of course, is just another, more systematic (even if outmoded) way of proving the theorem in terms of limits, and is therefore equivalent to the first proof above - and even reduces to it, if you make the right substitutions in the right places. Students of multivariable calculus will recognize it as one of the chain rules for functions of multiple variables.

Mnemonic
It is often memorized as a rhyme type song. "lo-dee-hi less hi-dee-lo, draw the line and square below"; Lo being the denominator, Hi being the numerator and "dee" being the derivative. Another variation to this mnemonic is given when the quotient is written with the numerator as Hi the denominator as Ho: "Ho-dee-Hi minus Hi-dee-Ho all over Ho-Ho." A third variation is "Low-dee-high minus high-dee-low, all over the square of what's below". A fourth variation, similar to the first is "bottom d top minus top d bottom over the bottom squared". Here top is the numerator, bottom the denominator, and d meaning derivative. Yet another variation is "Lo-dee-Hi minus Hi-dee-Lo, square the bottom and away we go" where "Hi" is the numerator and "dee" is the variation.

Often, though, people will remember that the quotient rule is just like the product rule except for two things; the whole thing is divided by the square of the function from the denominator and the addition in the product rule is now changed to subtraction. Most people remember that the product rule is "the derivative of one function times the original of the other plus vice versa," and since it is addition, the order of the addends does not matter. However, with the quotient rule, subtraction now makes that order matter very much, and remembering that order is usually the "sticking point" for most people. Thinking of the numerator function as coming first, with the denominator function following it, yields the following mnemonic: derivative of the numerator times original of the denominator minus original of the numerator times derivative of the denominator, or derivative times original minus original times derivative, or do - od, or dood.