Part 0 · The Toolkit — Chapter 0.2

Integration and Accumulation

The second half of calculus, and the one physics actually spends most of its time doing.

Where we are

Chapter 0.1 answered how fast is this changing? This chapter answers the question pointing the other way: given the rate, what accumulated? You are handed a velocity and asked for a distance. You are handed a power and asked for an energy. You are handed a concentration and asked for a total exposure.

Those two questions look unrelated. One is about the behaviour of a function in an infinitesimal neighbourhood of a single point. The other is about a total swept out over a whole interval. The central result of this chapter is the Fundamental Theorem of Calculus, and it says they are the same question. That is not a convenience. It is the first appearance of a pattern that recurs at every level of this book, and by Chapter 0.7 it will have grown into Stokes' theorem, which is the single most reused structural fact in theoretical physics.

One practical warning while you're here. Physics is written in differential equations, so it is tempting to think differentiation is the main event. It isn't. The laws are differential. The answers are integrals. Newton's second law is a statement about a second derivative, but every actual trajectory is obtained by integrating it twice. Every observable in quantum field theory is an integral. You will differentiate a few hundred times in this book and integrate a few thousand.

Tools you'll need  — Chapter 0.1, specifically the idea that a differentiable function is locally linear with an error that dies faster than the displacement. Everything below is that one fact, run in reverse or run in bulk.

1 · Accumulation: the integral as a limit of sums

Start with something you can picture. A car has velocity v(t)v(t), which is not constant. How far does it travel between t=at=a and t=bt=b?

If vv were constant the answer would be v(ba)v\cdot(b-a) and there would be no chapter. Since it isn't, do the only honest thing available. Chop the trip into NN short intervals, each of length Δt=(ba)/N\Delta t = (b-a)/N. On a short enough interval the velocity barely changes, which is exactly the content of continuity. So on the ii-th interval the distance covered is close to v(ti)Δtv(t_i)\,\Delta t for any tit_i inside it. Now add them up:

distance    i=1Nv(ti)Δt. \text{distance} \;\approx\; \sum_{i=1}^{N} v(t_i)\,\Delta t. (0.2.1)

Geometrically each term is the area of a rectangle of height v(ti)v(t_i) and width Δt\Delta t, so the sum is the area of a staircase drawn under the graph of vv. The approximation is bad for small NN and improves as the steps get finer, because the amount by which vv can wander inside one interval shrinks with the interval.

The definite integral is what (0.2.1) converges to. Written out properly, for a function ff on [a,b][a,b]: choose a partition a=x0<x1<<xN=ba = x_0 \lt x_1 \lt \cdots \lt x_N = b, write Δxi=xixi1\Delta x_i = x_i - x_{i-1}, define the mesh P=maxiΔxi\|P\| = \max_i \Delta x_i, and pick a tag xi[xi1,xi]x_i^{*}\in[x_{i-1},x_i] in each cell. Then

abf(x)dx  =  limP0  i=1Nf(xi)Δxi, \int_a^b f(x)\,\dd x \;=\; \lim_{\|P\|\to 0}\;\sum_{i=1}^{N} f(x_i^{*})\,\Delta x_i, (0.2.2)

whenever that limit exists.

1.1 · What "the limit exists" is doing here

As in Chapter 0.1, the escape clause is the interesting part. The demand in (0.2.2) is severe: there must be a single number II such that every partition with small enough mesh, tagged any way you like, gives a sum within ε\varepsilon of II. You do not get to choose convenient tags. A function that passes this test is called Riemann integrable.

Continuous functions on a closed bounded interval pass, and the reason is worth seeing because it is the only place in this chapter where compactness does real work. On [a,b][a,b] a continuous function is uniformly continuous (⚑ Heine–Cantor, quoted): for any ε\varepsilon there is a single δ\delta that works everywhere at once. So take any partition of mesh less than δ\delta. Inside cell ii the values of ff all lie within ε\varepsilon of each other, so the largest possible sum and the smallest possible sum on that cell differ by at most εΔxi\varepsilon\,\Delta x_i. Adding up,

(upper sum)(lower sum)    εiΔxi  =  ε(ba). \big(\text{upper sum}\big) - \big(\text{lower sum}\big) \;\le\; \varepsilon \sum_i \Delta x_i \;=\; \varepsilon\,(b-a). (0.2.3)

Every tagged sum is trapped between the upper and lower sums, and (0.2.3) squeezes that gap to zero. So all of them converge to the same number. Continuity was not decoration. It is the hypothesis that makes the definition work.

Now a function that fails. Let χ(x)\chi(x) be 11 when xx is rational and 00 when it is irrational. Every interval, however short, contains both kinds of number. So on any partition you can tag entirely at rationals and get 1Δxi=ba\sum 1\cdot\Delta x_i = b-a, or tag entirely at irrationals and get 00. The sums do not converge to anything. So χ\chi is not Riemann integrable, at any mesh, ever.

⚠ This definition gets replaced

In Chapter 4.3 we will throw (0.2.2) away and rebuild the integral from scratch (the Lebesgue integral), and the reason is visible already. Enumerate the rationals as q1,q2,q_1, q_2, \ldots and let fnf_n be the function equal to 11 at q1,,qnq_1,\ldots,q_n and 00 elsewhere. Each fnf_n is zero except at finitely many points, so each is perfectly Riemann integrable with 01fn=0\int_0^1 f_n = 0. But fnχf_n \to \chi pointwise, and χ\chi is not Riemann integrable at all.

So the Riemann integral is not closed under limits of functions. Here is why that is fatal rather than merely untidy. The moment you want to treat functions as vectors in a space and ask whether a sequence of them converges, this definition lets you down. That is precisely what quantum mechanics requires, since a quantum state is a vector in a space of functions. Lebesgue's construction fixes exactly this, and gives 01χ=0\int_0^1\chi = 0 into the bargain. For every function you will meet in the next three parts, the two integrals agree. You need the new one for the architecture, not for the answers.

N = 8
sum = 7.251701 exact = 7.239992
error = 1.171e-2
N × error = 0.0937 N² × error = 0.7493
The staircase converging — and the rate at which it converges. The curve is v(t)=1+12t+sintv(t)=1+\tfrac12 t+\sin t on [0,3][0,3]; the shaded staircase is the tagged sum of (0.2.1). Slide NN and the sum walks toward the exact value, as (0.2.2) promises. The two readouts on the right are where the physics is. With left or right tagging, N×errorN\times\text{error} settles on a constant (about 2.462\mp 2.462) and N2×errorN^{2}\times\text{error} blows up: the error is O(1/N)O(1/N). Switch to midpoint and it inverts — N×errorN\times\text{error} crashes to zero while N2×errorN^{2}\times\text{error} settles on about +0.746+0.746. Midpoint is a whole power of NN better for free, and §1.2 explains why in one sentence borrowed from Chapter 0.1.

1.2 · Why midpoint wins, and why you already knew

The figure showed midpoint tagging beating the other two by a whole power of NN. That is worth explaining, because the reason is one you already have from Chapter 0.1.

The left rule approximates ff on each cell by a constant, f(xi)f(x_i). Chapter 0.1 tells you the error in a constant approximation is first order in the cell width: ff drifts by about f(xi)Δxf'(x_i)\Delta x across the cell. Each cell therefore contributes an error of order Δx2\Delta x^2, and there are N1/ΔxN \sim 1/\Delta x of them, so the total error is order Δx1/N\Delta x \sim 1/N.

The midpoint rule also uses a constant, but it uses the value at the centre. That one change is the whole story. The linear part of ff, measured from the centre, is odd: it overshoots on the right of the midpoint by exactly as much as it undershoots on the left. Those two errors cancel exactly, not approximately. So the midpoint rule is, silently, as accurate as the best linear approximation on each cell. Its leading error is therefore the first thing linearisation misses, which is the quadratic term 12fh2\tfrac12 f''h^2 that Chapter 0.1 identified as the leftover. Cell error of order Δx3\Delta x^3, times NN cells, gives Δx21/N2\Delta x^2\sim 1/N^2.

This is worth internalising because the move recurs constantly: put your sample point where the linear error is antisymmetric and it cancels. It is the same reason odd moments of a Gaussian vanish in §4, the same reason a symmetric difference quotient is second-order accurate, and the same reason the leading correction in a saddle-point expansion (Chapter 5.4) is quadratic rather than linear.

Grind box — the error constants, exactly, so you can check them against the figure

Work on one cell of width dd and expand ff using Chapter 0.1's quadratic form.

Left rule. With the cell [x,x+d][x, x+d], the exact contribution is

0df(x+s)ds=0d ⁣[f(x)+f(x)s+O(s2)]ds=f(x)d+12f(x)d2+O(d3), \int_0^d f(x+s)\,\dd s = \int_0^d\!\Big[f(x) + f'(x)s + O(s^2)\Big]\dd s = f(x)\,d + \tfrac12 f'(x)\,d^{2} + O(d^{3}),

while the estimate is f(x)df(x)d. So the per-cell error (estimate minus truth) is 12f(x)d2-\tfrac12 f'(x)d^{2}. Sum over cells and recognise the leftover sum as another Riemann sum:

Eleft12d2if(xi)=d2if(xi)d    d2abf=(ba)[f(b)f(a)]2N. E_{\text{left}} \approx -\tfrac12 d^{2}\sum_i f'(x_i) = -\tfrac{d}{2}\sum_i f'(x_i)\,d \;\longrightarrow\; -\frac{d}{2}\int_a^b f' = -\frac{(b-a)\big[f(b)-f(a)\big]}{2N}.

For the figure's ff on [0,3][0,3]: f(3)f(0)=1.64112f(3)-f(0) = 1.64112, so N×Eleft3(1.64112)/2=2.4617N\times E_{\text{left}} \to -3(1.64112)/2 = -2.4617. That is the number in the readout. The right rule is the same computation with the opposite sign, +2.4617+2.4617.

Midpoint. Expand about the centre mm and integrate symmetrically. The odd term integrates to zero:

d/2d/2 ⁣[f(m)+f(m)s+12f(m)s2]ds=f(m)d+0+f(m)d324, \int_{-d/2}^{d/2}\!\Big[f(m)+f'(m)s+\tfrac12 f''(m)s^{2}\Big]\dd s = f(m)\,d + 0 + \frac{f''(m)\,d^{3}}{24},

using d/2d/2sds=0\int_{-d/2}^{d/2}s\,\dd s = 0 and d/2d/2s2ds=d3/12\int_{-d/2}^{d/2}s^{2}\dd s = d^{3}/12. The estimate is f(m)df(m)d, so the per-cell error is f(m)d3/24-f''(m)d^{3}/24 and

Emidd224abf=(ba)2[f(b)f(a)]24N2. E_{\text{mid}} \to -\frac{d^{2}}{24}\int_a^b f'' = -\frac{(b-a)^{2}\big[f'(b)-f'(a)\big]}{24\,N^{2}}.

Here f(t)=12+costf'(t) = \tfrac12+\cos t, so f(3)f(0)=1.98999f'(3)-f'(0) = -1.98999 and N2×Emid9(1.98999)/24=+0.7462N^{2}\times E_{\text{mid}} \to -9(-1.98999)/24 = +0.7462. Also in the readout.

Trapezoid, and a bonus. Averaging the two endpoint values gives, after expanding both about mm, an estimate f(m)d+f(m)d3/8f(m)d + f''(m)d^{3}/8, hence a per-cell error of +f(m)d3/12+f''(m)d^{3}/12, which is exactly 2-2 times the midpoint error. So the combination

S=13(2M+T) S = \tfrac13\big(2M + T\big)

annihilates the d3d^{3} term identically. That is Simpson's rule, and it is not a lucky guess: it is the unique weighting that kills the leading error of two rules whose errors are in a known fixed ratio. Combining two approximations to cancel a known leading error is a manoeuvre with a name of its own, Richardson extrapolation, and you meet its physics incarnation in Chapter 5.11, where the "known leading error" is a divergence and cancelling it is renormalisation.

In plain terms 0.2.1

Accumulation is the reverse problem, and the one physics spends most of its time on. You are handed a rate and asked for a total: a velocity and asked for a distance travelled, a concentration and asked for a total exposure. The strategy is forced. Chop the interval into pieces short enough that the rate barely changes across each, treat it as constant there, add up the contributions, and ask what happens as the pieces are made finer.

The demand hidden in that last step is severe, and worth appreciating rather than reading past. It is not enough that some sensible way of chopping settles on a number. Every way of chopping has to settle, on the same number, wherever inside each piece you take your sample. A function taking one value at every fraction and a different value at every other number fails this completely, because the answer then depends entirely on where you looked.

There is a dividend hiding in where you take that sample. Put it at the centre of each piece and the drift overshoots on one side by exactly what it undershoots on the other, so the leading error cancels without anyone arranging it. Sampling where the error is antisymmetric is a manoeuvre worth recognising now, because the same cancellation does real work again before this chapter is out.

2 · The Fundamental Theorem, both halves, derived

Nothing so far connects (0.2.2) to derivatives. The definition is about areas and sums, while Chapter 0.1 was about local slopes. Watching those two collapse into one statement is the point of this section.

We take it in two halves, in the order they are usually needed. First we ask what happens when you differentiate an accumulation. Then we use the answer to evaluate an integral without summing anything at all.

2.1 · First half: differentiating an accumulation

Let ff be continuous on [a,b][a,b] and define the accumulation function

F(x)  =  axf(t)dt. F(x) \;=\; \int_a^x f(t)\,\dd t. (0.2.4)

F(x)F(x) is the total accumulated between the fixed left end aa and the moving right end xx. Ask Chapter 0.1's question about it: how fast does FF change as you slide xx?

Push xx along by hh. The accumulation from aa to x+hx+h is the accumulation from aa to xx plus whatever the sliver from xx to x+hx+h contributes. That is nothing more than additivity of the sum in (0.2.2) over adjacent blocks of cells:

F(x+h)F(x)  =  xx+hf(t)dt. F(x+h) - F(x) \;=\; \int_x^{x+h} f(t)\,\dd t. (0.2.5)

Now estimate the sliver. Because ff is continuous at xx, write f(t)=f(x)+η(t)f(t) = f(x) + \eta(t) where η(t)=f(t)f(x)\eta(t) = f(t)-f(x), and let

ε(h)  =  maxtxh  f(t)f(x)so thatε(h)0  as h0. \varepsilon(h) \;=\; \max_{\,|t-x|\le |h|}\;\big|f(t)-f(x)\big| \qquad\text{so that}\qquad \varepsilon(h)\to 0 \ \text{ as } h\to 0. (0.2.6)

That last statement is the definition of continuity at xx, nothing more. Our goal now is to separate the sliver into a clean rectangle plus a leftover small enough to ignore, so split it in two:

xx+hf  =  f(x)hrectangle  +  xx+hη(t)dtleftover,xx+hη    ε(h)h. \int_x^{x+h} f \;=\; \underbrace{f(x)\,h}_{\text{rectangle}} \;+\; \underbrace{\int_x^{x+h}\eta(t)\,\dd t}_{\text{leftover}}, \qquad \left|\int_x^{x+h}\eta\right| \;\le\; \varepsilon(h)\,|h|. (0.2.7)

The bound on the leftover follows straight from (0.2.2): every tagged sum for η\int\eta is at most ε(h)\varepsilon(h) times the total width h|h|, so the limit is too. Combining (0.2.5) and (0.2.7):

F(x+h)  =  F(x)  +  f(x)h  +  hε(h)smaller than h. F(x+h) \;=\; F(x) \;+\; f(x)\,h \;+\; \underbrace{h\,\varepsilon(h)}_{\text{smaller than }h}. (0.2.8)

Let's look at what that last line is actually saying. It is literally Chapter 0.1's boxed equation: a value, plus something linear in hh, plus an error that dies faster than hh. The coefficient of hh here is f(x)f(x). And Chapter 0.1 established that the coefficient with that property is unique, and that it is called the derivative. So we can read the derivative straight off:

  ddxaxf(t)dt  =  f(x).   \boxed{\;\dv{}{x}\int_a^x f(t)\,\dd t \;=\; f(x).\;} (0.2.9)

No trickery, no area formulas, no pictures required. The sliver is a thin rectangle of height f(x)f(x) and width hh. The error you make by pretending it is exactly a rectangle is second order, so it dies. Same move as the corner square in the product rule, same move as everything in Chapter 0.1.

2.2 · Second half: evaluating an integral

(0.2.9) is a statement about a function you build by integrating. The version you actually compute with runs the other way. Suppose you can find any function GG with G=fG' = f, and call such a function an antiderivative. Then GG and the FF of (0.2.4) have the same derivative, so their difference has a vanishing derivative:

(GF)=ff=0G(x)F(x)=C  (a constant). (G-F)' = f - f = 0 \qquad\Longrightarrow\qquad G(x) - F(x) = C \ \text{ (a constant)}. (0.2.10)

That a function with vanishing derivative on an interval must be constant is not free. It comes from the mean value theorem, which is derived in the grind box below. We do not know the constant CC, and we do not need to, because our next move makes it cancel. Evaluate at both ends and subtract:

G(b)G(a)=[F(b)+C][F(a)+C]=F(b)F(a)=abf0, G(b) - G(a) = \big[F(b)+C\big]-\big[F(a)+C\big] = F(b) - F(a) = \int_a^b f - 0, (0.2.11)

using F(a)=aaf=0F(a)=\int_a^a f = 0, since an integral whose two limits coincide accumulates nothing. What is left is the formula you actually compute with, and it deserves a box of its own:

  abf(x)dx  =  G(b)G(a)    [G(x)]ab,for any G with G=f.   \boxed{\;\int_a^b f(x)\,\dd x \;=\; G(b)-G(a) \;\equiv\; \Big[G(x)\Big]_a^b, \qquad\text{for any } G \text{ with } G'=f.\;} (0.2.12)

This is the reason you can compute integrals at all. The limit of sums in (0.2.2) is an infinite process with no obvious shortcut. (0.2.12) replaces it with two evaluations of a function you found by running the differentiation rules backwards. Every integral you have ever computed by hand was this theorem being spent.

The punchline, and it is not a small one

Here is (0.2.12) read differently. Take a partition of [a,b][a,b] and telescope:

G(b)G(a)  =  i=1N[G(xi)G(xi1)]    i=1NG(xi1)Δxi    abG. G(b)-G(a) \;=\; \sum_{i=1}^{N}\Big[G(x_i)-G(x_{i-1})\Big] \;\approx\; \sum_{i=1}^{N} G'(x_{i-1})\,\Delta x_i \;\longrightarrow\; \int_a^b G'.

Every interior value G(xi)G(x_i) appears twice with opposite signs and cancels. Only the two endpoints survive. That is the entire mechanism: you add up local changes, the interior cancels in pairs, and what is left lives on the boundary.

So the Fundamental Theorem says a local quantity (the derivative, defined at each point) integrated over a region equals a global quantity evaluated only on the boundary of that region. In the notation of Chapter 0.7 this reads

[a,b]dG  =  [a,b]G,[a,b]={b}{a}, \int_{[a,b]} \dd G \;=\; \int_{\partial [a,b]} G, \qquad \partial[a,b] = \{b\} - \{a\},

and that equation, unchanged in form, is Stokes' theorem. Raise the dimension and the same cancellation of interior contributions gives Green's theorem, the divergence theorem, and the curl theorem. Chapter 0.7 proves they are one theorem wearing three costumes, and the costume you are wearing right now is the one-dimensional original. In Chapter 3.5 this is how a local conservation law μTμν=0\nabla_\mu T^{\mu\nu}=0 gets converted into a statement about total energy in a region, and where that conversion fails in general relativity you get one of the deepest open problems in the subject. All of it is interior terms cancelling in pairs.

Grind box — the fine print: mean value theorem, and where F=fF' = f fails

Zero derivative implies constant. First Rolle's theorem: if gg is continuous on [a,b][a,b], differentiable inside, and g(a)=g(b)g(a)=g(b), then g(c)=0g'(c)=0 somewhere inside. Why: a continuous function on a closed bounded interval attains a maximum and a minimum. If both occur at the endpoints then gg is constant and any interior cc works. Otherwise there is an interior extremum at cc. There the difference quotient is 0\ge 0 approaching from one side and 0\le 0 from the other, and since the derivative exists both one-sided limits equal it, forcing g(c)=0g'(c)=0.

Now the mean value theorem. Given GG on [a,b][a,b], apply Rolle to

g(x)=G(x)G(a)G(b)G(a)ba(xa), g(x) = G(x) - G(a) - \frac{G(b)-G(a)}{b-a}\,(x-a),

which satisfies g(a)=g(b)=0g(a)=g(b)=0. The conclusion g(c)=0g'(c)=0 reads G(b)G(a)=G(c)(ba)G(b)-G(a) = G'(c)\,(b-a). If G0G'\equiv 0 then every such difference vanishes, so GG takes the same value everywhere: constant. That is the step used in (0.2.10).

Where the first half breaks. (0.2.9) used continuity of ff at the point xx. Drop it and the theorem drops with it. Take f(t)=sign(t)f(t) = \operatorname{sign}(t) and a=1a=-1. Then F(x)=x1F(x) = |x| - 1, which is perfectly continuous everywhere but has no derivative at 00, which is precisely Chapter 0.1's corner. The accumulation function exists. It just isn't differentiable where the integrand jumps.

Notice the direction of that asymmetry, because it matters later. Differentiating makes a function rougher: a corner in FF becomes a jump in ff. Integrating makes it smoother: a jump in ff becomes a mere corner in FF. This is why integral formulations of physical laws are better behaved than differential ones, why "weak solutions" of PDEs are defined by integrating against test functions, and why the Dirac delta of Chapter 0.9, an object with no pointwise meaning at all, is perfectly well defined the moment it appears inside an integral.

Fine print on the second half. (0.2.12) as derived assumed ff continuous, so that FF exists and F=fF'=f. A slightly stronger version holds: if ff is merely Riemann integrable and happens to have some antiderivative GG, then abf=G(b)G(a)\int_a^b f = G(b)-G(a) still, by applying the mean value theorem to GG on each cell of a partition and recognising the result as a tagged Riemann sum. You will not need the stronger version, but you should know the weaker one has hypotheses.

In plain terms 0.2.2

Nothing so far has connected the two halves of calculus. One concerns how a function behaves in a vanishingly small neighbourhood of a point, the other a total swept out across a whole interval, and on the face of it they share no vocabulary. What emerges is that they are the same question, which is genuinely astonishing and does not become less so with familiarity.

The mechanism is easier than the statement. Let the right-hand end of an accumulation slide forward a little and ask what the total gains. It gains a thin sliver, and that sliver is a rectangle whose height is the rate at that end, plus an error that is second order and therefore dies. It is the corner-square argument of the last chapter in a different hat. So the accumulated total changes at a rate equal to the thing being accumulated.

Read the other way round, the theorem says something structural that will outlast the calculus. Cut a region into small pieces, add up the local change across each, and every interior contribution appears twice with opposite signs and cancels against its neighbour. Only the two ends survive. Local changes added up over a region equal something evaluated purely on that region's boundary, and that sentence, in higher dimensions and better clothes, is the structural fact this book returns to most often.

3 · Techniques, derived as reversed rules

Because of (0.2.12), integrating means recognising something as a derivative. Every differentiation rule from Chapter 0.1 therefore becomes an integration technique when read backwards. There are only two that matter, and one of them matters enormously.

3.1 · Substitution is the chain rule, reversed

Let F=fF' = f and let gg be differentiable. The chain rule says

ddxF(g(x))  =  f(g(x))g(x). \dv{}{x}F\big(g(x)\big) \;=\; f\big(g(x)\big)\,g'(x). (0.2.13)

Now read (0.2.13) from right to left. It says that the awkward-looking product on its right-hand side has a known antiderivative, namely FgF\circ g. An antiderivative is exactly what (0.2.12) asks for, so feed it in:

abf(g(x))g(x)dx  =  F(g(b))F(g(a))  =  g(a)g(b)f(u)du. \int_a^b f\big(g(x)\big)\,g'(x)\,\dd x \;=\; F\big(g(b)\big)-F\big(g(a)\big) \;=\; \int_{g(a)}^{g(b)} f(u)\,\dd u. (0.2.14)

That is substitution, derived rather than asserted. Two things are worth noticing. First, the informal ritual "let u=g(x)u=g(x), so du=g(x)dx\dd u = g'(x)\dd x" is a compressed way of writing exactly (0.2.14), and the licence to manipulate du\dd u that way is the same licence Chapter 0.1 discussed under "one deliberate abuse". Second, the limits transform too. Forgetting that is the most common error in the entire technique. It is also why 11xex2dx\int_{-1}^{1}x\,\ee^{-x^2}\dd x is zero: under u=x2u=x^2 both limits become 11, and any integral whose two limits coincide is zero. The symmetry argument and the substitution argument agree, as they must.

3.2 · Integration by parts is the product rule, reversed

Take the product rule (uv)=uv+uv(uv)' = u'v + uv', integrate both sides from aa to bb, and apply (0.2.12) to the left (whose integrand is manifestly a derivative):

[uv]ab  =  abuvdx  +  abuvdx. \Big[u v\Big]_a^b \;=\; \int_a^b u'v\,\dd x \;+\; \int_a^b u v'\,\dd x. (0.2.15)

We want the integral we cannot do sitting alone on one side, so move the other one across. That rearrangement is integration by parts:

  abuvdx  =  [uv]ab    abuvdx.   \boxed{\;\int_a^b u\,v'\,\dd x \;=\; \Big[u v\Big]_a^b \;-\; \int_a^b u'\,v\,\dd x.\;} (0.2.16)

Read (0.2.16) as an instruction rather than a formula: you may move a derivative from one factor onto the other, at the cost of a minus sign and a boundary term. That sentence is, without much exaggeration, the most-used manipulation in theoretical physics. It is not primarily a trick for computing xex\int x\ee^{x}. It is the mechanism by which:

  • An action becomes a field equation. In Chapter 1.2 you vary S=L(q,q˙)dtS=\int L(q,\dot q)\,\dd t and get a term proportional to δq˙\delta\dot q, which is a variation of a derivative and cannot be set to zero independently. By parts moves the time derivative off δq˙\delta \dot q and onto the coefficient, leaving everything multiplying δq\delta q alone. That single step is what turns "the action is stationary" into the Euler–Lagrange equation, and in Chapter 5.2 the identical step in four dimensions turns a field Lagrangian into a field equation. Every field equation in this book is produced by (0.2.16).
  • An operator gets an adjoint. In Chapter 4.4, ψxϕdx=(xψ)ϕdx\int \psi^{*}\,\partial_x\phi\,\dd x = -\int(\partial_x\psi)^{*}\phi\,\dd x when boundary terms vanish. The minus sign is why p^=ix\hat p = -\ii\hbar\,\partial_x is Hermitian and x\partial_x alone is not. The factor of i\ii exists to absorb the minus sign that (0.2.16) generates. That is the entire origin of the i\ii in the momentum operator.
  • A derivative gets defined for objects that have none. The derivative of a distribution in Chapter 0.9 is defined by declaring (0.2.16) to hold.
Grind box — the bookkeeping, and why "the boundary term vanishes" is physics, not maths

Worked mechanics. 0xexdx\int_0^{\infty} x\,\ee^{-x}\dd x. Choose u=xu=x and v=exv'=\ee^{-x}, so u=1u'=1 and v=exv=-\ee^{-x}. Then

0xexdx=[xex]0+0exdx=0+1=1. \int_0^{\infty} x\,\ee^{-x}\dd x = \Big[-x\ee^{-x}\Big]_0^{\infty} + \int_0^{\infty}\ee^{-x}\dd x = 0 + 1 = 1.

The boundary term vanished at \infty because ex\ee^{-x} beats xx, and at 00 because xx beats ex\ee^{-x}. That is a check, performed, not an assumption. Choosing uu and vv' the other way round gives xex=[12x2ex]+12x2ex\int x\ee^{-x} = \big[\tfrac12x^2\ee^{-x}\big] + \tfrac12\int x^2\ee^{-x}, which is true and useless: the remaining integral is worse than the one you started with. The craft in by parts is entirely in choosing which factor gets differentiated. Pick the one that gets simpler.

The move that builds physics. Here is the Chapter 1.2 step, done now so it is not new later. Let S[q]=t1t2L(q,q˙,t)dtS[q]=\int_{t_1}^{t_2} L(q,\dot q,t)\,\dd t and perturb the path qq+δqq \to q + \delta q. To first order,

δS=t1t2 ⁣[Lqδq+Lq˙δq˙]dt. \delta S = \int_{t_1}^{t_2}\!\left[\pdv{L}{q}\,\delta q + \pdv{L}{\dot q}\,\delta\dot q\right]\dd t.

The second term is stuck: δq˙\delta\dot q is not independent of δq\delta q, it is its derivative. Use (0.2.16) with u=L/q˙u = \partial L/\partial\dot q and v=δq˙v' = \delta \dot q, noting δq˙=ddtδq\delta\dot q = \dv{}{t}\delta q:

t1t2Lq˙ddt(δq)dt=[Lq˙δq]t1t2t1t2ddt ⁣(Lq˙)δqdt. \int_{t_1}^{t_2}\pdv{L}{\dot q}\,\dv{}{t}(\delta q)\,\dd t = \left[\pdv{L}{\dot q}\,\delta q\right]_{t_1}^{t_2} - \int_{t_1}^{t_2}\dv{}{t}\!\left(\pdv{L}{\dot q}\right)\delta q\,\dd t.

The boundary term dies because we only compare paths with the same endpoints, so δq(t1)=δq(t2)=0\delta q(t_1)=\delta q(t_2)=0. What is left is

δS=t1t2[LqddtLq˙]δqdt, \delta S = \int_{t_1}^{t_2}\left[\pdv{L}{q} - \dv{}{t}\pdv{L}{\dot q}\right]\delta q\,\dd t,

and now δq\delta q is arbitrary and unconstrained, so demanding δS=0\delta S=0 for all of them forces the bracket to vanish pointwise. That bracket is the Euler–Lagrange equation. Notice that by parts did all the work: it converted an unusable variation of a derivative into a usable variation of the coordinate.

The honest warning. In field theory you will constantly see μϕμϕϕϕ\int \partial_\mu\phi\,\partial^\mu\phi \to -\int\phi\,\Box\phi with the boundary term "dropped". That is not a mathematical triviality. It is the physical assumption that the fields fall off fast enough at infinity. Sometimes they don't, and then the boundary term is the interesting object rather than the discarded one:

  • In general relativity the Einstein–Hilbert action needs an explicit boundary term (the Gibbons–Hawking term) added by hand, precisely because the naive one does not vanish (Chapter 3.6).
  • Boundary terms at a black hole horizon are where the entropy lives (Chapter 7.9).
  • Topological terms in gauge theory are total derivatives, which is to say pure boundary, and they still change the physics. That is how the strong CP problem exists at all (Chapter 6.5).

So: drop boundary terms freely, but know each time that you have made a physical claim about what happens far away, and be ready to be asked to defend it.

In plain terms 0.2.3

Because an integral is evaluated by finding something whose rate of change is the integrand, integrating is not really a procedure. It is recognition, and the whole technique consists of reading the differentiation rules backwards. The chain rule read backwards is substitution; the product rule read backwards is integration by parts.

The second deserves to be read as an instruction rather than a formula. It says you may move a derivative off one factor and onto the other, and the price is a change of sign together with a term evaluated only at the two ends. Put that way it stops being a device for computing textbook integrals and becomes the manipulation theoretical physics leans on more than any other. It is the step that converts a statement that some total is stationary into an equation the system must obey at every point, which is where every field equation in this book comes from.

The term at the ends deserves attention of its own, because physicists discard it habitually. Doing so is not a piece of algebra. It is a claim that whatever you are describing is quiet enough far away for that contribution to vanish, and there are important situations where the claim is false and the discarded term is the interesting object. The entropy of a black hole is one of them.

4 · The Gaussian integral

We now derive the single most-used integral in this book. It appears in the normalisation of every quantum wave packet (Chapter 4.6) and in the free-particle propagator (Chapter 5.4). And this is not an overstatement: the entire perturbative expansion of quantum field theory consists of Gaussian integrals plus corrections (Chapter 5.7). Learn it once, properly.

I  =  ex2dx. I \;=\; \int_{-\infty}^{\infty} \ee^{-x^{2}}\,\dd x. (0.2.17)

First, does it even converge? For x1|x|\ge 1 we have x2xx^{2}\ge|x|, so ex2ex\ee^{-x^{2}}\le \ee^{-|x|}, and 1exdx=e1\int_1^{\infty}\ee^{-x}\dd x = \ee^{-1} is finite. On [1,1][-1,1] the integrand is bounded by 11. So II is finite and positive, and we are entitled to go looking for its value.

We cannot find it the usual way, because ex2\ee^{-x^{2}} has no elementary antiderivative. The callout after §5 makes that precise, and it is a theorem rather than a failure of effort. So we do something that looks like cheating and isn't: square it.

I2  =  (ex2dx) ⁣(ey2dy)  =  R2e(x2+y2)dxdy. I^{2} \;=\; \left(\int_{-\infty}^{\infty}\ee^{-x^{2}}\dd x\right)\!\left(\int_{-\infty}^{\infty}\ee^{-y^{2}}\dd y\right) \;=\; \iint_{\R^{2}} \ee^{-(x^{2}+y^{2})}\,\dd x\,\dd y. (0.2.18)

Renaming the second dummy variable yy is free. Combining the two one-dimensional integrals into one two-dimensional integral is the real step, and it is legal because the integrand is positive (grind box). Now the point. The quantity x2+y2x^{2}+y^{2} is the squared distance from the origin, so the integrand depends only on distance. That is exactly the situation polar coordinates are for, and our next job is to find out what dxdy\dd x\,\dd y turns into when we change to them.

4.1 · The area element, derived

Set x=rcosθx = r\cos\theta, y=rsinθy=r\sin\theta, so x2+y2=r2x^{2}+y^{2}=r^{2}. The one thing that needs care is what dxdy\dd x\,\dd y becomes. A cell of the polar grid runs from rr to r+drr+\dd r and from θ\theta to θ+dθ\theta+\dd\theta. Its area is the difference of two circular sectors, and a sector of radius ρ\rho and angle dθ\dd\theta has area 12ρ2dθ\tfrac12\rho^{2}\dd\theta (that is what radian measure means):

dA=12(r+dr)2dθ12r2dθ=rdrdθ  +  12(dr)2dθsecond order. \dd A = \tfrac12(r+\dd r)^{2}\dd\theta - \tfrac12 r^{2}\dd\theta = r\,\dd r\,\dd\theta \;+\; \underbrace{\tfrac12 (\dd r)^{2}\dd\theta}_{\text{second order}}. (0.2.19)

That is exact, and the leftover in (0.2.19) is second order in the cell size, so it dies in the limit. This is the same corner-square argument as the product rule in Chapter 0.1, wearing a different hat. Hence dxdy=rdrdθ\dd x\,\dd y = r\,\dd r\,\dd\theta. Chapter 0.6 will produce the same factor rr mechanically, as the Jacobian determinant. It is worth having seen it geometrically first, because the Jacobian is nothing but "how much a coordinate change stretches area", and here you can watch it stretch.

4.2 · The value

With the area element settled, we can make the substitution. The whole plane is covered by r[0,)r\in[0,\infty) and θ[0,2π)\theta\in[0,2\pi), so

I2  =  02π ⁣ ⁣0er2rdrdθ  =  2π0rer2dr. I^{2} \;=\; \int_0^{2\pi}\!\!\int_0^{\infty} \ee^{-r^{2}}\, r\,\dd r\,\dd\theta \;=\; 2\pi \int_0^{\infty} r\,\ee^{-r^{2}}\,\dd r. (0.2.20)

And that integral is elementary, because the stray factor of rr is exactly the gg' that substitution wants: with u=r2u=r^{2}, du=2rdr\dd u = 2r\,\dd r,

0rer2dr=120eudu=12[eu]0=12. \int_0^{\infty} r\,\ee^{-r^{2}}\dd r = \tfrac12\int_0^{\infty}\ee^{-u}\,\dd u = \tfrac12\Big[-\ee^{-u}\Big]_0^{\infty} = \tfrac12. (0.2.21)

So I2=2π12=πI^{2} = 2\pi\cdot\tfrac12 = \pi. We established at the start that I>0I \gt 0, so we may take the positive square root, and the Gaussian integral is ours:

  ex2dx  =  π.   \boxed{\;\int_{-\infty}^{\infty}\ee^{-x^{2}}\,\dd x \;=\; \sqrt{\pi}.\;} (0.2.22)

Let's pause on why this worked, because the mechanism is more useful than the answer. In one dimension ex2\ee^{-x^{2}} has no elementary antiderivative. In two dimensions, after going polar, the integrand acquires a factor of rr from the area element, and rer2r\,\ee^{-r^{2}} does have one. The trick is not a trick about exponentials. It is the observation that the geometry of the plane supplies the missing factor. Nothing in the one-dimensional problem could have told you that π\pi was going to appear. It came from the angular integral, which is to say from the fact that a circle exists.

Grind box — is squaring the integral legal, and the polar limit

Two things were waved at in (0.2.18) and both are fine, but you should know why.

Turning a product of integrals into a double integral. ⚑ Quoted: this is Fubini's theorem, and for a non-negative integrand it holds with no extra hypotheses at all (that version is Tonelli's theorem). Our integrand e(x2+y2)\ee^{-(x^2+y^2)} is positive everywhere, so we are safe. For oscillatory integrands the same step can fail spectacularly, and in Chapter 5.4 the Gaussian we need is eiax2\ee^{\ii a x^{2}}, which is purely oscillatory and does not decay at all. The standard repair is to give aa a small imaginary part, do the honest convergent integral, and take the limit at the end. That deformation has a name, the iϵ\ii\epsilon prescription, and it is not bookkeeping: it is what selects the causal propagator over the anticausal one.

The infinite region. Strictly, R2\iint_{\R^2} means a limit of integrals over expanding bounded regions, and one should check the answer does not depend on how you expand. Squares of side 2L2L give IL2I_L^{2} where IL=LLex2dxI_L=\int_{-L}^{L}\ee^{-x^2}\dd x. Discs of radius RR give π(1eR2)\pi(1-\ee^{-R^{2}}) by the same polar computation. Since every disc of radius LL sits inside the square of side 2L2L, which sits inside the disc of radius L2L\sqrt2,

π(1eL2)    IL2    π(1e2L2), \pi\big(1-\ee^{-L^{2}}\big) \;\le\; I_L^{2} \;\le\; \pi\big(1-\ee^{-2L^{2}}\big),

and both ends go to π\pi. Squeezed. The answer is independent of the exhaustion, which for a positive integrand it always is.

4.3 · The general Gaussian

The Gaussian we meet in physics has a width, and usually a linear term as well, so let's generalise in two steps. First the width. For a>0a \gt 0 put u=axu = \sqrt a\,x, so du=adx\dd u = \sqrt a\,\dd x, and the limits are unchanged because rescaling the whole line leaves it the whole line:

eax2dx  =  1aeu2du  =  πa. \int_{-\infty}^{\infty}\ee^{-a x^{2}}\,\dd x \;=\; \frac{1}{\sqrt a}\int_{-\infty}^{\infty}\ee^{-u^{2}}\,\dd u \;=\; \sqrt{\frac{\pi}{a}}. (0.2.23)

Now add a linear term, which is where it starts being useful. The move is to complete the square:

ax2+bx  =  a(x2bax)  =  a(xb2a)2+b24a. -a x^{2}+bx \;=\; -a\left(x^{2}-\frac{b}{a}x\right) \;=\; -a\left(x-\frac{b}{2a}\right)^{2} + \frac{b^{2}}{4a}. (0.2.24)

The last term is a constant as far as xx is concerned, so it comes out of the integral. The first is a shifted Gaussian, and shifting the integration variable over the whole real line changes nothing, since the whole line is what we integrate over either way. Hence

  eax2+bxdx  =  πa  eb2/4a.   \boxed{\;\int_{-\infty}^{\infty}\ee^{-a x^{2}+bx}\,\dd x \;=\; \sqrt{\frac{\pi}{a}}\;\ee^{\,b^{2}/4a}.\;} (0.2.25)

Commit (0.2.25) to memory. In Chapter 5.7 the variable xx becomes an entire field configuration, aa becomes a differential operator, and bb becomes an external source JJ. With almost no change of shape, the formula becomes Z[J]=Z[0]exp(12 ⁣ ⁣ ⁣JΔJ)Z[J] = Z[0]\exp\big(\tfrac12\!\int\!\!\int J\,\Delta\,J\big), the generating functional of a free quantum field theory. Δ\Delta is the propagator, and it sits exactly where 1/4a1/4a sits here.

4.4 · Differentiating under the integral sign

What about x2eax2dx\int x^{2}\ee^{-ax^{2}}\dd x? You could hunt for a substitution. Don't. Notice instead that aa appears in (0.2.23) as a parameter, and that differentiating the integrand with respect to it pulls down exactly the factor you want:

aeax2  =  x2eax2. \pdv{}{a}\,\ee^{-ax^{2}} \;=\; -x^{2}\,\ee^{-ax^{2}}. (0.2.26)

Suppose for the moment that we may swap the order of a\partial_a and dx\int\dd x. The grind box below shows that we may here, and shows what has to go wrong for the swap to fail. Granting it, differentiating both sides of (0.2.23) with respect to aa hands us an integral we never had to solve:

x2eax2dx  =  ddaπa  =  12πa3/2,x2eax2dx  =  12aπa. \begin{aligned} -\int_{-\infty}^{\infty} x^{2}\,\ee^{-ax^{2}}\,\dd x \;&=\; \dv{}{a}\sqrt{\frac{\pi}{a}} \;=\; -\tfrac12\sqrt{\pi}\,a^{-3/2},\\[6pt] \Longrightarrow\qquad \int_{-\infty}^{\infty} x^{2}\,\ee^{-ax^{2}}\,\dd x \;&=\; \frac{1}{2a}\sqrt{\frac{\pi}{a}}. \end{aligned} (0.2.27)

Nothing stops us doing that again. Each further derivative in aa brings down another factor of x2-x^{2}, so every even moment comes out for free:

x2neax2dx  =  (1)ndndanπa  =  (2n)!n!(4a)nπa, \int_{-\infty}^{\infty} x^{2n}\,\ee^{-ax^{2}}\,\dd x \;=\; (-1)^{n}\frac{\dd^{\,n}}{\dd a^{\,n}}\sqrt{\frac{\pi}{a}} \;=\; \frac{(2n)!}{n!\,(4a)^{n}}\sqrt{\frac{\pi}{a}}, (0.2.28)

while every odd moment vanishes because x2n+1eax2x^{2n+1}\ee^{-ax^{2}} is an odd function integrated over a symmetric interval. That is the same cancellation that made the midpoint rule good in §1.2.

This technique deserves a name and a place in your hands: parameter differentiation (sometimes "Feynman's trick", though it long predates him). You introduce a parameter the original problem did not have, differentiate or integrate with respect to it, and trade a hard integral for an easy one plus some calculus. Problem 2 below is the cleanest possible example.

4.5 · The same number, two ways — and why the second way is quantum field theory

There is a second route to (0.2.27) that looks like a detour and is actually the whole of Chapter 5.7. Instead of differentiating with respect to aa, differentiate (0.2.25) with respect to the source bb. Since bebx=xebx\partial_b\,\ee^{bx} = x\,\ee^{bx}, each derivative in bb brings down one power of xx:

2b2eax2+bxdxb=0  =  x2eax2dx. \left.\pdv{^{2}}{b^{2}}\int \ee^{-ax^{2}+bx}\dd x\right|_{b=0} \;=\; \int x^{2}\,\ee^{-ax^{2}}\dd x. (0.2.29)

Do the left side from the closed form: b2[π/a  eb2/4a]=π/aeb2/4a[12a+b24a2]\partial_b^{2}\big[\sqrt{\pi/a}\;\ee^{b^{2}/4a}\big] = \sqrt{\pi/a}\,\ee^{b^{2}/4a}\big[\tfrac{1}{2a} + \tfrac{b^{2}}{4a^{2}}\big], which at b=0b=0 is 12aπ/a\tfrac{1}{2a}\sqrt{\pi/a}. Same answer as (0.2.27). ✓

Now let's read what just happened structurally. We built a function of a source, Z(b)Z(b). We then differentiated it with respect to the source and switched the source off, and out came an average of a power of the integration variable. Rename Z(b)Z(b) the generating functional, rename xx the field, rename "average of a power" a correlation function, and you have the working method of quantum field theory, in which every Feynman diagram is a term produced by differentiating eb2/4a\ee^{b^{2}/4a} enough times. The whole apparatus is (0.2.25) plus bookkeeping.

Grind box — when you may differentiate under the integral sign, and when you may not

The swap in (0.2.27) is a genuine hypothesis, not a formality. It is a statement that a limit (the derivative in aa) commutes with another limit (the integral), and limits do not generally commute.

A concrete failure. Let h(x,a)=2xa2ex2/a2h(x,a) = \dfrac{2x}{a^{2}}\ee^{-x^{2}/a^{2}} for a>0a\gt0. Substituting u=x2/a2u = x^{2}/a^{2},

01h(x,a)dx=01/a2eudu=1e1/a2  a0  1. \int_0^{1} h(x,a)\,\dd x = \int_0^{1/a^{2}}\ee^{-u}\,\dd u = 1-\ee^{-1/a^{2}} \;\xrightarrow[a\to0]{}\; 1.

But for any fixed x>0x\gt0, h(x,a)0h(x,a)\to 0 as a0a\to0 (the exponential beats the prefactor). So lim=1\lim\int = 1 while lim=0\int\lim = 0. The mass has not vanished. It has escaped into an ever narrower, ever taller spike near the origin. Hold that image: it is the Dirac delta being born, and Chapter 0.9 makes it respectable.

The condition that saves us. The sufficient hypothesis (dominated convergence, proved properly in Chapter 4.3) is that the aa-derivative of the integrand be bounded, uniformly in aa near the point of interest, by a single fixed integrable function. Check it for our case: fix a0>0a_0\gt0 and let aa range over [a0,)[a_0,\infty). Then

aeax2=x2eax2    x2ea0x2, \left|\pdv{}{a}\ee^{-ax^{2}}\right| = x^{2}\ee^{-ax^{2}} \;\le\; x^{2}\ee^{-a_0x^{2}},

and the right-hand side is a fixed function of xx with finite integral (it is (0.2.27) itself, which we have just evaluated as finite). So the swap is justified for every a>0a\gt0, which is every case we care about. The moral is the book's general one: the manipulation is legal, and you should be able to say why on demand.

σ = 0.398
peak = 1.0021 peak × σ = 0.39894
total area = 1.00000 area in ±σ = 0.68269
Area pinned, shape forced. The curve is the normalised Gaussian p(x)=1σ2πex2/2σ2p(x)=\frac{1}{\sigma\sqrt{2\pi}}\ee^{-x^{2}/2\sigma^{2}}, whose total integral is 11 by (0.2.23) with a=1/2σ2a = 1/2\sigma^{2}. The readouts are computed numerically by Simpson's rule from §1, not from the formula, so the constancy of the total area is measured, not asserted. Slide σ\sigma and watch two invariants hold: the total area stays at 1.000001.00000, and the shaded band between ±σ\pm\sigma (dashed) always holds 0.682690.68269 of it, whatever the width. The consequence is the one worth carrying: since the area cannot change, narrowing the curve forces the peak up as 1/σ1/\sigma — the readout peak×σ\text{peak}\times\sigma is a constant 1/2π=0.39891/\sqrt{2\pi}=0.3989. You cannot have a distribution that is both narrow and short. Push σ\sigma to its minimum and you are watching the Dirac delta of Chapter 0.9 form; the same height-versus-width trade, applied to a wave function and its Fourier transform, is the uncertainty principle (Problem 4).
In plain terms 0.2.4

Here is an integral that cannot be done in the ordinary way, and the obstruction is a theorem rather than a shortage of ingenuity: the bell curve has no antiderivative among the usual functions. With no elementary route in, the section takes one that looks like sleight of hand and is not. Square the integral, so that one copy of the problem becomes two independent copies laid at right angles, and read the result as a single integral over a plane.

Why that helps is the part to keep. On the plane the integrand depends only on distance from the origin, and rewriting it in terms of distance and angle forces a factor of the distance into the patch of area, since a patch far out covers more ground than the same span of angle close in. That factor is exactly what the one-dimensional problem lacked. Geometry supplies what algebra could not, and the pi in the answer comes from the angular direction, which is to say from the existence of a circle. Nothing in the original problem could have warned you it was coming.

Learn this one properly, because an unreasonable quantity of physics rests on it. Attach a source to the exponent, differentiate with respect to the source, and you have in miniature the working method by which quantum field theory extracts every prediction it makes.

5 · Improper integrals, and when things diverge

Every integral in §4 ran to infinity, so we should be precise about what that means. An integral over an unbounded region is defined as a limit of integrals over bounded ones:

1f(x)dx    limR1Rf(x)dx, \int_1^{\infty} f(x)\,\dd x \;\equiv\; \lim_{R\to\infty}\int_1^{R} f(x)\,\dd x, (0.2.30)

and it exists only if that limit does. The canonical test case is the power law, and it is worth doing once because it decides essentially every convergence question in physics.

For p1p\neq1, (0.2.12) gives

1Rxpdx=[x1p1p]1R=R1p11p, \int_1^{R} x^{-p}\,\dd x = \left[\frac{x^{1-p}}{1-p}\right]_1^{R} = \frac{R^{1-p}-1}{1-p}, (0.2.31)

and everything hinges on the sign of 1p1-p. If p>1p \gt 1 then 1p<01-p\lt0, so R1p0R^{1-p}\to0 and the integral converges to 1/(p1)1/(p-1). If p<1p\lt1 then R1pR^{1-p}\to\infty and it diverges. The borderline p=1p=1 has to be done separately because the antiderivative changes character: 1Rx1dx=lnR\int_1^R x^{-1}\dd x = \ln R \to \infty. So

1dxxp  converges    p>1,01dxxp  converges    p<1. \int_1^{\infty}\frac{\dd x}{x^{p}} \ \text{ converges} \iff p \gt 1, \qquad\qquad \int_0^{1}\frac{\dd x}{x^{p}} \ \text{ converges} \iff p \lt 1. (0.2.32)

The second half of (0.2.32) is the identical computation with the limit taken at the other end (ϵ1xpdx=(1ϵ1p)/(1p)\int_\epsilon^1 x^{-p}\dd x = (1-\epsilon^{1-p})/(1-p)), and it says something you should hold onto: the same integrand can fail at either end, and for opposite reasons. 1/x1/x diverges at both. Nothing converges at both ends by being a pure power law. You need different behaviour in the two regimes, and that is why real physical answers always have a scale in them somewhere.

Which brings us to the payoff. The quantum corrections of Chapter 5.10 look like Λd4k/k4lnΛ\int^{\Lambda}\dd^{4}k/k^{4}\sim\ln\Lambda and diverge as the cutoff is removed. That is not a new pathology of quantum field theory. It is exactly (0.2.32) in momentum space, failing at the large-kk ("ultraviolet") end, with the small-kk ("infrared") end able to fail independently for the other reason. Renormalisation is the disciplined handling of that: such an integral was never a physical quantity on its own, and what you actually measure is a combination in which the divergence cancels and a finite, scale-dependent answer survives.

Familiar ground

You have been computing definite integrals professionally for years. The area under the plasma concentration–time curve is one:

AUC  =  0C(t)dt. \mathrm{AUC} \;=\; \int_0^{\infty} C(t)\,\dd t.

Take first-order elimination, C(t)=C0ektC(t)=C_0\ee^{-kt}. An antiderivative of ekt\ee^{-kt} is ekt/k-\ee^{-kt}/k, so by (0.2.12) and (0.2.30),

AUC=C0limR[ektk]0R=C0limR1ekRk=C0k. \mathrm{AUC} = C_0\lim_{R\to\infty}\left[\frac{-\ee^{-kt}}{k}\right]_0^{R} = C_0\lim_{R\to\infty}\frac{1-\ee^{-kR}}{k} = \frac{C_0}{k}.

With C0=Dose/VC_0 = \text{Dose}/V this gives AUC=Dose/(Vk)\mathrm{AUC} = \text{Dose}/(Vk), i.e. CL=Dose/AUC=VkCL = \text{Dose}/\mathrm{AUC} = Vk. That is the identity you use without thinking, now derived in three lines from the definition of an integral.

But the structural point is better than the formula. Define cumulative exposure E(t)=0tCE(t)=\int_0^{t}C. Then (0.2.9) says E(t)=C(t)E'(t)=C(t): concentration is the rate of accumulation of exposure. AUC is not "a summary statistic that happens to be an area". It is the accumulated quantity of which the measured concentration is precisely the derivative. That is why AUC, not CmaxC_{\max}, is the exposure metric that pairs with a clearance, and it is why Problem 3's infusion gives the same AUC as a bolus: the total accumulated is fixed by the total delivered and the rate constant, no matter how you schedule it.

Now the bridge, and it is a real one rather than a pun. In Chapter 1.2 the central object of all of classical and quantum physics is

S[path]  =  t1t2L(q(t),q˙(t))dt, S[\text{path}] \;=\; \int_{t_1}^{t_2} L\big(q(t),\dot q(t)\big)\,\dd t,

the action: a single number obtained by accumulating a rate (the Lagrangian, in units of energy) over an entire history. Structurally that is your AUC, one number summarising a whole time course. The difference is what you do with it. AUC is a number you measure for the history that happened. The action is a number you compute for every history that might have happened, and the law of physics is that nature picks the history where SS is stationary. Chapter 1.2 makes that precise, and by then you will already know that the way you extract a law from an integral like that is integration by parts.

⚠ Why this isn't obvious

Differentiation is an algorithm. Hand me any function built from powers, exponentials, logs and trig functions by adding, multiplying, dividing and composing, and the rules of Chapter 0.1 will grind out its derivative mechanically, and the answer will be a function of the same kind. The class is closed.

Integration is not an algorithm, and the class is not closed. There is no procedure that antidifferentiates an arbitrary elementary function, because the antiderivative frequently is not an elementary function. The examples are not obscure:

ex2,sinxx,exx,1+x4,1lnx \ee^{-x^{2}}, \qquad \frac{\sin x}{x}, \qquad \frac{\ee^{x}}{x}, \qquad \sqrt{1+x^{4}}, \qquad \frac{1}{\ln x}

none of which has an elementary antiderivative. ⚑ Quoted, not proved: this is a theorem (Liouville, 1835, with Risch later turning it into an actual decision procedure), not a confession that nobody has been clever enough. There is no answer to find.

Three consequences follow, and all of them shape this book. First, §4 was not evasion. Squaring and going to polar is the only way in, and note that it delivers the integral over the whole line and gives you nothing at all for 01ex2dx\int_0^{1}\ee^{-x^{2}}\dd x, which has no closed form and never will. Second, the handful of integrals that can be done, meaning Gaussians and things reducible to Gaussians, therefore carry a wildly disproportionate load in theoretical physics. Third, and least comfortable: when you notice that Gaussians are everywhere in physics, part of the reason is genuinely physical (the central limit theorem of Chapter 0.9, and the fact that any smooth minimum looks quadratic, Chapter 0.3), and part of the reason is that Gaussians are what we can integrate. Perturbation theory in quantum field theory is, structurally, the practice of expanding around the one integral we can do. It is worth knowing which part of a formalism is nature and which part is our own limitations.

In plain terms 0.2.5

The infinity written at the top of these integrals is shorthand for a limit, and the limit is over ordinary integrals across larger and larger finite regions. Whether it exists is decided, in nearly every case a physicist meets, by comparison against a power law: a steep enough power converges at the far end, a mild enough one converges at the near end, and the two conditions pull in opposite directions.

That opposition has a consequence worth carrying. No pure power law behaves at both ends at once, so something must change character in between, which is why a genuine physical answer always has a scale buried in it. When quantum field theory produces a quantity that runs away at short distances, that is this same test failing at the far end rather than an exotic disease, and extracting a finite prediction anyway is what renormalisation means.

One honest admission to close on. Integration, unlike differentiation, is not an algorithm, and most functions have no antiderivative you can write down. The handful that can be integrated therefore carry far more weight than their number suggests, and part of the reason bell curves are everywhere is that they are what we can integrate. It is worth being able to say which parts of a formalism are nature and which are our own limitations.

6 · Worked examples

Two examples, each spending a different part of the chapter. The first turns an integral over an infinite region into a number you already know. The second gets an integral without ever doing it.

Worked example 1 — escape velocity, from an integral over an infinite region

How fast must you throw something so that it never comes back?

Newton's gravitational force on a mass mm at distance rr from a body of mass MM has magnitude GMm/r2GMm/r^{2}, directed inward. To move the mass from the surface r=Rr=R out to r=r=\infty against that force, you must supply work equal to the accumulated force-times-distance. That is exactly a definite integral, because the force is not constant along the way:

W=RGMmr2dr=GMmlimρ[1r]Rρ=GMmlimρ(1R1ρ)=GMmR. W = \int_R^{\infty}\frac{GMm}{r^{2}}\,\dd r = GMm\lim_{\rho\to\infty}\Big[-\tfrac{1}{r}\Big]_R^{\rho} = GMm\lim_{\rho\to\infty}\Big(\tfrac{1}{R}-\tfrac{1}{\rho}\Big) = \frac{GMm}{R}.

The integral converges because the exponent is p=2>1p=2\gt1, exactly the criterion of (0.2.32). This is not a technicality: it is the reason escape is possible at all. An infinite journey costs a finite amount of energy only because gravity weakens faster than 1/r1/r. If gravity fell off as 1/r1/r the integral would be ln\ln-divergent and nothing could ever escape anything.

Now supply that energy from the kinetic energy the object starts with. Setting 12mvesc2=GMm/R\tfrac12 mv_{\text{esc}}^{2}=GMm/R and solving,

vesc=2GMR. v_{\text{esc}} = \sqrt{\frac{2GM}{R}}.

For Earth, GM=3.986×1014 m3s2GM = 3.986\times10^{14}\ \mathrm{m^{3}s^{-2}} and R=6.371×106R = 6.371\times10^{6} m, giving vesc=1.119×104 ms1v_{\text{esc}} = 1.119\times10^{4}\ \mathrm{m\,s^{-1}}, about 11.2 kms111.2\ \mathrm{km\,s^{-1}}. The mass mm cancelled, which is the equivalence principle showing up uninvited three parts early (Chapter 3.1).

One more thing to notice, because it is the Fundamental Theorem leaving a fingerprint on physical convention. The antiderivative GMm/r-GMm/r is only defined up to a constant, and we chose the constant by taking the reference point at infinity. That choice is why gravitational potential energy is negative for bound objects. The constant is physically meaningless, since only differences of potential energy appear in (0.2.12). The convention still matters for reading signs off the page. In general relativity the same freedom is far less innocent: there, energy itself has no local definition, for reasons traceable to this ambiguity (Chapter 3.5).

Worked example 2 — the width of a Gaussian, by parameter differentiation

For the normalised distribution ρ(x)=Neax2\rho(x) = \mathcal{N}\ee^{-ax^{2}}, find x2\avg{x^{2}}.

First the normalisation. Demanding ρ=1\int\rho = 1 and using (0.2.23):

Nπa=1N=aπ. \mathcal{N}\sqrt{\frac{\pi}{a}} = 1 \qquad\Longrightarrow\qquad \mathcal{N}=\sqrt{\frac{a}{\pi}}.

Now the second moment. By definition x2=x2ρ(x)dx\avg{x^{2}} = \int x^{2}\rho(x)\,\dd x, and rather than attack that integral we use the parameter trick of §4.4. Write the normalisation identity with the parameter left visible,

Z(a)eax2dx=πa1/2, Z(a) \equiv \int_{-\infty}^{\infty}\ee^{-ax^{2}}\dd x = \sqrt{\pi}\,a^{-1/2},

and differentiate both sides with respect to aa. On the left, a\partial_a acting on the integrand brings down x2-x^{2}, and on the right it is one line of the power rule:

x2eax2dx=dZda=12πa3/2. -\int x^{2}\ee^{-ax^{2}}\dd x = \dv{Z}{a} = -\tfrac12\sqrt{\pi}\,a^{-3/2}.

Therefore x2eax2dx=12πa3/2\int x^{2}\ee^{-ax^{2}}\dd x = \tfrac12\sqrt\pi\,a^{-3/2}, and dividing by Z(a)=πa1/2Z(a)=\sqrt\pi\,a^{-1/2} to normalise:

  x2=12πa3/2πa1/2=12a.   \boxed{\;\avg{x^{2}} = \frac{\tfrac12\sqrt\pi\,a^{-3/2}}{\sqrt{\pi}\,a^{-1/2}} = \frac{1}{2a}.\;}

Sanity check against the form you know: the statistician's Gaussian is ex2/2σ2\ee^{-x^{2}/2\sigma^{2}}, i.e. a=1/2σ2a = 1/2\sigma^{2}, and the formula returns x2=σ2\avg{x^{2}} = \sigma^{2}. ✓ The variance is the reciprocal of twice the exponent's coefficient, which is the sanest way to read a Gaussian: a big aa means a sharply peaked, narrow distribution.

Observe the economy. We never integrated x2eax2x^{2}\ee^{-ax^{2}}. We differentiated a known answer with respect to a parameter that was sitting there anyway. In Chapter 5.7 this is done with a source rather than a coefficient (§4.5), the integration variable is a field, and the resulting "x2\avg{x^{2}}" is the propagator. Underneath, it is this calculation.

And it is about to be a physical prediction. In Chapter 4.6 a free particle in a Gaussian wave packet has ψ(x)eax2\psi(x)\propto\ee^{-ax^{2}}, so its probability density is ψ2e2ax2|\psi|^{2}\propto\ee^{-2ax^{2}}, which is the same shape with a2aa\to2a. The position uncertainty is therefore

(Δx)2=x2=12(2a)=14a,Δx=12a. (\Delta x)^{2} = \avg{x^{2}} = \frac{1}{2(2a)} = \frac{1}{4a}, \qquad \Delta x = \frac{1}{2\sqrt a}.

Problem 4 computes the width of the same packet in momentum space and finds Δk=a\Delta k=\sqrt a. Multiply: ΔxΔk=12\Delta x\,\Delta k = \tfrac12, independent of aa. That is the Heisenberg uncertainty relation, exactly saturated, and you will have derived it in Chapter 0.2 using nothing but a Gaussian integral and a derivative with respect to a parameter.

7 · Your turn

Four problems. The first two set integration by parts and parameter differentiation against each other on the same family of integrals, so you can see what each one costs. The third is a mass balance you already trust, redone as a boundary-term argument. The fourth builds most of the uncertainty principle out of this chapter alone.

Problem 1 · by parts twice, then all at once

Evaluate 0x2exdx\int_0^{\infty} x^{2}\ee^{-x}\,\dd x by integrating by parts twice, checking the boundary terms rather than assuming them. Then define In=0xnexdxI_n = \int_0^{\infty}x^{n}\ee^{-x}\dd x and derive a reduction formula relating InI_n to In1I_{n-1}, then solve it. Finally, write down the indefinite integral x2exdx\int x^{2}\ee^{-x}\dd x and verify it by differentiating.

Solution

The definite integral. Take u=x2u=x^{2}, v=exv'=\ee^{-x}, so u=2xu'=2x and v=exv=-\ee^{-x}. Then (0.2.16) gives

0x2exdx=[x2ex]0+20xexdx. \int_0^{\infty}x^{2}\ee^{-x}\dd x = \Big[-x^{2}\ee^{-x}\Big]_0^{\infty} + 2\int_0^{\infty}x\,\ee^{-x}\dd x.

The boundary term: at x=0x=0 the factor x2x^{2} kills it, and as xx\to\infty, ex\ee^{-x} decays faster than any power grows, so x2ex0x^{2}\ee^{-x}\to0. (That claim is worth one line: write ex>x3/6\ee^{x} \gt x^{3}/6 for x>0x\gt0, which follows from the series, so x2ex<6/x0x^{2}\ee^{-x} \lt 6/x \to 0.) The boundary term is genuinely zero, checked.

Repeat on the survivor with u=xu=x, v=exv'=\ee^{-x}:

0xexdx=[xex]0+0exdx=0+[ex]0=1. \int_0^{\infty}x\,\ee^{-x}\dd x = \Big[-x\ee^{-x}\Big]_0^{\infty} + \int_0^{\infty}\ee^{-x}\dd x = 0 + \Big[-\ee^{-x}\Big]_0^{\infty} = 1.

Hence 0x2exdx=21=2\int_0^{\infty}x^{2}\ee^{-x}\dd x = 2\cdot 1 = 2.

Reduction formula. The same step with u=xnu = x^{n} gives, for n1n\ge1,

In=[xnex]0+n0xn1exdx=nIn1. I_n = \Big[-x^{n}\ee^{-x}\Big]_0^{\infty} + n\int_0^{\infty}x^{n-1}\ee^{-x}\dd x = n\,I_{n-1}.

With I0=0exdx=1I_0=\int_0^{\infty}\ee^{-x}\dd x = 1, iterating gives In=n!I_n = n!. Check: I2=2I_2 = 2. ✓

This function of nn is the gamma function, Γ(n+1)=n!\Gamma(n+1)=n!, and the reduction formula you just derived is the reason Γ\Gamma interpolates the factorials to non-integer arguments, which is how dimensional regularisation in Chapter 5.10 gets away with computing integrals in 4ϵ4-\epsilon dimensions.

Indefinite. Running by parts without limits (or just guessing a quadratic times ex\ee^{-x} and matching):

x2exdx=(x2+2x+2)ex+C. \int x^{2}\ee^{-x}\dd x = -\big(x^{2}+2x+2\big)\ee^{-x} + C.

Check by the product rule: ddx[(x2+2x+2)ex]=(2x+2)ex+(x2+2x+2)ex=x2ex\dv{}{x}\big[-(x^{2}+2x+2)\ee^{-x}\big] = -(2x+2)\ee^{-x} + (x^{2}+2x+2)\ee^{-x} = x^{2}\ee^{-x}. ✓ Evaluating from 00 to \infty: 0(2)=20 - (-2) = 2, agreeing with the definite calculation.

Problem 2 · parameter differentiation, in its purest form

Show that 0eaxdx=1/a\int_0^{\infty}\ee^{-ax}\dd x = 1/a for a>0a\gt0. Then, by differentiating nn times with respect to aa, obtain 0xneaxdx=n!/an+1\int_0^{\infty}x^{n}\ee^{-ax}\dd x = n!/a^{n+1} without integrating by parts even once. Check it against Problem 1.

Solution

The base integral. An antiderivative of eax\ee^{-ax} is eax/a-\ee^{-ax}/a, so by (0.2.30) and (0.2.12),

0eaxdx=limR1eaRa=1a(a>0). \int_0^{\infty}\ee^{-ax}\dd x = \lim_{R\to\infty}\frac{1-\ee^{-aR}}{a} = \frac1a \qquad (a\gt0).

The condition a>0a\gt0 is where convergence lives. For a0a\le0 the integrand does not decay and there is nothing to compute.

Differentiate. Each a\partial_a on the integrand brings down a factor x-x:

dndaneax=(x)neax. \frac{\dd^{\,n}}{\dd a^{\,n}}\ee^{-ax} = (-x)^{n}\ee^{-ax}.

On the right-hand side, differentiate a1a^{-1} repeatedly: ddaa1=a2\dv{}{a}a^{-1}=-a^{-2}, then +2a3+2a^{-3}, then 6a4-6a^{-4}, and in general dndana1=(1)nn!a(n+1)\frac{\dd^{n}}{\dd a^{n}}a^{-1} = (-1)^{n}n!\,a^{-(n+1)}, provable by induction in one line, since differentiating (1)nn!a(n+1)(-1)^{n}n!a^{-(n+1)} gives (1)n+1(n+1)!a(n+2)(-1)^{n+1}(n+1)!a^{-(n+2)}. Equating the two sides,

(1)n0xneaxdx=(1)nn!an+10xneaxdx=n!an+1. (-1)^{n}\int_0^{\infty}x^{n}\ee^{-ax}\dd x = (-1)^{n}\,\frac{n!}{a^{n+1}} \qquad\Longrightarrow\qquad \int_0^{\infty}x^{n}\ee^{-ax}\dd x = \frac{n!}{a^{n+1}}.

Check. Setting a=1a=1 recovers In=n!I_n = n! from Problem 1, which was obtained by nn applications of integration by parts. Here it took one integral and a pattern in derivatives.

Legality. As in the grind box of §4.4, restrict aa to [a0,)[a_0,\infty) with a0>0a_0\gt0. Then xneaxxnea0x|x^{n}\ee^{-ax}|\le x^{n}\ee^{-a_0x}, a fixed integrable function, so the swap of a\partial_a and \int is justified. Note this is also a compact proof that Γ(n+1)=n!\Gamma(n+1)=n!, and that the whole family of "\int polynomial times exponential" integrals is generated by one seed and the power rule. That is the pattern to steal: find the seed integral with a parameter in it, then differentiate.

Problem 3 · AUC does not care about the schedule

A drug is given by constant-rate IV infusion at rate RR (mass per time) for a duration TT, then stopped. Elimination is first order with rate constant kk from a single compartment of volume VV, so the concentration obeys VdCdt=RΘ(t)kVCV\dv{C}{t} = R\,\Theta(t) - kVC, where Θ\Theta is 11 during the infusion and 00 after.

(a) Solve for C(t)C(t) during and after the infusion. (b) Compute AUC=0Cdt\mathrm{AUC}=\int_0^{\infty}C\,\dd t and show it equals Dose/(Vk)\text{Dose}/(Vk), identical to a bolus of the same total dose. (c) Then obtain the same result in two lines without solving the differential equation at all.

Solution

(a) During infusion, dCdt=R/VkC\dv{C}{t} = R/V - kC. The steady state is C=R/(kV)C_{\infty}=R/(kV). Writing C=C+uC = C_{\infty}+u turns the equation into u˙=ku\dot u = -ku, whose solution (Chapter 0.1, §5) is u=u0ektu = u_0\ee^{-kt}. With C(0)=0C(0)=0 we need u0=Cu_0 = -C_{\infty}, so for 0tT0\le t\le T

C(t)=RkV(1ekt). C(t) = \frac{R}{kV}\Big(1-\ee^{-kt}\Big).

After the infusion stops, elimination is pure first order from CTC(T)C_T \equiv C(T):

C(t)=CTek(tT),CT=RkV(1ekT). C(t) = C_T\,\ee^{-k(t-T)}, \qquad C_T = \frac{R}{kV}\Big(1-\ee^{-kT}\Big).

(b) Split the integral at TT. The tail is the Familiar-ground calculation: TC=CT/k\int_T^{\infty}C = C_T/k. The infusion phase:

0TRkV(1ekt)dt=RkV[t+ektk]0T=RkV(T1ekTk). \int_0^{T}\frac{R}{kV}\Big(1-\ee^{-kt}\Big)\dd t = \frac{R}{kV}\left[t+\frac{\ee^{-kt}}{k}\right]_0^{T} = \frac{R}{kV}\left(T - \frac{1-\ee^{-kT}}{k}\right).

Add them, writing CT/k=Rk2V(1ekT)C_T/k = \dfrac{R}{k^{2}V}\big(1-\ee^{-kT}\big):

AUC=RTkVR(1ekT)k2V+R(1ekT)k2V=RTkV=DoseVk=DoseCL, \mathrm{AUC} = \frac{RT}{kV} - \frac{R\big(1-\ee^{-kT}\big)}{k^{2}V} + \frac{R\big(1-\ee^{-kT}\big)}{k^{2}V} = \frac{RT}{kV} = \frac{\text{Dose}}{Vk} = \frac{\text{Dose}}{CL},

since the total dose delivered is RTRT. Every trace of TT beyond the total dose cancelled exactly. Infuse it over a minute or over a week: same AUC.

(c) The two-line version, which is the point of the problem. Do not solve anything. Integrate the differential equation itself from 00 to \infty, using (0.2.12) on the left:

V0dCdtdt=0RΘ(t)dtkV0Cdt V\int_0^{\infty}\dv{C}{t}\,\dd t = \int_0^{\infty} R\,\Theta(t)\,\dd t - kV\int_0^{\infty}C\,\dd t V[C()C(0)]=DosekVAUC. \Longrightarrow\qquad V\Big[C(\infty)-C(0)\Big] = \text{Dose} - kV\cdot\mathrm{AUC}.

With C(0)=C()=0C(0)=C(\infty)=0 the left side vanishes, and

AUC=DosekV=DoseCL. \mathrm{AUC} = \frac{\text{Dose}}{kV} = \frac{\text{Dose}}{CL}.

No solution of the ODE, no case-splitting, no exponentials. This is the Fundamental Theorem doing exactly what the insight callout in §2 advertised: a local statement (the mass-balance differential equation, true at each instant) has been converted into a global conservation statement (everything that went in eventually came out) by integrating, with only boundary values surviving. It also shows that AUC=Dose/CL\mathrm{AUC}=\text{Dose}/CL holds for any input schedule whatsoever, whether oral, infused, divided or erratic, provided elimination is linear. That robustness is not a pharmacological coincidence. It is a boundary-term argument.

Problem 4 · the Fourier transform of a Gaussian

Show that for a>0a\gt0

eax2cos(bx)dx=πa  eb2/4a. \int_{-\infty}^{\infty}\ee^{-ax^{2}}\cos(bx)\,\dd x = \sqrt{\frac{\pi}{a}}\;\ee^{-b^{2}/4a}.

Do it by parameter differentiation in bb: differentiate under the integral sign, integrate the result by parts, and notice that you have obtained a differential equation for the answer. Then say what the result means about widths.

Solution

Define J(b)=eax2cos(bx)dxJ(b) = \int_{-\infty}^{\infty}\ee^{-ax^{2}}\cos(bx)\,\dd x. From (0.2.23), J(0)=π/aJ(0)=\sqrt{\pi/a}.

Differentiate in bb. The integrand's bb-derivative is xeax2sin(bx)-x\,\ee^{-ax^{2}}\sin(bx), dominated in absolute value by xeax2|x|\ee^{-ax^{2}}, which is integrable and independent of bb, so the swap is legal:

J(b)=xeax2sin(bx)dx. J'(b) = -\int_{-\infty}^{\infty} x\,\ee^{-ax^{2}}\sin(bx)\,\dd x.

Integrate by parts. The factor xeax2x\,\ee^{-ax^{2}} is a derivative in disguise: ddx(12aeax2)=xeax2\dv{}{x}\left(-\tfrac{1}{2a}\ee^{-ax^{2}}\right) = x\,\ee^{-ax^{2}}. So take v=xeax2v' = x\ee^{-ax^{2}}, v=12aeax2v = -\tfrac{1}{2a}\ee^{-ax^{2}} and u=sin(bx)u=\sin(bx), u=bcos(bx)u'=b\cos(bx) in (0.2.16):

J(b)={[sin(bx)2aeax2]+b2aeax2cos(bx)dx}. J'(b) = -\left\{\left[-\frac{\sin(bx)}{2a}\ee^{-ax^{2}}\right]_{-\infty}^{\infty} + \frac{b}{2a}\int_{-\infty}^{\infty}\ee^{-ax^{2}}\cos(bx)\,\dd x\right\}.

The boundary term vanishes because eax20\ee^{-ax^{2}}\to0 at both ends while sin\sin stays bounded. That is checked, not assumed. What survives is

J(b)=b2aJ(b). J'(b) = -\frac{b}{2a}\,J(b).

Solve. This is a first-order linear equation of exactly the kind in Chapter 0.1 §5, except that the rate is proportional to bb rather than constant. Separating, ddblnJ=b/2a\dv{}{b}\ln J = -b/2a, so lnJ=b2/4a+const\ln J = -b^{2}/4a + \text{const}, i.e. J(b)=J(0)eb2/4aJ(b) = J(0)\,\ee^{-b^{2}/4a}. With J(0)=π/aJ(0)=\sqrt{\pi/a}:

eax2cos(bx)dx=πa  eb2/4a. \int_{-\infty}^{\infty}\ee^{-ax^{2}}\cos(bx)\,\dd x = \sqrt{\frac{\pi}{a}}\;\ee^{-b^{2}/4a}. \qquad\checkmark

(Cross-check: since eax2sin(bx)dx=0\int\ee^{-ax^{2}}\sin(bx)\dd x = 0 by oddness, this is the real and complete content of eax2eibxdx\int\ee^{-ax^{2}}\ee^{\ii bx}\dd x, which is (0.2.25) with bibb\to \ii b. The two agree, which is the first hint that (0.2.25) continues to hold for complex bb, and Chapter 5.4 makes that legitimate, once contour integration is on the table.)

What it means. This is the Fourier transform of a Gaussian, and it is a Gaussian, the only function shape that is its own transform. Now look at the widths. Reading off Worked example 2, a factor eax2\ee^{-ax^{2}} corresponds to a probability density e2ax2\ee^{-2ax^{2}} with Δx=1/(2a)\Delta x = 1/(2\sqrt a). The transform eb2/4a\ee^{-b^{2}/4a} corresponds to a density eb2/2a\ee^{-b^{2}/2a} with Δb=a\Delta b = \sqrt a. Their product is

ΔxΔb=12aa=12, \Delta x\,\Delta b = \frac{1}{2\sqrt a}\cdot\sqrt a = \frac12,

independent of aa. Squeeze the function in xx and its transform spreads in bb by exactly the reciprocal amount. That is what the width slider in §4's figure was showing you geometrically for a single Gaussian, now made into a statement relating two functions.

Chapter 0.9 proves the general inequality ΔxΔb12\Delta x\,\Delta b\ge\tfrac12 for any function, with equality only for Gaussians. That is the bandwidth theorem, a fact about waves that has nothing to do with quantum mechanics. Quantum mechanics then contributes one physical identification, b=p/b = p/\hbar (Chapter 4.6), and the same line reads ΔxΔp/2\Delta x\,\Delta p \ge \hbar/2. You have just done most of the work for the Heisenberg uncertainty principle, in a chapter about integration, using nothing but by parts and a derivative with respect to a parameter.

The brick you just laid

You have the integral as a limit of tagged sums ((0.2.2)), with an honest account of what has to be true for that limit to exist and a preview of why the definition gets replaced. You have both halves of the Fundamental Theorem derived from Chapter 0.1's linearisation, the first by observing that a thin sliver is a rectangle up to second order, the second by noticing that telescoped interior terms cancel and only the boundary survives. You have substitution and integration by parts as the chain and product rules run backwards, and you know that "the boundary term vanishes" is a physical claim. You can do the Gaussian integral in all three forms, and you can generate its moments by differentiating with respect to a parameter. And you know exactly when an improper integral converges, which is the same question as when a quantum field theory diverges.

Where this gets spent.

  • The Fundamental Theorem → Chapter 0.7, where interior-cancellation becomes Green's, Stokes' and the divergence theorems. Then Chapter 3.5, where local conservation laws are integrated into global ones, and where the attempt sometimes fails, informatively.
  • Integration by parts → Chapter 1.2, where it converts stationary action into the Euler–Lagrange equation. Chapter 5.2, where the identical step produces every classical field equation. Chapter 4.4, where it makes ix-\ii\hbar\partial_x Hermitian and thereby makes momentum an observable.
  • The Gaussian integral → Chapter 4.6 (normalising a wave packet), Chapter 5.4 (the free propagator, where the Gaussian is oscillatory and you meet the iϵ\ii\epsilon prescription), Chapter 5.7 (where all of perturbative QFT is (0.2.25) plus corrections).
  • Parameter differentiation → Chapter 5.8, where differentiating with respect to a source is how every correlation function and every Feynman diagram is extracted from a generating functional.
  • Convergence of improper integrals → Chapter 5.10, where the failure of (0.2.32) at large momentum is the ultraviolet divergence and renormalisation is what you do about it.

Next, Chapter 0.3 takes the observation that kept surfacing here, namely that the leftover error after linearising is quadratic, and after that cubic, and so on. Chapter 0.3 turns that into a systematic expansion, and it is the tool physicists reach for more often than any other, because almost nothing is solvable and almost everything is nearly solvable.