Analysis

A rectangle cut by a curve

Integration by parts is taught as the product rule run backwards. It is also a picture: an increasing curve cuts a rectangle into two pieces, one of them the area under the curve and the other the area beside it, and the formula says only that the pieces fill the rectangle. Run repeatedly, the same cut produces the factorials and Wallis's product for π.

Worth reading first: Area is the undoing of slope · An endless region with a finite area.

The formula for integration by parts is usually introduced as a consequence of the product rule. If uu and vv are functions, then (uv)=uv+uv(uv)' = u'v + uv', and integrating both sides gives

udv+vdu=uv,\int u\,dv + \int v\,du = uv,

evaluated between the endpoints. It is then used as a manoeuvre: an integral that cannot be done is traded for one that can, by moving a derivative from one factor to the other.

That derivation is correct and it hides a picture that is simpler than the product rule. When vv is an increasing function of uu, the two integrals in the formula are two regions of the plane, and the formula says that together they fill a rectangle.

Integration by parts is a rectangle. The increasing curve v = u²/4 between u = 1 and u = 3. The region under it is shaded one way and the region between it and the vertical axis another; together they fill the rectangle from the origin to (3, 2.25) minus the rectangle to (1, 0.25).
Fig. 1 The curve v=u2/4v = u^2/4 from (1,0.25)(1, 0.25) to (3,2.25)(3, 2.25). The shaded region below it is vdu\int v\,du, and the region between it and the vertical axis is udv\int u\,dv. Together they fill the rectangle from the origin to (3,2.25)(3, 2.25), less the small rectangle to (1,0.25)(1, 0.25): 2.167+4.333=6.750.252.167 + 4.333 = 6.75 - 0.25.

The two regions a curve makes

Look at what each integral measures. vdu\int v\,du, taken from u0u_0 to u1u_1, is the area between the curve and the horizontal axis — the ordinary area under a graph, adding up vertical strips. udv\int u\,dv, taken from v0v_0 to v1v_1, is the same construction with the roles of the axes swapped: the area between the curve and the vertical axis, adding up horizontal strips.

For an increasing curve those two regions do not overlap, and together with the small rectangle in the corner they tile the big rectangle whose far corner is the curve’s endpoint. So

u0u1vdu+v0v1udv=u1v1u0v0.\int_{u_0}^{u_1} v\,du + \int_{v_0}^{v_1} u\,dv = u_1 v_1 - u_0 v_0.

That is the whole formula, and the picture proves it without any derivative. In the figure the region below the curve has area 2.1672.167, the region beside it 4.3334.333, and the difference of the two rectangles is 6.750.25=6.56.75 - 0.25 = 6.5, which is their sum. Both regions were measured by strips, independently, and the rectangle was not consulted.

What the formula does is visible too. If one of the two regions is hard to measure and the other is easy, the rectangle converts the easy one into the hard one. There is nothing more to integration by parts than that: the curve cuts a rectangle into two pieces, and knowing one piece and the rectangle is knowing the other.

The usual form, with uu and vv as functions of some third variable xx, is the same picture with the curve described parametrically. As xx runs from aa to bb the point (u(x),v(x))(u(x), v(x)) traces the curve, dv=v(x)dxdv = v'(x)\,dx, du=u(x)dxdu = u'(x)\,dx, and the formula becomes the familiar

abuvdx=[uv]ababvudx.\int_a^b u\,v'\,dx = \big[uv\big]_a^b - \int_a^b v\,u'\,dx.

The product rule is the same rectangle, growing

The picture and the product rule are not two proofs of one formula that happen to agree. They are the same observation at two scales.

Take the rectangle with sides uu and vv, and let both sides grow a little, uu by Δu\Delta u and vv by Δv\Delta v. The new rectangle is the old one plus three pieces: a strip of width Δu\Delta u and height vv down one side, a strip of height Δv\Delta v and width uu along the top, and a small corner of size ΔuΔv\Delta u\,\Delta v where the two strips meet. So

Δ(uv)=vΔu+uΔv+ΔuΔv.\Delta(uv) = v\,\Delta u + u\,\Delta v + \Delta u\,\Delta v.

Divide by the change in whatever uu and vv depend on and let the changes shrink. The corner is a product of two small quantities, so it vanishes faster than either strip, and what survives is the product rule, d(uv)=vdu+udvd(uv) = v\,du + u\,dv. It is the same corner that completing the square had to pay for — there it was the whole point, and here it is the part that disappears.

Now add up the growth all along the curve, from the small rectangle to the big one. The strips of the form vΔuv\,\Delta u are vertical slices under the curve, and they add up to vdu\int v\,du; the strips of the form uΔvu\,\Delta v are horizontal slices beside it, and they add up to udv\int u\,dv; the corners add up to nothing. The total growth is the big rectangle minus the small one. Integration by parts is the product rule summed, and the picture at the top of this essay is what the sum looks like when every strip has been laid in place.

The same accounting works with no limit at all. For two sequences, the change in a product ukvku_k v_k from one step to the next is exactly vkΔu+uk+1Δvv_k\,\Delta u + u_{k+1}\,\Delta v — the corner is absorbed by taking uu one step later — and adding over kk gives summation by parts, the discrete formula Abel used to control sums whose terms oscillate. In the picture the curve becomes a staircase and the two regions become two interlocking stacks of rectangles, and the corners, instead of vanishing, are exactly accounted for by the half-step shift. The same move turned the fundamental theorem into a telescoping sum, and it is no accident that it works here: both formulas are statements that differences add up to the change between endpoints.

The logarithm, measured from its side

The classic first example is the integral of lnx\ln x, which has no obvious antiderivative. The textbook trick writes lnx\ln x as lnx1\ln x \cdot 1 and integrates by parts. The picture does something more transparent.

Integration by parts is a rectangle. The increasing curve v = ln u between u = 1 and u = 3. The region under it is shaded one way and the region between it and the vertical axis another; together they fill the rectangle from the origin to (3, 1.0986) minus the rectangle to (1, 0).
Fig. 2 The curve v=lnuv = \ln u from (1,0)(1, 0) to (3,ln3)(3, \ln 3). The region under it, lnudu\int \ln u\,du, is the one that is hard to measure; the region to its left, udv=evdv\int u\,dv = \int e^v\,dv, is easy. They fill the rectangle 3×ln33 \times \ln 3, so the hard one is 3ln32=1.29583\ln 3 - 2 = 1.2958.

The region to the left of the logarithm is the region under the exponential, seen sideways, because u=evu = e^v describes the same curve with the axes swapped. The area under eve^v from 00 to ln3\ln 3 is eln31=2e^{\ln 3} - 1 = 2, which needs nothing but the fact that the exponential is its own derivative. So the area under the logarithm is the rectangle less 22: 3ln323\ln 3 - 2.

In general this gives the integral of any inverse function for free. If ff is increasing and its integral is known, then the integral of f1f^{-1} is a rectangle minus the integral of ff:

f(a)f(b)f1(y)dy=bf(b)af(a)abf(x)dx.\int_{f(a)}^{f(b)} f^{-1}(y)\,dy = b\,f(b) - a\,f(a) - \int_a^b f(x)\,dx.

The arcsine, the arctangent, the logarithm and every nn-th root are all inverse functions of things with easy integrals, and every one of their integrals comes out this way with no cleverness. The formula was published in this form by Charles-Ange Laisant in 1905, which is surprisingly late for something that is, in the picture, one rectangle and two pieces of it.

A rectangle the curve does not reach

The picture has a second use when the rectangle and the curve do not quite agree — and it produces an inequality that sits under a great deal of analysis.

Start both regions at the origin, with an increasing curve through (0,0)(0, 0). Take the region under the curve up to x=ax = a and the region beside it up to y=by = b, where bb is not necessarily the height the curve has at aa.

Two areas that fill a rectangle. The curve y = x² with the area under it from 0 to 1.2 shaded one way and the area to its left from 0 to 1.44 shaded another, against the rectangle 1.2 by 1.44. The two regions fill the rectangle exactly.
Fig. 3 The curve y=x2y = x^2, with the area under it up to x=1.2x = 1.2 and the area to its left up to y=1.44y = 1.44. Since 1.44=1.221.44 = 1.2^2 the curve passes exactly through the rectangle’s corner, and the two regions fill the 1.2×1.441.2 \times 1.44 rectangle with nothing over: 0.576+1.152=1.7280.576 + 1.152 = 1.728.

When b=f(a)b = f(a) the two regions meet at the corner and fill the rectangle exactly, which is the parts formula again. When bb is anything else, one region sticks out past the rectangle’s edge and the two together more than cover it.

Two areas that overfill a rectangle. The curve y = x² with the area under it from 0 to 1.5 shaded one way and the area to its left from 0 to 1.2 shaded another, against the rectangle 1.5 by 1.2. The regions overlap the rectangle's edge and together exceed it.
Fig. 4 The same curve with a=1.5a = 1.5 and b=1.2b = 1.2. The curve reaches height 2.252.25 at x=1.5x = 1.5, above the rectangle’s top, so the region under it pokes out of the rectangle; together the two regions have area 2.00142.0014 against the rectangle’s 1.81.8, and the excess is the sliver outside.

That is Young’s inequality: for any increasing ff with f(0)=0f(0) = 0,

ab0af(x)dx+0bf1(y)dy,ab \le \int_0^a f(x)\,dx + \int_0^b f^{-1}(y)\,dy,

with equality exactly when b=f(a)b = f(a). The proof is the second figure: the rectangle is covered by the two regions, sometimes with overlap to spare, never with a gap.

Choosing f(x)=xp1f(x) = x^{p-1} turns it into the version that gets used. The two areas are ap/pa^p/p and bq/qb^q/q, where 1/p+1/q=11/p + 1/q = 1, so abap/p+bq/qab \le a^p/p + b^q/q. For p=q=2p = q = 2 that is the elementary fact that ab(a2+b2)/2ab \le (a^2 + b^2)/2, the gap between the arithmetic and geometric means; for other exponents it is the inequality from which Hölder’s inequality follows, and Hölder’s inequality is the tool that bounds the size of a product by the sizes of its factors throughout analysis — including the Cauchy–Schwarz inequality as the case p=2p = 2, and the pairing of exponents pp and qq is the same duality that turns circles into diamonds and squares. A good deal of analysis rests on one rectangle that a curve either fills or overfills.

The factorials are areas

Integration by parts earns its reputation when it is applied repeatedly, and the first example is the one Euler used to extend the factorial beyond the whole numbers.

Consider the area under xnexx^n e^{-x} over the whole half-line. For n=0n = 0 it is the area under exe^{-x}, which is 11. For larger nn, integrate by parts with u=xnu = x^n and dv=exdxdv = e^{-x}\,dx: the boundary term [xnex][-x^n e^{-x}] vanishes at both ends, and what remains is

0xnexdx=n0xn1exdx.\int_0^\infty x^n e^{-x}\,dx = n \int_0^\infty x^{n-1} e^{-x}\,dx.

Each area is nn times the one before. Starting from 11, the areas are 1,1,2,6,24,120,1, 1, 2, 6, 24, 120, \dots — the factorials.

Areas that are factorials. The curves xⁿe^(−x) for n from 0 to 4, each rising to a peak at x = n and falling away. Their areas are 1, 1, 2, 6, 24 — the factorials — and a label gives each.
Fig. 5 The curves xnexx^n e^{-x} for n=0n = 0 to 44, each rising to a peak at x=nx = n and falling away. Their areas, measured by strips, are 1,1,2,6,241, 1, 2, 6, 24, and the measurement continued to n=7n = 7 gives 120,720,5040120, 720, 5040 — each exactly nn times the one before.

The picture shows why the recurrence is plausible before any formula. Each curve peaks further to the right and higher than the last, and its area is dominated by the region around the peak at x=nx = n, where the height is nnenn^n e^{-n}. That peak height times a width of about 2πn\sqrt{2\pi n} is roughly the area — which is Stirling’s approximation read off the curve, and the width comes from treating the peak as a bell, exactly as every bell’s area comes from one number.

What the area formulation adds is that it makes sense when nn is not a whole number. The area under x1/2exx^{1/2} e^{-x} is perfectly definite, and so the factorial of one half exists; it turns out to be π/2\sqrt\pi/2, a consequence of the bell’s area. The function defined this way — shifted by one, for historical reasons — is Euler’s gamma function, Γ(s)=0xs1exdx\Gamma(s) = \int_0^\infty x^{s-1} e^{-x}\,dx, and the recurrence Γ(s+1)=sΓ(s)\Gamma(s + 1) = s\,\Gamma(s) is the one integration by parts produced above, now valid for every positive ss. The requirement that the region have finite area is the threshold for improper integrals applied at the end near zero, where xs1x^{s-1} blows up exactly when s0s \le 0.

π from powers of a sine

The second classic repetition produces π\pi as an infinite product, and it is the same move with a different pair of functions.

Let InI_n be the area under sinnx\sin^n x over a quarter turn, from 00 to π/2\pi/2. Integrating by parts once — splitting sinnx\sin^n x as sinn1xsinx\sin^{n-1}x \cdot \sin x and using cos2=1sin2\cos^2 = 1 - \sin^2 — gives

In=n1nIn2.I_n = \frac{n-1}{n}\, I_{n-2}.

With I0=π/2I_0 = \pi/2 and I1=1I_1 = 1, every InI_n follows: the even ones are π/2\pi/2 times a fraction and the odd ones are fractions alone.

Powers of a sine, and the product they hide. The curves sinⁿx over a quarter turn for n = 0 to 6, each lower than the last except at the right-hand end, where all reach 1. Their areas fall as 1.571, 1.000, 0.785, 0.667, 0.589, 0.533, 0.491.
Fig. 6 The curves sinnx\sin^n x over a quarter turn for n=0n = 0 to 66, each lying below the last except at the right-hand end where all reach 11. Their areas are 1.5708,1,0.7854,0.6667,0.5890,0.5333,0.49091.5708, 1, 0.7854, 0.6667, 0.5890, 0.5333, 0.4909, each (n1)/n(n-1)/n times the one two before. Rearranged, the ratios give Wallis’s product for π/2\pi/2.

Now use the ordering the picture displays. Every curve lies below the one before, so the areas decrease: I2n+1I2nI2n1I_{2n+1} \le I_{2n} \le I_{2n-1}. Divide through by I2n+1I_{2n+1}; the right-hand ratio I2n1/I2n+1=(2n+1)/(2n)I_{2n-1}/I_{2n+1} = (2n+1)/(2n) tends to 11, so the ratio of the even area to the odd one is squeezed to 11 as well. Writing that ratio out with the recurrence and solving for π\pi gives

π2=221344356657,\frac{\pi}{2} = \frac{2 \cdot 2}{1 \cdot 3} \cdot \frac{4 \cdot 4}{3 \cdot 5} \cdot \frac{6 \cdot 6}{5 \cdot 7} \cdots,

John Wallis’s product of 1656. After ten factors it is 1.533851.53385; after a thousand, 1.5704041.570404, still short of π/2=1.570796\pi/2 = 1.570796 — the partial products approach from below and the error after NN factors is about π/(8N)\pi/(8N), which is slow. Wallis found it by a long process of interpolation that he could not justify; the argument by areas is Euler’s, and it needs only the recurrence and the fact that the curves are nested.

There is a connection hiding here that is worth pointing out. Wallis’s product and Stirling’s formula are two views of one fact. The constant 2π\sqrt{2\pi} in Stirling’s formula can be derived from Wallis’s product, and historically that is how de Moivre and Stirling pinned it down: de Moivre had the formula for n!n! with an unknown constant, and Stirling identified the constant as 2π\sqrt{2\pi} from Wallis. The powers of a sine over a quarter turn and the areas under xnexx^n e^{-x} are both computed by integrating by parts, and they meet at the same π\pi.

What the rectangle requires

The picture has a hypothesis the formula does not, and it is worth seeing where it breaks.

The rectangle argument needs the curve to be increasing, so that the region under it and the region beside it do not overlap. If the curve rises and then falls, the region beside it is traced twice — once on the way up and once on the way down, with opposite signs — and “the area between the curve and the vertical axis” has to be read as a signed quantity. The formula survives, because it is proved by the product rule and the product rule does not care about monotonicity; the picture needs the signs put in by hand.

Neither of the repeated applications, the factorials and the sine powers, is a single rectangle at all. Each step of the recurrence is one application of the formula to a different pair of functions, and a picture of the step would be a different rectangle for each. What the figures show instead is the outcome — the sequence of areas and the pattern among them — and the recurrence is the reason for the pattern, stated in the text rather than drawn.

What the pictures cannot show

Boundary terms that vanish at infinity. The factorial calculation throws away [xnex]0[-x^n e^{-x}]_0^\infty because it is zero at both ends, and the zero at infinity is a statement about a limit — that exe^{-x} eventually beats every power — which no figure of finite width can display. The curves in the factorial figure visibly approach the axis by x=12x = 12; that they stay there, and faster than xnx^n grows, is taken from the exponential’s properties, not from the drawing.

Which choice of parts works. Integration by parts is a choice — which factor to differentiate and which to integrate — and a bad choice makes the problem worse rather than better. The rectangle shows why the formula is true for any split; it gives no hint of which split will help. Choosing u=exu = e^{-x} and dv=xndxdv = x^n\,dx in the factorial integral raises the power of xx at every step instead of lowering it, and the recurrence runs away rather than terminating. The skill is in the choice, and no picture of the formula contains it.

The measured areas are for whole numbers only. The factorial figure computes areas at n=0,1,,7n = 0, 1, \dots, 7. The claim that the same construction gives a smooth function of nn, and that its value at a half is π/2\sqrt\pi/2, is proved from the integral, not seen in the table.

Still open: how much repetition can tell

Applied once, integration by parts moves a derivative across a product. Applied nn times to the remainder of a Taylor polynomial, it produces the exact integral form of the error of a Taylor approximation, and it is how the error in approximating a smooth function by polynomials is controlled. Applied to a sum rather than an integral, in the discrete form called summation by parts, it is how a power series is read from inside at the edge of its interval. Applied to a Fourier coefficient, each application gains a factor of the frequency in the denominator, which is exactly why a smooth function’s coefficients fall off quickly and a function with a corner’s fall off only like 1/m21/m^2.

The systematic version is the Euler–Maclaurin formula, which relates a sum to an integral by applying parts over and over, with the Bernoulli numbers appearing as the coefficients. Its correction terms form an asymptotic series that usually diverges: taking more corrections improves the approximation up to a point and then makes it worse, and where the best stopping point lies depends delicately on the function. For the factorial the series is Stirling’s, and the optimal truncation and its error are known precisely. For a general sum there is no universal answer, and when an Euler–Maclaurin series can be summed by some regularisation to give an exact result is a question that in several directions is still being worked out.

Two pieces of one rectangle

The formula for integration by parts has two faces and they should be kept together. As a formula it is the product rule integrated, a tool for trading one integral for another, and its power comes from repetition: the factorials, the gamma function, Wallis’s product and Stirling’s constant all fall out of applying it again and again to a well-chosen pair.

As a picture it is a curve cutting a rectangle. The area under the curve and the area beside it are two pieces of one shape, and knowing either piece and the rectangle is knowing the other. That picture gives the integral of every inverse function at no cost, and when the rectangle is moved off the curve it gives Young’s inequality — an overfilled rectangle — and through it the inequalities that bound products throughout analysis.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

AntiderivativeAreaFactorialFundamental theoremInequalityIntegralInverse functionLogarithmPiRecurrence