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 you have it, the integral is trivial.

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.

Example: 2tcos(t2)dt\int 2t \cos(t^2)\, dt. 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.

Example: tetdt\int t\, e^t\, dt. 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.

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.

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 N(x)/D(x)N(x)/D(x) (polynomial over polynomial) with distinct real roots in the denominator can be decomposed into a sum of simpler fractions, each of which integrates straightforwardly. The technique is essential for two things we do later: computing inverse Fourier and Laplace transforms of rational H(ω)H(\omega) or H(s)H(s), and decomposing transfer functions of filters into their modal contributions.

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.

When does this come up? A second-order linear filter has a transfer function H(s)=1/(s2+2γs+ω02)H(s) = 1 / (s^2 + 2\gamma s + \omega_0^2). Factoring the denominator into its roots (sλ+)(sλ)(s - \lambda_+)(s - \lambda_-) and applying partial fractions converts the transfer function into a sum of two first-order pieces — each of which has a simple impulse response eλte^{\lambda t}. The full impulse response is then a sum of the two exponentials. This is the standard route from frequency-domain H(ω)H(\omega) to time-domain h(t)h(t) in linear-systems analysis.

Worked example: partial-fraction decomposition with a repeated root

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. The full algorithm is worth committing to memory; it is the workhorse of inverse Fourier and Laplace transforms in Foundations 7.3 and beyond.

RMS values

A frequent application of integration on the bookshelf. 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}.

For a sinusoid f(t)=Acos(ωt)f(t) = A \cos(\omega t), frms=A/2f_\text{rms} = A / \sqrt{2}. The RMS value captures the amplitude scale of the signal in a way that respects sign cancellations: a pure sinusoid has zero mean but a non-zero RMS, and the RMS scales linearly with amplitude.

Acoustic intensity, pressure amplitude on a microphone, electrical power dissipated by an AC current — all of these are most naturally written in terms of RMS values, because all of them depend on f2f^2. We meet RMS again in Sound 5.3 — Intensity.

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.