1.2 Integrals

If derivatives describe rates of change, integrals describe accumulated quantities. The integral of velocity over time is displacement; the integral of force over distance is work; the integral of acoustic pressure squared over time is acoustic energy. Every conservation law in physics is, when stated quantitatively, an integral equation.

This lesson develops the working subset of integration: what an integral is (the Riemann sum), the fundamental theorem that ties integration to differentiation, and the three manipulation rules — substitution, integration by parts, and partial fractions — that handle nearly every integral you’ll meet in the rest of the bookshelf.

The Riemann integral

0.002.00f(x) = x²
function:
rule:
sum = 2.6600 exact = 2.6667 error = -0.0067

The interactive shows the Riemann sum — the definite integral built up as the sum of areas of thin rectangles. Pick a function, a sampling rule (left, midpoint, right), and a partition count NN. Watch the sum converge to the exact value as NN grows. The midpoint rule typically wins per partition; the left and right rules under- or over-estimate when the function has monotone curvature.

The Riemann integral is

abf(t)dt  =  limNi=1Nf(ti)Δt,\int_a^b f(t)\, dt \;=\; \lim_{N \to \infty} \sum_{i=1}^{N} f(t_i)\, \Delta t,

where the partition {ti}\{t_i\} subdivides [a,b][a, b] into NN intervals of width Δt=(ba)/N\Delta t = (b - a)/N. It measures the signed area under ff over [a,b][a, b] — positive where f>0f > 0, negative where f<0f < 0.

The fundamental theorem of calculus ties differentiation and integration together: if F(t)=f(t)F'(t) = f(t) for some antiderivative FF, then

abf(t)dt  =  F(b)F(a).\int_a^b f(t)\, dt \;=\; F(b) - F(a).

This is one of the most-used identities in physics. It converts an integral — a limit of sums, conceptually awkward and computationally expensive — into a difference of two function values. The challenge of integration is therefore mostly finding the antiderivative FF for a given ff; once FF is found, the integral is trivial.

The history — Riemann's integral and the price of rigour

Bernhard Riemann’s 1854 Habilitationsschrift gave the integral its modern definition: the limit of sums f(ti)Δt\sum f(t_i)\Delta t as the partition is refined, taken over arbitrary partitions and arbitrary sample points tit_i, with the requirement that the limit exists and is independent of the choices. This was the first definition that worked for functions more pathological than Cauchy’s 1823 version had allowed — in particular, for functions with infinitely many discontinuities in any interval.

Riemann’s framework made integration a property of the function rather than a recipe for evaluation. A function is Riemann-integrable if the limit exists; not all bounded functions are. Henri Lebesgue’s 1902 reformulation extended the theory to a much wider class (the Lebesgue integral, which agrees with Riemann’s on functions both can handle but assigns values to many that Riemann cannot). For the bounded, piecewise-continuous functions of acoustics and physics, the Riemann integral is enough and is what we use throughout the bookshelf.

The history — Dedekind constructs the real numbers

Calculus assumes the real numbers — that there is a continuum on which limits, derivatives, and integrals make sense. For most of mathematical history this was taken as obvious. Richard Dedekind, in his 1872 essay Stetigkeit und irrationale Zahlen (Continuity and Irrational Numbers), made it rigorous: a real number is a Dedekind cut — a partition of the rationals into two non-empty sets, one entirely below the other, with no rational sitting between them. The cut “is” the irrational at the boundary.

Georg Cantor, the same year, gave an alternative construction via Cauchy sequences of rationals (declaring two sequences equivalent when their difference goes to zero). Both constructions produce the same field of real numbers and the same completeness property: every Cauchy sequence converges. Without one of these constructions, calculus has no logical ground to stand on; with either, every theorem from Cauchy and Riemann to the modern wave equation rests on a defensible foundation.

The three manipulation rules

Linearity

Same form as for derivatives:

(af+bg)dt  =  afdt+bgdt.\int (a f + b g)\, dt \;=\; a \int f\, dt + b \int g\, dt.

Integral of a sum is the sum of integrals. The reason Fourier-series coefficients can be computed term by term.

Substitution

f(g(t))g(t)dt  =  f(u)du,u=g(t).\int f(g(t))\, g'(t)\, dt \;=\; \int f(u)\, du, \qquad u = g(t).

The mirror image of the chain rule for derivatives: if the integrand is a composed function times the inner derivative, the integral simplifies to one in the inner variable.

Substitution: ∫ 2t cos(t²) dt Worked Example

Let u=t2u = t^2, so du=2tdtdu = 2t\, dt. The integral becomes cosudu=sinu+C=sin(t2)+C\int \cos u\, du = \sin u + C = \sin(t^2) + C.

Differentiate to verify: ddtsin(t2)=cos(t2)2t\frac{d}{dt}\sin(t^2) = \cos(t^2) \cdot 2t. ✓

Integration by parts

udv  =  uvvdu.\int u\, dv \;=\; uv - \int v\, du.

The mirror image of the product rule. Useful when the integrand is a product where differentiating one factor and integrating the other gives a simpler integral.

The strategy is to choose uu to be the factor that simplifies under differentiation (often a polynomial), and dvdv to be the factor that’s easy to integrate. Most Fourier-series coefficients are computed via integration by parts on terms of the form tneiωtdt\int t^n\, e^{i\omega t}\, dt — the polynomial tnt^n simplifies on differentiation while the exponential integrates to itself.

Integration by parts: ∫ t eᵗ dt Worked Example

Pick u=tu = t (so du=dtdu = dt) and dv=etdtdv = e^t\, dt (so v=etv = e^t). Then

tetdt  =  tetetdt  =  tetet+C  =  (t1)et+C.\int t\, e^t\, dt \;=\; t e^t - \int e^t\, dt \;=\; t e^t - e^t + C \;=\; (t - 1) e^t + C.

We use integration by parts throughout the Sound book: deriving energy and momentum integrals (Sound Ch 5), computing Fourier coefficients (Sound Ch 8), and reducing the convolution integral.

Partial fractions

A rational function — a polynomial N(x)N(x) over a polynomial D(x)D(x) — is awkward to integrate as written, but easy once it is split into a sum of pieces with a single factor in each denominator. That splitting is partial-fraction decomposition. When D(x)D(x) factors into distinct linear factors, the rule is one term per factor:

N(x)(xr1)(xr2)(xrn)  =  A1xr1+A2xr2++Anxrn,\frac{N(x)}{(x - r_1)(x - r_2)\cdots(x - r_n)} \;=\; \frac{A_1}{x - r_1} + \frac{A_2}{x - r_2} + \cdots + \frac{A_n}{x - r_n},

where the rkr_k are the roots of the denominator and the AkA_k are constants still to be found (this assumes degN<degD\deg N < \deg D; if not, divide first). Each piece Akxrk\tfrac{A_k}{x - r_k} integrates to a logarithm AklnxrkA_k \ln|x - r_k|, so once the constants are known the integral is immediate.

The constants come from the cover-up rule: to isolate AkA_k, multiply both sides by (xrk)(x - r_k) and set x=rkx = r_k; every other term still carries a factor (xrk)(x - r_k) and vanishes, leaving AkA_k alone. The two collapsibles below carry this out — first for distinct roots, then for the two complications, a repeated factor and an irreducible quadratic.

Partial fractions: 1/((x+1)(x+3)) Worked Example

1(x+1)(x+3)=Ax+1+Bx+3\dfrac{1}{(x + 1)(x + 3)} = \dfrac{A}{x + 1} + \dfrac{B}{x + 3}. Multiply both sides by (x+1)(x+3)(x + 1)(x + 3):

1  =  A(x+3)+B(x+1).1 \;=\; A(x + 3) + B(x + 1).

Setting x=1x = -1 kills the BB term: 1=2A1 = 2A, so A=1/2A = 1/2. Setting x=3x = -3 kills the AA term: 1=2B1 = -2B, so B=1/2B = -1/2. Therefore

1(x+1)(x+3)  =  12 ⁣(1x+11x+3),\frac{1}{(x + 1)(x + 3)} \;=\; \frac{1}{2}\!\left(\frac{1}{x + 1} - \frac{1}{x + 3}\right),

and each piece on the right integrates to a logarithm.

Worked example: partial-fraction decomposition with a repeated root Derivation

The simple example above had distinct roots. The general algorithm handles two more cases — repeated real roots and irreducible quadratic (complex-conjugate) factors. Here is a representative worked example with a repeated root.

The problem. Decompose

2x+1(x1)2(x+2).\frac{2 x + 1}{(x - 1)^2 (x + 2)}.

Step 1 — Write the ansatz. For a repeated factor (x1)2(x - 1)^2 we need two terms with descending powers: Ax1\frac{A}{x - 1} and B(x1)2\frac{B}{(x - 1)^2}. Plus the simple factor (x+2)(x + 2) contributes Cx+2\frac{C}{x + 2}. The decomposition takes the form

2x+1(x1)2(x+2)  =  Ax1  +  B(x1)2  +  Cx+2.\frac{2 x + 1}{(x - 1)^2 (x + 2)} \;=\; \frac{A}{x - 1} \;+\; \frac{B}{(x - 1)^2} \;+\; \frac{C}{x + 2}.

Step 2 — Multiply through by the common denominator.

2x+1  =  A(x1)(x+2)  +  B(x+2)  +  C(x1)2.2 x + 1 \;=\; A (x - 1)(x + 2) \;+\; B (x + 2) \;+\; C (x - 1)^2.

Step 3 — Apply the “cover-up” trick at the roots of the denominator.

At x=1x = 1, the AA and CC terms drop out:

2(1)+1  =  B(1+2)    3  =  3B    B=1.2(1) + 1 \;=\; B(1 + 2) \;\Longrightarrow\; 3 \;=\; 3 B \;\Longrightarrow\; B = 1.

At x=2x = -2, the AA and BB terms drop out:

2(2)+1  =  C(21)2    3  =  9C    C=1/3.2(-2) + 1 \;=\; C(-2 - 1)^2 \;\Longrightarrow\; -3 \;=\; 9 C \;\Longrightarrow\; C = -1/3.

Step 4 — Find the remaining coefficient. The cover-up trick gave us BB and CC but not AA. Pick a third value of xx, e.g. x=0x = 0:

2(0)+1  =  A(1)(2)  +  B(2)  +  C(1)2    1  =  2A+5/3    A=1/3.2(0) + 1 \;=\; A(-1)(2) \;+\; B(2) \;+\; C(-1)^2 \;\Longrightarrow\; 1 \;=\; -2 A + 5/3 \;\Longrightarrow\; A = 1/3.

Step 5 — Final decomposition.

  2x+1(x1)2(x+2)  =  1/3x1  +  1(x1)2    1/3x+2.  \boxed{\;\frac{2 x + 1}{(x - 1)^2 (x + 2)} \;=\; \frac{1/3}{x - 1} \;+\; \frac{1}{(x - 1)^2} \;-\; \frac{1/3}{x + 2}.\;}

Step 6 — Sanity-check at x=2x = 2.

LHS: 2(2)+1(21)2(2+2)=54\frac{2(2) + 1}{(2 - 1)^2 (2 + 2)} = \frac{5}{4}.

RHS: 1/31+11+1/34=13+1112=412+1212112=1512=54\frac{1/3}{1} + \frac{1}{1} + \frac{-1/3}{4} = \frac{1}{3} + 1 - \frac{1}{12} = \frac{4}{12} + \frac{12}{12} - \frac{1}{12} = \frac{15}{12} = \frac{5}{4}. ✓

Each term integrates straightforwardly:

1/3x1dx  =  13lnx1,1(x1)2dx  =  1x1,1/3x+2dx  =  13lnx+2.\int \frac{1/3}{x - 1}\, dx \;=\; \frac{1}{3} \ln|x - 1|, \quad \int \frac{1}{(x - 1)^2}\, dx \;=\; -\frac{1}{x - 1}, \quad \int \frac{-1/3}{x + 2}\, dx \;=\; -\frac{1}{3}\ln|x + 2|.

The third case — irreducible quadratic factors like (x2+1)(x^2 + 1) — produces a term of the form (Bx+C)/(x2+1)(Bx + C)/(x^2 + 1) which integrates to a logarithm plus an arctangent. This same decomposition is the standard route from a filter’s transfer function to its time response: factoring H(s)=1/[(sλ+)(sλ)]H(s) = 1/[(s - \lambda_+)(s - \lambda_-)] into first-order pieces gives one simple exponential eλte^{\lambda t} per pole λ\lambda, and the impulse response is their sum — the workhorse of inverse Fourier and Laplace transforms in Foundations 7.3 and beyond.

RMS values

The root-mean-square of a function f(t)f(t) over a duration TT is

frms    1T0Tf(t)2dt,f_\text{rms} \;\equiv\; \sqrt{\frac{1}{T} \int_0^T f(t)^2\, dt},

where TT is the averaging window — one period, for a periodic signal. The name is the recipe read inside-out: square the signal, take its mean over TT (the integral divided by TT), then take the root. Squaring removes the sign, so a quantity that swings symmetrically about zero — and has zero ordinary mean — still has a non-zero RMS that measures its amplitude scale.

f(t)+RMSf(t)²mean of f(t)²
mean square = 0.500 RMS = √(mean square) = 0.707 RMS / A = 0.707 · exact: 1/√2 ≈ 0.707

The upper panel is the signal f(t)f(t); the lower panel is its square f(t)2f(t)^2, with the dashed line at the mean of the square. The RMS is the square root of that mean, drawn back onto the signal as the green band — the constant level that carries the same mean square as the varying signal. Switching waveform at fixed amplitude AA moves the band, because RMS depends on shape, not just peak height: A/2A/\sqrt{2} for a sine, A/3A/\sqrt{3} for a triangle or sawtooth, and the full AA for a square wave, which spends all its time at ±A\pm A.

For the sinusoid f(t)=Acos(ωt)f(t) = A \cos(\omega t) the factor is frms=A/2f_\text{rms} = A/\sqrt{2}, derived in the card below. Acoustic intensity, the pressure amplitude on a microphone, the electrical power dissipated by an AC current — all are written in terms of RMS values, because all depend on f2f^2. We meet RMS again in Sound 5.3 — Intensity.

Check yourself

State the fundamental theorem of calculus and explain why it makes integration useful rather than just a limit of sums.

Reveal answer

If FF is any antiderivative of ff (i.e. F=fF' = f), then abf(t)dt=F(b)F(a)\int_a^b f(t)\,dt = F(b) - F(a). The integral — defined as a limit of Riemann sums, conceptually awkward and computationally expensive — becomes a single subtraction. The hard part of integration is therefore finding FF; once FF is found, evaluation is trivial.

Check yourself

Compute 2tet2dt\int 2t\, e^{t^2}\, dt by substitution. Which derivative rule is substitution the inverse of, and why is that an apt name?

Reveal answer

Let u=t2u = t^2, so du=2tdtdu = 2t\, dt. The integral becomes eudu=eu+C=et2+C\int e^u\, du = e^u + C = e^{t^2} + C.

Substitution is the chain rule run backwards: the chain rule produces ddt ⁣[et2]=et22t\frac{d}{dt}\!\left[e^{t^2}\right] = e^{t^2}\cdot 2t, and substitution recovers the outer function et2e^{t^2} from the integrand et22te^{t^2}\cdot 2t. The “inner derivative” factor that comes out of the chain rule is exactly what you need to cancel in the integrand for substitution to apply.

Check yourself

State the integration-by-parts formula. What choice of uu and dvdv would you make to compute tcos(ωt)dt\int t \cos(\omega t)\, dt, and why?

Reveal answer

udv=uvvdu\int u\, dv = uv - \int v\, du.

Pick u=tu = t (so du=dtdu = dt) and dv=cos(ωt)dtdv = \cos(\omega t)\, dt (so v=sin(ωt)/ωv = \sin(\omega t)/\omega). The strategy is to choose uu as the factor that simplifies under differentiation — here, the polynomial tt becomes the constant 11 — and dvdv as the factor that is easy to integrate. Result:

tcos(ωt)dt  =  tsin(ωt)ωsin(ωt)ωdt  =  tsin(ωt)ω+cos(ωt)ω2+C.\int t\cos(\omega t)\,dt \;=\; \frac{t\sin(\omega t)}{\omega} - \int \frac{\sin(\omega t)}{\omega}\,dt \;=\; \frac{t\sin(\omega t)}{\omega} + \frac{\cos(\omega t)}{\omega^2} + C.

This pattern — polynomial times sinusoid — is exactly what appears when computing Fourier coefficients.

Check yourself

Why does f(t)=Acos(ωt)f(t) = A\cos(\omega t) have frms=A/2f_\text{rms} = A/\sqrt{2}? Derive the factor from the definition.

Reveal answer

frms=(1/T)0TA2cos2(ωt)dtf_\text{rms} = \sqrt{(1/T)\int_0^T A^2 \cos^2(\omega t)\, dt}. Use the identity cos2(ωt)=12(1+cos(2ωt))\cos^2(\omega t) = \tfrac{1}{2}(1 + \cos(2\omega t)). The cos(2ωt)\cos(2\omega t) term integrates to zero over a full period, leaving (1/T)0TA2/2dt=A2/2(1/T)\int_0^T A^2/2\, dt = A^2/2. Square root: A/2A/\sqrt{2}.

The factor 1/20.7071/\sqrt{2} \approx 0.707 is why a “1 V RMS” AC signal has a peak amplitude of 1.414\approx 1.414 V — and why acoustic pressure-amplitude figures must always specify peak vs RMS.

Check yourself

Decompose 1(s+a)(s+b)\frac{1}{(s+a)(s+b)} into partial fractions (with aba \neq b). Where does this come up in the linear-systems work later in the bookshelf?

Reveal answer

1(s+a)(s+b)=1ba ⁣(1s+a1s+b)\frac{1}{(s+a)(s+b)} = \frac{1}{b-a}\!\left(\frac{1}{s+a} - \frac{1}{s+b}\right).

Cover-up: set s=as = -a to get the first coefficient, s=bs = -b for the second. This is the standard route from a second-order linear filter’s transfer function H(s)=1/[(s+a)(s+b)]H(s) = 1/[(s+a)(s+b)] to its time-domain impulse response — each first-order piece inverse-Laplace-transforms to a simple exponential eate^{-at}, and the full response is a sum of the two.

Drill

Rote recall of the standard antiderivatives, as a spaced-repetition deck. Reveal each card, then grade yourself — Again / Hard / Good / Easy — and SM-2 schedules when it returns. Progress is shared with the Foundations study deck.

What’s next

The next lesson, 1.3 — Taylor series and linearisation, shifts focus from finding antiderivatives to approximating functions by polynomials. Taylor series are the bridge between calculus and the linearised theories that dominate physics — including the entire small-perturbation theory of acoustics.