 Path:  physics insights > basics > Calculus >

## The Product Rule

On this page we'll be looking at the product rule, or the Leibniz rule as it's more eruditely called.  As usual our goal is to visualize it.  We'll also be looking at the complementary rule for integration: integration by parts.

Though our goal on this page is to present a visual motivation for the rule, it's also easy to derive algebraically, and we will start with that.

### 1. The Algebraic Approach

We're given the product of two functions, u(x) and v(x).  We want to find the derivative.

We start with the difference in their product as u and v increase:

(1.1) Multiplying it out,

(1.2) We take the limit, letting Δu and Δv approach zero; their second order product, Δu ⋅ Δv, vanishes.  Replacing Δu and Δv with du and dv, we write the limit in terms of our beloved sloppy infinitesimals:

(1.3) And finally, dividing through by dx, we obtain the derivative:

(1.4) ### 2. Visualizing the Product of Two Functions

 Figure 1:  Change in u⋅v In fact, we've dealt with this exact problem, when we tried to visualize x2, here.  From the point of view of finding the derivative, the only significant difference between x2 and u(x)⋅v(x) is that u and v are not generally the same value, so the area they form is not necessarily a square.

We've borrowed our image from the discussion of the derivative of x2 and modified it slightly (mostly by making it a rectangle rather than a square) to produce figure 1, to the right.  And that's really all there is to it.

The conclusion from the image is, of course, the same as the conclusion we arrived at algebraically.  A few things should be emphasized.

1. The term v⋅δu is the product of the small change in u, with the length of one face of the rectangle.

2. The second term, u⋅δv, is present because we're growing the square along two axes.  That term is product of the small change in v, with the length of the other face along which the rectangle is growing.
If the rectangle has its lower left corner at the origin, then the faces which lie along the vertical line passing through (v,0) and the horizontal line which passes through (0,u) have shifted outward by δv and δu, respectively.
In other words, for each pair of faces (of which the square has two), we've moved one face out.  The square has two pairs of faces; the derivative has one term for each pair of faces.

3. The piece shown as "second order" in figure 1, which is the fragment in the upper right corner, is second order in δx.  As we shrink δx (and consequently δu and δv) down to an infinitesimal size, the second order term essentially vanishes, since it's a factor of δu (or δv) smaller than the two rectangles of size uδv and vδu.  Consequently, we can ignore it.  To put it another way, when we're finding a derivative we only care about the first order (linear) behavior of the function.

### 3. Integration by Parts, treated algebraically

If we're trying to integrate the product of two functions, and we know the integral of one of them, then we can do that part of the problem by itself, and (hopefully) reduce the complexity of the problem as a whole.  That's what "integration by parts" is; we integrate one part of the problem at a time.  Suppose we're integrating v(x)⋅w(x), and we know that u'(x) = w(x); then we can do this:

(3.1) To derive this from the product rule, we start with equation (1.4), above.  We multiply both sides by dx, so we have an equation of differentials:

(3.2) And we put integral signs on both sides:

(3.3) Evaluate the integral on the left side, rearrange things a bit, and we're done.

(3.4) A tad opaque but you can't beat it for conciseness, and it highlights the fact that it's just the product rule run backwards.

### 4. Integration by Parts, Presented Visually for Monotonic Increasing Functions

 Figure 2: Integration by Parts The approach we're going to take is the simple one of just drawing the integral as an area under a curve.  The general case of integration by parts may prove awkward, but there's one case where it's simple.  Given

(4.1) If u(x) is monotonic, then it's also invertible.  In that case, we can treat v as a function of u by composing it with u-1:

(4.2) where we've replaced v with V to emphasize that V is defined on the range of u rather than on the original domain of v.

If V, also, is monotonic, and if both V and u are increasing functions, then the visualization is easy.  We picture V as a function of u, as shown in figure 2, and integrate V(u) from u0 to u1.  By "turning the graph on its side" we can equally well picture u as a function of V, and then integrate u(V) from V0 to V1.  The area of the large rectangle, minus the area of the small rectangle, is the region covered by the two integrals.  So, we can see:

(4.3) And that is all there is to it in this case.

### 5. When V(u) is Monotonic Decreasing

 Figure 3: Integration by parts, V(u) decreasing When V(u) is a monotonic decreasing function of u, the diagram is rather more complicated but still straightforward (figure 3).

As before, we have drawn vertical lines at u0 and u1 showing the bounds of the area of integration. We've also drawn horizontal lines at V0 and V1 which bound the area of integration when we're viewing the curve as a function of V.  The lines split the area under the curve into four pieces, A1, A2, A3, and A4.

By inspection, we see the lower rectangle -- areas 3 and 4 -- has height V1 and width u1, and hence has area u1⋅V1. Similarly, the left hand rectangle, made of areas 3 and 4, has area u0⋅V0.  In summary, we have:

(5.1) The minus sign on the last integral is due to the bounds of integration being "swapped", in that  V0 > V1.

Putting equations (5.1) together in pairs, we have:

(5.2) and finally we arrive at:

(5.3) which is identical to equation (4.3), for the "increasing" case.

### 6. When u is a Decreasing Function of x

If u is monotonic and decreasing, we can still invert it and treat V as a function of u.  Since u is running "right to left" as a function of x, u0 and u1 change places in the analysis.  The result is the same, however.  We're going to skip the details.

### 7. Non-Monotonic u and V

We can just slice the region of integration up into pieces on which u and V are monotonic, and since each of the segments has the same formula, the result will be the same.  If I feel inspired at some point, I may write out the actual sum and show it in detail.

Page created on 3/16/2018