# How to Think About the Product and Quotient Rules

Last time, we considered the Chain Rule for derivatives. This time, we’ll look at the product and quotient rules, focusing on how to keep the formulas straight, and make them easier to apply. We’ll look primarily at the quotient rule to start with, and then examine the product rule at the end.

As taught in, say, Stewart’s Calculus, the product rule is $$\frac{d}{dx}\left(f(x)g(x)\right)=f(x)\frac{d}{dx}[g(x)]+g(x)\frac{d}{dx}[f(x)],$$

and the quotient rule is $$\frac{d}{dx}\left[\frac{f(x)}{g(x)}\right]=\frac{g(x)\frac{d}{dx}[f(x)]-f(x)\frac{d}{dx}[g(x)]}{[g(x)]^2}.$$

The latter, especially, is a little complicated. Can we make it easier to remember and to use?

## Solution 1: Use a mnemonic for the quotient rule

We’ll start with this question from 2002:

Quotient Function Mnemonic

I get really turned around when trying to factor or expand derivatives of quotient functions.

Help me to differentiate the following:

x/((x^2)-4)

Presumably, Ryan is getting the order of terms in the numerator wrong, which is a common issue.

Good evening, Ryan, and thanks for writing to Dr. Math.

This is a very easy mistake to make, and one that I made quite a few times myself when I was in Calculus. Remember that the derivative of the quotient function has the form

(f/g)' = [g*f' - f*g']/[g^2]

That is, $$\left(\frac{f}{g}\right)’=\frac{g\cdot f’-f\cdot g’}{g^2}$$ or $$\frac{d}{dx}\left(\frac{f(x)}{g(x)}\right)=\frac{g(x)\cdot\frac{df(x)}{dx}-f(x)\cdot\frac{dg(x)}{dx}}{g(x)^2}.$$

It’s even worse in words:

The derivative of the quotient of two functions

equals the denominator multiplied by the derivative of the numerator,

minus the numerator multiplied by the derivative of the denominator,

all divided by the denominator squared.

How can you remember what to differentiate where? Since it is a subtraction, the order matters!

However, it is much easier to remember

LOW DEE HIGH OVER HIGH DEE LOW OVER LOW SQUARED

where LOW is the denominator of the quotient and HIGH is the numerator. So we'll organize our functions, using your example:

LOW   x^2 - 4   DEE LOW  2x
HIGH  x         DEE HIGH 1

So we get

(LOW DEE HIGH - HIGH DEE LOW)/(LOW SQUARED)
= ((x^2-4) - x*2x) /(x^2-4)^2
= (x^2 - 4 - 2x^2) / (x^2-4)^2
= (-x^2 - 4) / (x^2 - 4)^2

And there we go.  I hope this mnemonic device works for you.

I’ve heard many students recite this mnemonic, which is taught in their classes. Here is how a textbook we use (Briggs) puts it: $$\frac{LoD(Hi)-HiD(Lo)}{(Lo)^2}$$

I personally have trouble memorizing things like this, even when it is tied to a relatively familiar phrase (“hi-de-ho!”) – does it start with that, or end with that? I think it only works if you recite it often. So I like a couple other tricks.

Beyond the mnemonic, notice how he organizes the work, first writing each function and its derivative, and then putting them in place. I’ll do that again below.

## Solution 2: Rethink the formula

Although I couldn’t find this in any old answers, what I myself do is to change the order of factors just a little, and make the product rule consistent with that, in order to strengthen the hold of the pattern on my mind: I find meaningful, or at least consistent, patterns far more memorable and useful than arbitrary memorization.

My version of the quotient rule is $$\left(\frac{f}{g}\right)’=\frac{f’\cdot g-f\cdot g’}{g^2}.$$

What I’ve done is to swap the order in the first term, so that rather than multiply a function times a derivative in each term, each term has f followed by g (top, then bottom), and we differentiate the first first, and the second second. So everything is first-then-second: derivative of top times bottom, minus top times derivative of bottom.

But I do more than that, by connecting it to the product rule. There, order doesn’t matter, since we’re adding, rather than subtracting; it’s just the sum of each factor times the derivative of the other. Since this order is arbitrary, I choose to remember that rule in a form that agrees with the required order for the quotient rule: $$\left(fg\right)’=f’\cdot g+f\cdot g’.$$

So I always differentiate the first (top or left) function first and the second (bottom or right) function second, and always keep the functions in the same order.

Now, I just checked several recent calculus books on my shelf, and found that they all give the quotient rule in the order we see in the questions and answers here, namely $$\left(\frac{f}{g}\right)’=\frac{g\cdot f’-f\cdot g’}{g^2},$$ while giving the product rule either in my form or as $$\left(fg\right)’=f\cdot g’+g\cdot f’$$ (or both). This latter form is why I used to get tangled up: The product rule differentiated the second function first, while the quotient rule differentiates the first function first. My formulation maintains consistency, which my mind likes a lot!

One book I have (Larson) gives my version of the product rule as an alternative, where the functions are kept in the same order, for a different reason. They comment that this is easier to extend to more than two factors: $$\left(fgh\right)’=f’\cdot g\cdot h+f\cdot g’\cdot h+f\cdot g\cdot h’.$$ (All three functions stay in the same order, and we differentiate each in turn.) My version of the quotient rule thus ties in with what may be the better form of the product rule anyway.

Furthermore, I see that Wikipedia (at least currently) writes both the product rule and the quotient rule my way. So I may be onto something. Also, the 1998 Foerster book (Calculus: Concepts and Applications) that was mentioned last week (which I have on a more distant shelf) agrees with me. It expresses the formulas as $$\left(uv\right)’=u’\cdot v+u\cdot v’$$ and $$\left(\frac{u}{v}\right)’=\frac{u’\cdot v-u\cdot v’}{v^2}.$$

Let’s use this formulation for the example in the previous section, $$f(x)=\frac{x}{x^2-4}$$:

$$u=x,\;\;u’=1\\v=x^2-4,\;\;\;\;v’=2x$$ $$f'(x)=\frac{u’\cdot v-u\cdot v’}{(x^2-4)^2}\\=\frac{1\cdot(x^2-4)-x\cdot(2x)}{(x^2-4)^2}\\=\frac{x^2-4-2x^2}{(x^2-4)^2}=\frac{-x^2}{(x^2-4)^2}$$

## Solution 3: Skip the quotient rule if you prefer

Next, from 1995:

Deriving the Quotient Rule

Hi!
I'm a Swedish student at Chalmers and my math problem is: how do I prove this derivation?

(f/g)' = gf'-fg'/ g^2

This is a request for a proof, not for a method, but I’m going to take it further. (Note that this student likely used the word “derivation” meaning “differentiation”, but in fact we are going to derive the rule – these words confuse a lot of students!)

Hello!

You know, I don't think this is a dumb question at all!  This stuff can be really tough and scary the first time you see it.

I think the easiest way to do this derivation is to write f/g as f*g^(-1). Then you can use the product rule and the power rule to get the answer.  In fact, since the quotient rule (what you're trying to derive) is kind of hard to remember, I usually end up re-deriving this every time I want to use it or teach it to someone.

Good luck!

We’ll see the actual proof in a moment, but let’s do it for a specific quotient first, which is what I often do when a quotient can be easily rewritten as a product. For example, suppose we have to differentiate $$h(x)=\frac{\sin(x)}{x}$$. If we use the quotient rule, we get

$$\frac{d}{dx}\left(\frac{\sin(x)}{x}\right)=\frac{\frac{d}{dx}\sin(x)\cdot x-\sin(x)\cdot\frac{d}{dx}x}{x^2}=\frac{x\cos(x)-\sin(x)}{x^2}.$$

If we either aren’t sure of the order, we can do it this way:

$$\frac{d}{dx}\left(\frac{\sin(x)}{x}\right)=\frac{d}{dx}\left(\sin(x)\cdot x^{-1}\right)\\=\frac{d}{dx}\sin(x)\cdot x^{-1}+\sin(x)\cdot\frac{d}{dx}x^{-1}\\=\cos(x)\cdot x^{-1}+\sin(x)\cdot-x^{-2}\\=\frac{\cos(x)}{x}-\frac{\sin(x)}{x^2}.$$

This is equivalent to the first answer.

It’s even easier when the function to be differentiated is, say, $$h(x)=\frac{5}{x}$$, so that the top function is just a constant, and even the product rule is not needed. I often see students reflexively use the quotient rule, when they just have to do this: $$h'(x)=\frac{d}{dx}\left(5x^{-1}\right)=5\cdot-x^{-2}=\frac{-5}{x^2}$$

## Using the product rule to prove the quotient rule

Now let’s use the same approach to prove the formula. This is from 2001:

Chain Rule: Prove the Quotient

I've been asked to prove the quotient where u/v is uv^-1 using the product rule and the chain rule for (dv^-1/dx

I get this far:

v^-1*(du/dx)+u(dv^-1/dx)

but I don't know how to use the chain rule to to find dv^-1/dx and then convert it all into the quotient rule. Could you help by giving me a step-by-step guide to the answer?

Thank you!

I answered, making the (correct) work shown a little more readable, and continuing:

Hi, David.

You applied the product rule to u * v^-1 and got

d/dx (u * v^-1) = v^-1 * du/dx + u * d(v^-1)/dx

Now you have to apply the chain rule to find d(v^-1)/dx. You might find this clearer if you define a new variable

w = v^-1

The chain rule says

dw/dx  = dw/dv * dv/dx

Since dw/dv = -v^-2, this gives

d(v^-1)/dx = -v^-2 * dv/dx

You should be able to finish the work. If not, write back and show again how far you got.

Using a temporary variable can often help with complicated chain rule problems, as we saw last time, though it is not necessary.

Here’s the actual proof (using my preferred order):

$$\frac{d}{dx}\left(\frac{u}{v}\right)=\frac{d}{dx}\left(uv^{-1}\right)\\=\frac{du}{dx}\cdot v^{-1}+u\frac{d}{dx}\left(v^{-1}\right)\\=\frac{du}{dx}\cdot v^{-1}+u\left(-v^{-2}\right)\frac{dv}{dx}\\=\frac{\frac{du}{dx}}{v}-\frac{u\frac{dv}{dx}}{v^2}\\=\frac{\frac{du}{dx}v}{v^2}-\frac{u\frac{dv}{dx}}{v^2}\\=\frac{\frac{du}{dx}v-u\frac{dv}{dx}}{v^2}$$

## Putting it together

Now let’s apply the rule, in this question from 1998:

When to Use the Chain and Quotient Rules

Hi, I'm doing a maths subject called "Introductory Calculus" and learning about the various forms of differentiation. I've come across such questions as:

Differentiate:

(2x + 1)^2
f(x) = ----------
2x + 4

In situations like this, do I use the quotient rule first or the chain rule first?

Hello Matthew,

In the specific example that you give, you begin by recognizing that the function is a rational function - it looks like a fraction with a variable in the denominator (the bottom).

Because you are looking for the first derivative of a rational function, you begin by applying the quotient rule first. As you apply the quotient rule, you encounter a term in the numerator with a power.  So what happens here is that you end up applying the chain rule in the process of doing the quotient rule.

The basic principle, as we saw last time, is that you can work “from the outside in”, differentiating the last operation in the expression (the “outside function”), and using whatever rules are needed as you come to them. The new thing is that this applies not only to functions, but to operations, which are essentially functions of two variables. We could picture the problem like this, using the boxes from last time:

$$\require{AMSmath}f(x)=\boxed{\frac{\boxed{\left(\boxed{2x+1}\right)^2}}{\boxed{2x+4}}}$$

Since the last operation performed in evaluating this is a division, you first apply the rule for division.

He gave two examples involving different orders, the first looking like the given problem, and the second being different, in order to demonstrate the idea more thoroughly (and also leave Matthew to do his own homework!).

Consider the two functions below:

(4x - 5)^3                            ( (4x - 5) )^3
(I) g(x) = -----------      and     (II) h(x) =  (----------)
(5 + 3x)                             ( (5 + 3x) )

In (I) above, the exponent is part of the term in the numerator (top).  The exponent does not go with the term in the denominator.

In (II) above, the exponent is on the outside of the entire fraction, which means that it actually belongs to the numerator (top) and the denominator (bottom) because:

( (4x - 5) )^3    (4x - 5)^3
h(x) = (----------)    = ----------
( (5 + 3x) )      (5 + 3x)^3

So in I, the last operation performed is the division, while in II, the last operation is the exponentiation, so we start with that.

In (II) you would apply the chain rule first, since the exponent goes with the numerator and the denominator. Then you would do the quotient rule on the rational function inside. Alternatively, you could put the exponent with the numerator and the denominator then apply the quotient rule first, since you now have a rational function, but then you would have to use the chain rule twice.

That is, we could choose to rewrite it as he showed, though we don’t actually do that.

Here’s the work for II, with the exponent on the outside:

$$h(x)=\boxed{\left(\boxed{\frac{\boxed{4x-5}}{\boxed{5-3x}}}\right)^3}$$

$$h'(x)=3\left(\,\boxed{\frac{\boxed{4x-5}}{\boxed{5-3x}}}\,\right)^2\cdot\boxed{\frac{\boxed{4x-5}}{\boxed{5-3x}}}\,’\\ =3\left(\,\boxed{\frac{\boxed{4x-5}}{\boxed{5-3x}}}\,\right)^2\cdot\frac{\boxed{4x-5}\,’\cdot\boxed{5-3x}-\boxed{4x-5}\cdot\boxed{5-3x}\,’}{\left(\boxed{5-3x}\right)^2}\\ =3\left(\frac{4x-5}{5-3x}\right)^2\cdot\frac{4\left(5-3x\right)-\left(4x-5\right)\cdot-3}{\left(5-3x\right)^2}\\ =3\frac{\left(4x-5\right)^2}{\left(5-3x\right)^2}\cdot\frac{5}{\left(5-3x\right)^2}\\ =\frac{15\left(4x-5\right)^2}{\left(5-3x\right)^4}$$

In practice, I would work out the derivatives of the numerator and the denominator off to the side, rather than as part of the whole expression, and start writing at the third line of the work.

In (I) you would apply the quotient rule first since you have a rational function, and then do the chain rule on the part that involves the exponent.

I hope this helps you distinguish the order a little better. Have fun differentiating!

Here’s the work for I, with the exponent inside the numerator:

$$g(x)=\boxed{\frac{\boxed{\left(\boxed{4x-5}\right)^3}}{\boxed{5-3x}}}$$

$$g'(x)=\frac{\boxed{\left(\,\boxed{4x-5}\,\right)^3}\,’\cdot\left(\boxed{5-3x}\right)-\boxed{\left(\,\boxed{4x-5}\,\right)^3}\,\cdot\boxed{5-3x}\,’}{\left(\,\boxed{5-3x}\,\right)^2}\\ =\frac{3\left(\,\boxed{4x-5}\,\right)^2\cdot\boxed{4x-5}\,’\cdot\left(5-3x\right)-\left(\,\boxed{4x-5}\,\right)^3\cdot\left(-3\right)}{\left(\,\boxed{5-3x}\,\right)^2}\\ =\frac{3\left(4x-5\right)^2\cdot4\cdot\left(5-3x\right)+3\left(4x-5\right)^3}{\left(5-3x\right)^2}\\=\frac{3\left(4x-5\right)^2\left(20-12x+4x-5\right)}{\left(5-3x\right)^2}\\=\frac{3\left(4x-5\right)^2\left(15-8x\right)}{\left(5-3x\right)^2}$$

Here again, the boxes represent where I would be focusing as I wrote each part of the work, not something I would actually write. Some instructors tell you to stop before simplifying, so they can grade a problem just on the actual calculus; because many students would miss the idea of factoring in order to simplify (as I almost did here). But it’s very useful practice!

## Proofs (and visual insight) for the product and quotient rules

We can close by looking inside the product rule, from 2002:

Proof of Product and Quotient Rules

I would like to know how the product rule and the quotient rule came about so I can better understand calculus. I have been to the math tutors and they don't know.

Thank you,
Theron

I answered by starting with a proof:

Hi, Theron.

Let's try using the definition of the derivative, and see what happens:

Suppose we have two differentiable functions f and g, and we have defined a new function p(x) = f(x) * g(x). Its derivative will be

p(x+h) - p(x)       f(x+h)g(x+h) - f(x)g(x)
p'(x) = lim ------------- = lim -----------------------
h->0       h        h->0            h

Here we’re applying the definition of the derivative to p, and then using the definition of p to write it as a product.

I'd like to get this to include something that looks like the definition of f'; I'll try adding and subtracting an intermediate term:
_______________________
/                       \
f(x+h)g(x+h) - f(x)g(x+h) + f(x)g(x+h) - f(x)g(x)
= lim -------------------------------------------------
h->0                         h

That lets me factor something out of each pair:

[f(x+h) - f(x)]g(x+h) - f(x)[g(x+h) - g(x)]
= lim -------------------------------------------
h->0                     h

f(x+h) - f(x)               g(x+h) - g(x)
= lim [------------- g(x+h) - f(x) -------------]
h->0        h                           h

A little magic with the limits (which has to be proven valid), and we get

f(x+h) - f(x)                               g(x+h) - g(x)
= lim ------------- * lim g(x+h) - lim f(x) * lim -------------
h                                           h

= f'(x) g(x) - f(x) g'(x)

We've got it!

It’s not really magic, just a theorem that the limit of a product is equal to the product of the limits, if they exist.

Theron asked not primarily for a proof, but for understanding. Can we get that from the proof?

Now let's look at what this means. Suppose the length of a rectangle is varying with time according to a function f(t), and the width is g(t). During a small time interval from t to t+dt, how has the area f(t)g(t) changed?

g(t)    g'(t) dt
+--------------+---+
|              |   |
|              |   |
|              |   |f(t)
|              |   |
|              |   |
+--------------+---+
|              |   |f'(t) dt
+--------------+---+

As shown, we can approximate the change in f(t) by f'(t) dt, and the change in g(t) by g'(t) dt. The change in the area fg consists of the two long rectangles and the little square:

fg'dt + f'gdt + f'g'dt^2

Divide this by dt, and we have

fg' + f'g + f'g'dt

The small lengths in the picture are differentials, which approximate the actual changes in $$f(t)$$ and $$g(t)$$. I changed the independent variable to t to avoid any sense that x might be the horizontal variable.

Since dt is very small, we can ignore the contribution from the tiny square, and the derivative is fg' + f'g. That's not a formal proof, but it gives a feel for what is happening. Stare at the picture for a while, and you'll see why each derivative is multiplied by the other function, and why there are two terms added together.

+--------------+---+
|              |   |
|              |   |
|      fg      |f'g|
|              |   |
|              |   |
+--------------+---+
|      fg'     |
+--------------+

This is actually where the product rule came from – before we had formal concepts of limits, differentials and hand-waving were standard in calculus.

To get the quotient rule, just apply the product rule to

q(x) = f(x) [1/g(x)]

using the chain rule to find the derivative of 1/g(x) = g(x)^-1.

That’s the derivation we saw above.

### 1 thought on “How to Think About the Product and Quotient Rules”

This site uses Akismet to reduce spam. Learn how your comment data is processed.