Lemma
← All topics
Pure mathematics

Integration techniques

Recognising structure: substitution, parts and partial fractions.

Introduction

Differentiation is mechanical: apply the rules and you get an answer. Integration is different, because it means recognising which derivative you are looking at. This page is about the techniques that turn an unfamiliar integrand into a familiar one. Substitution undoes the chain rule, integration by parts undoes the product rule, and partial fractions split rational functions into pieces we can integrate on sight.

Mathematical motivation

Areas, volumes, total distance from a velocity, probabilities from a density, work done by a variable force: each is a limit of sums, and the Fundamental Theorem of Calculus lets us evaluate that limit with an antiderivative:

∫abf(x) dx=F(b)−F(a)whenever F′=f and f is continuous on [a,b].\int_a^b f(x)\,dx = F(b) - F(a) \quad\text{whenever } F' = f \text{ and } f \text{ is continuous on } [a,b].

So the practical problem of computing areas becomes the algebraic problem of finding antiderivatives.

Intuitive explanation

IntuitionEvery technique reverses a differentiation rule
  • Substitution reverses the chain rule: if you can see g′(x)g'(x) sitting next to a function of g(x)g(x), then ∫f(g(x))g′(x) dx=∫f(u) du\int f(g(x))g'(x)\,dx = \int f(u)\,du.
  • Parts reverses the product rule: (uv)′=u′v+uv′(uv)' = u'v + uv' rearranges to ∫uv′=uv−∫u′v\int uv' = uv - \int u'v.
  • Partial fractions is algebra rather than calculus. It rewrites a rational function as a sum of simple pieces with logarithmic or arctangent antiderivatives.

When you meet a new integral, ask in order: Is it standard? Is a function's derivative visibly present (substitution)? Is it a product of unlike types (parts)? Is it rational (partial fractions)? Can an identity simplify it (trigonometric)?

Area as a limit of rectangles

To find the area under y=x2y = x^2 from 00 to 11, split [0,1][0, 1] into nn equal strips and use rectangles whose heights are the values at the right-hand ends. The total is

Sn=1n∑k=1n(kn)2=1n3⋅n(n+1)(2n+1)6.S_n = \frac1n\sum_{k=1}^n\left(\frac kn\right)^2 = \frac{1}{n^3}\cdot\frac{n(n+1)(2n+1)}{6}.
nnSnS_n
440.468750.46875
10100.3850.385
1001000.338350.33835
100010000.33383350.3338335

The sums settle on 13\frac13, and indeed Sn=(n+1)(2n+1)6n2→26=13S_n = \frac{(n+1)(2n+1)}{6n^2} \to \frac{2}{6} = \frac13. That limit is what ∫01x2 dx\int_0^1x^2\,dx means. That it can also be found as [x33]01\left[\frac{x^3}{3}\right]_0^1 is a theorem, and a surprising one.

IntuitionWhy should areas and antiderivatives be connected?

Let A(x)A(x) be the area under y=f(t)y = f(t) from aa up to xx. Push xx a little to x+hx + h: the area grows by a thin strip, about f(x)f(x) tall and hh wide. So A(x+h)−A(x)≈f(x) hA(x + h) - A(x) \approx f(x)\,h, which means A′(x)=f(x)A'(x) = f(x). The rate at which area accumulates is the height of the curve. So the area function is an antiderivative of ff, and that is the Fundamental Theorem of Calculus.

Formal definitions

DefinitionAntiderivative and indefinite integral

FF is an antiderivative of ff on an interval II if F′(x)=f(x)F'(x) = f(x) for all x∈Ix \in I. Any two antiderivatives on an interval differ by a constant (a consequence of the Mean Value Theorem), so we write

∫f(x) dx=F(x)+C.\int f(x)\,dx = F(x) + C.
DefinitionDefinite integral (Riemann)

For ff bounded on [a,b][a,b], ∫abf(x) dx\int_a^b f(x)\,dx is the common limit of Riemann sums ∑f(ξi) Δxi\sum f(\xi_i)\,\Delta x_i as the mesh of the partition tends to 00, when this limit exists. Every continuous function on [a,b][a,b] is Riemann integrable.

DefinitionImproper integral

If the interval is infinite or ff is unbounded near an endpoint, define the integral as a limit, e.g.

∫a∞f(x) dx=lim⁡R→∞∫aRf(x) dx,∫01ln⁡x dx=lim⁡ε→0+∫ε1ln⁡x dx,\int_a^\infty f(x)\,dx = \lim_{R\to\infty}\int_a^R f(x)\,dx,\qquad \int_0^1 \ln x\,dx = \lim_{\varepsilon\to0^+}\int_\varepsilon^1 \ln x\,dx,

which converges if the limit exists and is finite.

Important notation

  • ∫f(x) dx\int f(x)\,dx: the family of antiderivatives. ∫abf(x) dx\int_a^b f(x)\,dx: a number.
  • [F(x)]ab=F(b)−F(a)\big[F(x)\big]_a^b = F(b) - F(a).
  • In a substitution u=g(x)u = g(x), we write du=g′(x) dxdu = g'(x)\,dx. This is shorthand for the chain rule, and it is made rigorous by the theorem below.
  • CC is the constant of integration. On a domain with several pieces (such as ∫1x dx\int \frac1x\,dx on x≠0x \neq 0) there may be a different constant on each piece.

Important identities

IdentitiesStandard integrals (CC omitted)
∫xn dx=xn+1n+1 (n≠−1)∫1x dx=ln⁡∣x∣∫ekx dx=1kekx∫sin⁡kx dx=−1kcos⁡kx∫cos⁡kx dx=1ksin⁡kx∫sec⁡2kx dx=1ktan⁡kx∫tan⁡x dx=ln⁡∣sec⁡x∣∫sec⁡x dx=ln⁡∣sec⁡x+tan⁡x∣∫1a2+x2 dx=1aarctan⁡xa∫1a2−x2 dx=arcsin⁡xa∫f′(x)f(x) dx=ln⁡∣f(x)∣∫f′(x) [f(x)]n dx=[f(x)]n+1n+1\begin{aligned} \int x^n\,dx &= \frac{x^{n+1}}{n+1}\ (n\neq-1) &\qquad \int \frac{1}{x}\,dx &= \ln|x| \\ \int e^{kx}\,dx &= \frac1k e^{kx} &\qquad \int \sin kx\,dx &= -\frac1k\cos kx \\ \int \cos kx\,dx &= \frac1k\sin kx &\qquad \int \sec^2 kx\,dx &= \frac1k\tan kx\\ \int \tan x\,dx &= \ln|\sec x| &\qquad \int \sec x\,dx &= \ln|\sec x + \tan x|\\ \int \frac{1}{a^2+x^2}\,dx &= \frac1a\arctan\frac xa &\qquad \int \frac{1}{\sqrt{a^2-x^2}}\,dx &= \arcsin\frac xa \\ \int \frac{f'(x)}{f(x)}\,dx &= \ln|f(x)| &\qquad \int f'(x)\,[f(x)]^n\,dx &= \frac{[f(x)]^{n+1}}{n+1} \end{aligned}
IdentitiesTrigonometric reductions
sin⁡2x=12(1−cos⁡2x),cos⁡2x=12(1+cos⁡2x),2sin⁡Acos⁡B=sin⁡(A+B)+sin⁡(A−B).\sin^2 x = \tfrac12(1 - \cos 2x),\qquad \cos^2 x = \tfrac12(1 + \cos 2x),\qquad 2\sin A\cos B = \sin(A+B) + \sin(A-B).

Theorems and propositions

TheoremIntegration by substitution

Let gg be continuously differentiable on [a,b][a,b] and ff continuous on g([a,b])g([a,b]). Then

∫abf(g(x)) g′(x) dx=∫g(a)g(b)f(u) du.\int_a^b f\big(g(x)\big)\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du.
TheoremIntegration by parts

If u,vu, v are continuously differentiable on [a,b][a,b],

∫abu dvdx dx=[uv]ab−∫abv dudx dx.\int_a^b u\,\frac{dv}{dx}\,dx = \Big[uv\Big]_a^b - \int_a^b v\,\frac{du}{dx}\,dx.
TheoremPartial fraction decomposition

If deg⁡P<deg⁡Q\deg P < \deg Q and QQ factorises over R\mathbb{R} into linear factors and irreducible quadratics, then PQ\frac{P}{Q} is a sum of terms of the form A(x−a)k\frac{A}{(x-a)^k} and Bx+C(x2+px+q)k\frac{Bx + C}{(x^2+px+q)^k}, one for each power of each factor up to its multiplicity. The decomposition is unique.

PropositionThe "King's property"

For ff continuous on [a,b][a,b], ∫abf(x) dx=∫abf(a+b−x) dx\displaystyle\int_a^b f(x)\,dx = \int_a^b f(a + b - x)\,dx.

Proofs of important results

ProofSubstitution

Let FF be an antiderivative of ff (it exists because ff is continuous). By the chain rule, ddxF(g(x))=f(g(x))g′(x)\frac{d}{dx}F(g(x)) = f(g(x))g'(x), so by the FTC

∫abf(g(x))g′(x) dx=F(g(b))−F(g(a))=∫g(a)g(b)f(u) du.\int_a^b f(g(x))g'(x)\,dx = F(g(b)) - F(g(a)) = \int_{g(a)}^{g(b)} f(u)\,du.
∎
ProofIntegration by parts

By the product rule (uv)′=u′v+uv′(uv)' = u'v + uv', and all three functions are continuous. Integrating from aa to bb and using the FTC on the left-hand side,

[uv]ab=∫abu′v dx+∫abuv′ dx.\big[uv\big]_a^b = \int_a^b u'v\,dx + \int_a^b uv'\,dx.

Rearranging gives the result.

∎
ProofThe King's property

Substitute u=a+b−xu = a + b - x, so du=−dxdu = -dx; x=a↦u=bx = a \mapsto u = b and x=b↦u=ax = b \mapsto u = a:

∫abf(a+b−x) dx=∫baf(u) (−du)=∫abf(u) du.\int_a^b f(a+b-x)\,dx = \int_b^a f(u)\,(-du) = \int_a^b f(u)\,du.
∎

Step-by-step derivations

Choosing uu in integration by parts

Choose uu to be the factor that becomes simpler when differentiated, and dvdv the factor you can integrate. A useful priority order is LIATE: Logarithms, Inverse trig, Algebraic, Trig, Exponential.

Example∫xcos⁡x dx\int x\cos x\,dx

u=xu = x (algebraic), dv=cos⁡x dxdv = \cos x\,dx; so du=dxdu = dx, v=sin⁡xv = \sin x:

∫xcos⁡x dx=xsin⁡x−∫sin⁡x dx=xsin⁡x+cos⁡x+C.\int x\cos x\,dx = x\sin x - \int\sin x\,dx = x\sin x + \cos x + C.

Cyclic integration by parts

For I=∫exsin⁡x dxI = \int e^x\sin x\,dx, applying parts twice returns −I-I on the right. Solve the resulting equation for II (question Q26).

Finding partial fraction coefficients

For 5x+1(x−1)(x+2)=Ax−1+Bx+2\frac{5x+1}{(x-1)(x+2)} = \frac{A}{x-1} + \frac{B}{x+2}, multiply through: 5x+1=A(x+2)+B(x−1)5x + 1 = A(x+2) + B(x-1). Put x=1x = 1: 6=3A6 = 3A, so A=2A = 2. Put x=−2x = -2: −9=−3B-9 = -3B, so B=3B = 3.

Substituting roots of the denominator ("cover-up") is valid because the identity holds for all xx once the denominators are cleared, by continuity.

The Fundamental Theorem (A level version)

With A(x)=∫axf(t) dtA(x) = \int_a^xf(t)\,dt and ff continuous: for small h>0h > 0 the strip from xx to x+hx + h lies between rectangles of heights mhm_h and MhM_h, the least and greatest values of ff on [x,x+h][x, x + h]:

mh h≤A(x+h)−A(x)≤Mh h⇒mh≤A(x+h)−A(x)h≤Mh.m_h\,h \le A(x + h) - A(x) \le M_h\,h \quad\Rightarrow\quad m_h \le \frac{A(x+h) - A(x)}{h} \le M_h.

As h→0h \to 0, both mhm_h and MhM_h tend to f(x)f(x) (continuity), so A′(x)=f(x)A'(x) = f(x). Then if FF is any antiderivative, A−FA - F has derivative 00, so it is a constant cc. Since A(a)=0A(a) = 0, c=−F(a)c = -F(a), and ∫abf=A(b)=F(b)−F(a)\int_a^bf = A(b) = F(b) - F(a).

Integration by parts, from the product rule

ddx(uv)=udvdx+vdudx  ⇒  uv=∫udvdx dx+∫vdudx dx  ⇒  ∫udvdx dx=uv−∫vdudx dx.\frac{d}{dx}(uv) = u\frac{dv}{dx} + v\frac{du}{dx} \;\Rightarrow\; uv = \int u\frac{dv}{dx}\,dx + \int v\frac{du}{dx}\,dx \;\Rightarrow\; \int u\frac{dv}{dx}\,dx = uv - \int v\frac{du}{dx}\,dx.

Parts trades one integral for another. It helps when dudx\frac{du}{dx} is simpler than uu while vv is no worse than dvdx\frac{dv}{dx}.

Substitution, from the chain rule

If F′=fF' = f, the chain rule gives ddxF(g(x))=f(g(x)) g′(x)\frac{d}{dx}F(g(x)) = f(g(x))\,g'(x). Integrating both sides:

∫f(g(x)) g′(x) dx=F(g(x))+C=∫f(u) du ∣u=g(x).\int f(g(x))\,g'(x)\,dx = F(g(x)) + C = \int f(u)\,du\ \Big|_{u = g(x)}.

The informal rule "du=g′(x) dxdu = g'(x)\,dx" is just bookkeeping for this identity. For definite integrals, ∫abf(g(x))g′(x) dx=∫g(a)g(b)f(u) du\int_a^bf(g(x))g'(x)\,dx = \int_{g(a)}^{g(b)}f(u)\,du.

Why ∫1x dx=ln⁡∣x∣\int\frac1x\,dx = \ln|x|, with a modulus

For x>0x > 0, ddxln⁡x=1x\frac{d}{dx}\ln x = \frac1x. For x<0x < 0, ddxln⁡(−x)=−1−x=1x\frac{d}{dx}\ln(-x) = \frac{-1}{-x} = \frac1x as well. So ln⁡∣x∣\ln|x| is an antiderivative of 1x\frac1x on each side of 00. Since 1x\frac1x is not defined at 00, a definite integral must never cross 00: ∫−11dxx\int_{-1}^1\frac{dx}{x} is meaningless, not zero.

Volumes of revolution

Rotate y=f(x)y = f(x), a≤x≤ba \le x \le b, about the xx-axis. A slice of thickness δx\delta x is approximately a disc of radius yy, volume πy2 δx\pi y^2\,\delta x. Summing and taking the limit:

V=π∫aby2 dx.V = \pi\int_a^by^2\,dx.

Example (sphere): rotate y=r2−x2y = \sqrt{r^2 - x^2} for −r≤x≤r-r \le x \le r: V=π∫−rr(r2−x2) dx=π(2r3−2r33)=43πr3V = \pi\int_{-r}^r(r^2 - x^2)\,dx = \pi\left(2r^3 - \frac{2r^3}{3}\right) = \frac43\pi r^3.

The integral of sec⁡x\sec x

Multiply top and bottom by sec⁡x+tan⁡x\sec x + \tan x:

∫sec⁡x dx=∫sec⁡2x+sec⁡xtan⁡xsec⁡x+tan⁡x dx=ln⁡∣sec⁡x+tan⁡x∣+C,\int\sec x\,dx = \int\frac{\sec^2x + \sec x\tan x}{\sec x + \tan x}\,dx = \ln|\sec x + \tan x| + C,

because the numerator is exactly the derivative of the denominator. This integral was first needed for the Mercator map projection (1569), where the vertical position of latitude ϕ\phi is proportional to ∫0ϕsec⁡t dt\int_0^\phi\sec t\,dt. Navigators tabulated it numerically decades before anyone knew the formula.

Mean value of a function

The average of ff on [a,b][a, b] is the height of the rectangle with the same area:

fˉ=1b−a∫abf(x) dx.\bar f = \frac{1}{b - a}\int_a^bf(x)\,dx.

For example, the mean of sin⁡2\sin^2 over a period is 12\frac12, which is why the root-mean-square of mains voltage is the peak divided by 2\sqrt2.

Worked examples

ExampleSubstitution with changed limits

Evaluate ∫01x(1+x2)2 dx\displaystyle\int_0^1 \frac{x}{(1+x^2)^2}\,dx.

Let u=1+x2u = 1 + x^2, du=2x dxdu = 2x\,dx; x=0↦u=1x=0 \mapsto u = 1, x=1↦u=2x = 1 \mapsto u = 2:

∫1212u2 du=[−12u]12=−14+12=14.\int_1^2 \frac{1}{2u^2}\,du = \left[-\frac{1}{2u}\right]_1^2 = -\frac14 + \frac12 = \frac14.
ExampleRepeated linear factor

1x2(x+1)=Ax+Bx2+Cx+1\dfrac{1}{x^2(x+1)} = \dfrac{A}{x} + \dfrac{B}{x^2} + \dfrac{C}{x+1}. Clearing denominators: 1=Ax(x+1)+B(x+1)+Cx21 = Ax(x+1) + B(x+1) + Cx^2. Then x=0⇒B=1x=0 \Rightarrow B = 1, x=−1⇒C=1x = -1 \Rightarrow C = 1, and comparing x2x^2 coefficients 0=A+C⇒A=−10 = A + C \Rightarrow A = -1. Hence

∫dxx2(x+1)=−ln⁡∣x∣−1x+ln⁡∣x+1∣+C.\int \frac{dx}{x^2(x+1)} = -\ln|x| - \frac1x + \ln|x+1| + C.
ExampleIntegrating ln⁡x\ln x

Parts with u=ln⁡xu = \ln x, dv=1 dxdv = 1\,dx: ∫ln⁡x dx=xln⁡x−∫x⋅1x dx=xln⁡x−x+C\displaystyle\int\ln x\,dx = x\ln x - \int x\cdot\frac1x\,dx = x\ln x - x + C.

Common mistakes

Common mistakeNot changing the limits

After substituting u=g(x)u = g(x) in a definite integral, either change the limits to g(a),g(b)g(a), g(b) or substitute back before using the original limits. Never mix the two.

Common mistakeForgetting ∣⋅∣|\cdot| in ln⁡\ln

∫1x dx=ln⁡∣x∣+C\int\frac1x\,dx = \ln|x| + C. Without the modulus, the answer is wrong on x<0x < 0.

Common mistakePartial fractions on an improper fraction

If deg⁡P≥deg⁡Q\deg P \ge \deg Q, divide first. For example x2x2−1=1+1x2−1\frac{x^2}{x^2 - 1} = 1 + \frac{1}{x^2-1}.

Common mistakeIntegrating through a singularity

∫−111x2 dx\int_{-1}^1 \frac{1}{x^2}\,dx is not [−1x]−11=−2\left[-\frac1x\right]_{-1}^1 = -2. The integrand is positive and the integral diverges, because the FTC needs ff continuous on the whole interval.

Applications

  • Areas and volumes of revolution: V=π∫aby2 dxV = \pi\int_a^b y^2\,dx.
  • Mean value of a function: 1b−a∫abf(x) dx\frac{1}{b-a}\int_a^b f(x)\,dx.
  • Probability: expectations ∫xf(x) dx\int x f(x)\,dx often need integration by parts.
  • Differential equations: separating variables and integrating factors reduce ODEs to integrals.
  • Physics: work W=∫F dxW = \int F\,dx, and centres of mass.

Connections to other topics

Summary

  • Substitution reverses the chain rule; look for a function together with its derivative.
  • Parts, ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du, reverses the product rule. Choose uu to simplify on differentiation.
  • Partial fractions: check the fraction is proper, set up one term per factor power, then integrate each term.
  • Change the limits in a definite substitution; keep ∣⋅∣|\cdot| in logarithms; check continuity before applying the FTC.
  • Symmetry and the King's property crack integrals that resist direct attack.
Beyond the specification

University-level ideas and the deeper mathematics behind this topic. Not needed for exams, but this is where the subject really opens up.

What an integral really is (university)

"Area under a curve" is intuitive, but what is area, for a wild function? Riemann (1854) and Darboux (1875) gave the first fully precise answer.

DefinitionPartitions and Darboux sums

A partition PP of [a,b][a, b] is a finite list a=x0<x1<⋯<xn=ba = x_0 < x_1 < \cdots < x_n = b. On each piece let Mi=sup⁡fM_i = \sup f and mi=inf⁡fm_i = \inf f. The upper and lower sums are

U(f,P)=∑i=1nMi(xi−xi−1),L(f,P)=∑i=1nmi(xi−xi−1).U(f, P) = \sum_{i=1}^nM_i(x_i - x_{i-1}), \qquad L(f, P) = \sum_{i=1}^nm_i(x_i - x_{i-1}).

Any lower sum is at most any upper sum, and refining a partition raises LL and lowers UU.

DefinitionRiemann integrable

A bounded ff is Riemann integrable on [a,b][a, b] if sup⁡PL(f,P)=inf⁡PU(f,P)\sup_PL(f, P) = \inf_PU(f, P). This common value is ∫abf(x) dx\int_a^bf(x)\,dx. Equivalently: for every ε>0\varepsilon > 0 there is a partition with U(f,P)−L(f,P)<εU(f, P) - L(f, P) < \varepsilon.

TheoremMonotonic functions are integrable
Proof

Let ff be increasing and use nn equal pieces of width h=b−anh = \frac{b-a}{n}. On each piece Mi=f(xi)M_i = f(x_i) and mi=f(xi−1)m_i = f(x_{i-1}), so the difference telescopes:

U−L=h∑i=1n(f(xi)−f(xi−1))=h(f(b)−f(a))=(b−a)(f(b)−f(a))n→0.U - L = h\sum_{i=1}^n\big(f(x_i) - f(x_{i-1})\big) = h\big(f(b) - f(a)\big) = \frac{(b - a)(f(b) - f(a))}{n} \to 0.
∎
TheoremContinuous functions are integrable
Proof

A continuous function on a closed bounded interval is uniformly continuous (the Heine–Cantor theorem): given ε>0\varepsilon > 0 there is δ>0\delta > 0 with ∣f(x)−f(y)∣<ε|f(x) - f(y)| < \varepsilon whenever ∣x−y∣<δ|x - y| < \delta, the same δ\delta for every xx. Take a partition with all pieces shorter than δ\delta. Then Mi−mi≤εM_i - m_i \le \varepsilon on each piece, so U−L≤ε(b−a)U - L \le \varepsilon(b - a).

∎
CounterexampleA function with no Riemann integral

Dirichlet's function: f(x)=1f(x) = 1 if xx is rational, 00 if irrational, on [0,1][0, 1]. Every interval contains both kinds of number, so every upper sum is 11 and every lower sum is 00. The upper and lower integrals never meet. Yet "intuitively" the rationals are a negligible set, and the integral "should" be 00. The Lebesgue integral (below) agrees.

HistoryWho first integrated?

Archimedes (c. 250 BC) found the area of a parabolic segment by exhaustion, a limiting argument with triangles. Cavalieri, Fermat and Wallis computed ∫xn\int x^n in the 1630s–50s using sums of powers. Newton and Leibniz then connected area to antiderivatives, which turned dozens of hard special problems into routine calculation.

The Fundamental Theorem, proved (university)

TheoremFTC, part 1

Let ff be Riemann integrable on [a,b][a, b] and define A(x)=∫axf(t) dtA(x) = \int_a^xf(t)\,dt. Then AA is continuous on [a,b][a,b]. If ff is continuous at cc, then AA is differentiable at cc with A′(c)=f(c)A'(c) = f(c).

Proof

ff is bounded, say ∣f∣≤K|f| \le K, so ∣A(x)−A(y)∣=∣∫yxf∣≤K∣x−y∣|A(x) - A(y)| = \left|\int_y^xf\right| \le K|x - y|, and AA is continuous.

Now fix cc where ff is continuous. Given ε>0\varepsilon > 0, choose δ\delta with ∣f(t)−f(c)∣<ε|f(t) - f(c)| < \varepsilon when ∣t−c∣<δ|t - c| < \delta. For 0<∣h∣<δ0 < |h| < \delta:

∣A(c+h)−A(c)h−f(c)∣=∣1h∫cc+h(f(t)−f(c)) dt∣≤1∣h∣⋅∣h∣ε=ε.\left|\frac{A(c + h) - A(c)}{h} - f(c)\right| = \left|\frac1h\int_c^{c+h}\big(f(t) - f(c)\big)\,dt\right| \le \frac{1}{|h|}\cdot|h|\varepsilon = \varepsilon.
∎
TheoremFTC, part 2

If ff is Riemann integrable on [a,b][a, b] and FF is differentiable on [a,b][a,b] with F′=fF' = f, then ∫abf=F(b)−F(a)\int_a^bf = F(b) - F(a).

Proof

Take any partition PP. By the Mean Value Theorem, on each piece there is cic_i with F(xi)−F(xi−1)=f(ci)(xi−xi−1)F(x_i) - F(x_{i-1}) = f(c_i)(x_i - x_{i-1}). Summing (it telescopes):

F(b)−F(a)=∑if(ci)(xi−xi−1),F(b) - F(a) = \sum_if(c_i)(x_i - x_{i-1}),

which lies between L(f,P)L(f, P) and U(f,P)U(f, P). This holds for every PP, and these sums squeeze down to ∫abf\int_a^bf.

∎

Notice that part 2 does not assume ff is continuous, only integrable. But it does need ff to be integrable. Volterra's function (see Differentiation) is differentiable with a bounded derivative that is not Riemann integrable, so part 2 fails there in the Riemann theory.

What the theorem achieves

Part 1 says every continuous function has an antiderivative, even when no formula exists. erf⁡(x)=2π∫0xe−t2dt\operatorname{erf}(x) = \frac{2}{\sqrt\pi}\int_0^xe^{-t^2}dt and Si⁡(x)=∫0xsin⁡ttdt\operatorname{Si}(x) = \int_0^x\frac{\sin t}{t}dt are perfectly good functions defined this way. Part 2 says that when you can find an antiderivative, area is just a subtraction.

TheoremIntegral mean value theorem

If ff is continuous on [a,b][a, b], then ∫abf=f(c)(b−a)\int_a^bf = f(c)(b - a) for some c∈[a,b]c \in [a, b].

Proof

With mm and MM the minimum and maximum of ff: m(b−a)≤∫abf≤M(b−a)m(b - a) \le \int_a^b f \le M(b - a). So 1b−a∫abf\frac{1}{b-a}\int_a^bf lies between mm and MM, and by the intermediate value theorem ff takes that value somewhere.

∎

Improper integrals and convergence (university)

DefinitionImproper integrals

∫a∞f=lim⁡R→∞∫aRf\int_a^\infty f = \lim_{R\to\infty}\int_a^Rf, and if ff blows up at aa, ∫abf=lim⁡ε→0+∫a+εbf\int_a^bf = \lim_{\varepsilon\to0^+}\int_{a+\varepsilon}^bf, when these limits exist. If they do, the integral converges; otherwise it diverges.

TheoremThe pp-test

∫1∞dxxp\displaystyle\int_1^\infty\frac{dx}{x^p} converges if and only if p>1p > 1, and then equals 1p−1\frac{1}{p - 1}. ∫01dxxp\displaystyle\int_0^1\frac{dx}{x^p} converges if and only if p<1p < 1.

Proof

For p≠1p \ne 1: ∫1Rx−pdx=R1−p−11−p\int_1^Rx^{-p}dx = \frac{R^{1-p} - 1}{1 - p}, which has a finite limit iff 1−p<01 - p < 0. For p=1p = 1: ln⁡R→∞\ln R \to \infty. The second statement is similar with ε1−p\varepsilon^{1-p}.

∎
ParadoxGabriel's horn

Rotate y=1xy = \frac1x, x≥1x \ge 1, about the xx-axis. The volume is π∫1∞dxx2=π\pi\int_1^\infty\frac{dx}{x^2} = \pi, finite. The surface area is 2π∫1∞1x1+1x4 dx≥2π∫1∞dxx=∞2\pi\int_1^\infty\frac1x\sqrt{1 + \frac1{x^4}}\,dx \ge 2\pi\int_1^\infty\frac{dx}{x} = \infty. So you could fill the horn with paint, but never paint its inside surface. (The resolution: a mathematical layer of paint has zero thickness.)

TheoremComparison test

If 0≤f≤g0 \le f \le g and ∫g\int g converges, so does ∫f\int f. If ∫f\int f diverges, so does ∫g\int g.

For example, ∫1∞∣sin⁡x∣x2dx\int_1^\infty\frac{|\sin x|}{x^2}dx converges by comparison with 1x2\frac{1}{x^2}, and ∫1∞e−x2dx\int_1^\infty e^{-x^2}dx by comparison with e−xe^{-x}.

Absolute versus conditional convergence

∫0∞sin⁡xx dx\int_0^\infty\frac{\sin x}{x}\,dx converges (to π2\frac\pi2), but ∫0∞∣sin⁡xx∣dx=∞\int_0^\infty\left|\frac{\sin x}{x}\right|dx = \infty: each arch from kπk\pi to (k+1)π(k+1)\pi contributes at least 2(k+1)π\frac{2}{(k+1)\pi}, and ∑1k\sum\frac{1}{k} diverges. The positive and negative arches cancel just enough. Such conditionally convergent integrals are delicate. Swapping limits with them, or rearranging them, can change the answer, just as for conditionally convergent series.

Common mistake"The function is odd, so the integral is zero"

∫−∞∞x dx\int_{-\infty}^{\infty}x\,dx diverges: it is not 00. The definition requires ∫0∞\int_0^\infty and ∫−∞0\int_{-\infty}^0 to converge separately. The symmetric limit lim⁡R→∞∫−RRx dx=0\lim_{R\to\infty}\int_{-R}^Rx\,dx = 0 is a different object, the Cauchy principal value. It is useful in physics and complex analysis, but it must be named as such.

The Gamma and Beta functions (university)

Definition

For s>0s > 0: Γ(s)=∫0∞xs−1e−x dx\displaystyle\Gamma(s) = \int_0^\infty x^{s-1}e^{-x}\,dx. For a,b>0a, b > 0: B(a,b)=∫01xa−1(1−x)b−1 dx\displaystyle B(a, b) = \int_0^1x^{a-1}(1-x)^{b-1}\,dx.

Questions Q58 and Q64 prove the key facts: Γ(s+1)=sΓ(s)\Gamma(s + 1) = s\Gamma(s), Γ(n+1)=n!\Gamma(n + 1) = n!, and B(m+1,n+1)=m! n!(m+n+1)!B(m+1, n+1) = \frac{m!\,n!}{(m+n+1)!}. These suggest the general identity:

TheoremBeta–Gamma relation
B(a,b)=Γ(a)Γ(b)Γ(a+b).B(a, b) = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a + b)}.
Proof

Write the product as a double integral, substituting x=u2x = u^2 and y=v2y = v^2 in the two Gamma integrals:

Γ(a)Γ(b)=4∫0∞ ⁣ ⁣∫0∞u2a−1v2b−1e−(u2+v2) du dv.\Gamma(a)\Gamma(b) = 4\int_0^\infty\!\!\int_0^\infty u^{2a-1}v^{2b-1}e^{-(u^2+v^2)}\,du\,dv.

In polar coordinates (u=rcos⁡θu = r\cos\theta, v=rsin⁡θv = r\sin\theta, du dv=r dr dθdu\,dv = r\,dr\,d\theta) this separates:

=(2∫0∞r2(a+b)−1e−r2dr)(2∫0π/2cos⁡2a−1θsin⁡2b−1θ dθ)=Γ(a+b)⋅B(a,b),= \left(2\int_0^\infty r^{2(a+b)-1}e^{-r^2}dr\right)\left(2\int_0^{\pi/2}\cos^{2a-1}\theta\sin^{2b-1}\theta\,d\theta\right) = \Gamma(a + b)\cdot B(a, b),

using t=cos⁡2θt = \cos^2\theta in the second factor.

∎

Some striking consequences

  • Γ(12)2=B(12,12)Γ(1)=∫01dtt(1−t)=π\Gamma\left(\frac12\right)^2 = B\left(\frac12, \frac12\right)\Gamma(1) = \int_0^1\frac{dt}{\sqrt{t(1-t)}} = \pi, so Γ(12)=π\Gamma\left(\frac12\right) = \sqrt\pi. This is the Gaussian integral again.
  • Volume of the unit ball in nn dimensions: Vn=πn/2Γ(n2+1)V_n = \dfrac{\pi^{n/2}}{\Gamma\left(\frac n2 + 1\right)}. This gives V2=πV_2 = \pi and V3=43πV_3 = \frac43\pi, it is largest at n=5n = 5, and Vn→0V_n \to 0 as n→∞n \to \infty. In high dimensions almost all of a cube's volume is in its corners.
  • Reflection formula: Γ(s)Γ(1−s)=πsin⁡πs\Gamma(s)\Gamma(1 - s) = \dfrac{\pi}{\sin\pi s}. At s=12s = \frac12 it gives Γ(12)2=π\Gamma\left(\frac12\right)^2 = \pi again.
TheoremStirling's formula
n!∼2πn(ne)n,i.e. n!2πn(n/e)n→1.n! \sim \sqrt{2\pi n}\left(\frac ne\right)^n, \qquad\text{i.e. } \frac{n!}{\sqrt{2\pi n}(n/e)^n} \to 1.

The idea (Laplace's method): n!=∫0∞enln⁡x−x dxn! = \int_0^\infty e^{n\ln x - x}\,dx. The exponent ϕ(x)=nln⁡x−x\phi(x) = n\ln x - x peaks sharply at x=nx = n, with ϕ′′(n)=−1n\phi''(n) = -\frac1n. Near the peak, ϕ(x)≈nln⁡n−n−(x−n)22n\phi(x) \approx n\ln n - n - \frac{(x - n)^2}{2n}, so

n!≈enln⁡n−n∫−∞∞e−(x−n)2/2n dx=(ne)n2πn.n! \approx e^{n\ln n - n}\int_{-\infty}^\infty e^{-(x-n)^2/2n}\,dx = \left(\frac ne\right)^n\sqrt{2\pi n}.

For n=10n = 10 the formula gives 3 598 6963\,598\,696 against the true 3 628 8003\,628\,800, an error under 1%1\% that keeps shrinking as nn grows.

When limits and integrals do not commute (university)

Many techniques (Feynman's trick, integrating series term by term, changing the order of a double integral) swap an integral with a limit. That is not always allowed.

CounterexampleA vanishing function with constant area

Let fn(x)=nf_n(x) = n on (0,1n)\left(0, \frac1n\right) and 00 elsewhere on [0,1][0, 1]. For every fixed xx, fn(x)→0f_n(x) \to 0, yet ∫01fn=1\int_0^1f_n = 1 for every nn. So

lim⁡n→∞∫01fn=1  ≠  0=∫01lim⁡n→∞fn.\lim_{n\to\infty}\int_0^1f_n = 1 \;\ne\; 0 = \int_0^1\lim_{n\to\infty}f_n.

The mass escapes into a spike that gets ever taller and thinner.

Lebesgue's idea (1902)

Riemann chops up the xx-axis. Lebesgue chops up the yy-axis: for each height band, ask how large the set of xx is where ff takes values in that band. That needs a way to measure the size of complicated sets, Lebesgue measure. Countable sets, like the rationals, have measure 00. So Dirichlet's function has Lebesgue integral 00, as it should.

Lebesgue's integral agrees with Riemann's whenever both exist, but it integrates far more functions. Above all, it comes with powerful limit theorems:

TheoremMonotone Convergence Theorem

If 0≤f1≤f2≤⋯0 \le f_1 \le f_2 \le \cdots and fn→ff_n \to f pointwise, then ∫fn→∫f\int f_n \to \int f.

TheoremDominated Convergence Theorem

If fn→ff_n \to f pointwise and ∣fn∣≤g|f_n| \le g for all nn, where ∫g<∞\int g < \infty, then ∫fn→∫f\int f_n \to \int f.

In the counterexample, no single integrable gg sits above all the spikes, which is exactly why it fails. The DCT is what justifies Feynman's trick: if ∣∂f∂t(x,t)∣≤g(x)\left|\frac{\partial f}{\partial t}(x, t)\right| \le g(x) with ∫g<∞\int g < \infty, then ddt∫f dx=∫∂f∂t dx\frac{d}{dt}\int f\,dx = \int\frac{\partial f}{\partial t}\,dx.

CounterexampleFubini can fail
∫01 ⁣ ⁣∫01x2−y2(x2+y2)2 dy dx=π4,∫01 ⁣ ⁣∫01x2−y2(x2+y2)2 dx dy=−π4.\int_0^1\!\!\int_0^1\frac{x^2 - y^2}{(x^2 + y^2)^2}\,dy\,dx = \frac\pi4, \qquad \int_0^1\!\!\int_0^1\frac{x^2 - y^2}{(x^2 + y^2)^2}\,dx\,dy = -\frac\pi4.

The order of integration matters here because ∬∣f∣=∞\iint|f| = \infty. Fubini–Tonelli guarantees the orders agree whenever ∬∣f∣<∞\iint|f| < \infty (or f≥0f \ge 0).

Beyond the syllabusWhere Lebesgue leads

Measure theory is the foundation of modern probability: Kolmogorov (1933) defined a probability as a measure of total mass 11. It also underlies LpL^p spaces and Fourier analysis, and functional analysis, where functions become points of infinite-dimensional spaces.

Real integrals by complex methods (university)

Some real integrals are easiest by a detour through the complex plane. The key is that integrals of complex functions around closed loops are determined by a handful of special points.

TheoremCauchy's residue theorem

If ff is complex-differentiable inside and on a simple closed contour CC, except at finitely many poles zkz_k inside CC, then

∮Cf(z) dz=2πi∑kRes⁡(f,zk).\oint_Cf(z)\,dz = 2\pi i\sum_k\operatorname{Res}(f, z_k).

At a simple pole, Res⁡(f,z0)=lim⁡z→z0(z−z0)f(z)\operatorname{Res}(f, z_0) = \lim_{z\to z_0}(z - z_0)f(z). For f=pqf = \frac{p}{q} with q(z0)=0q(z_0) = 0 and q′(z0)≠0q'(z_0) \ne 0, this is p(z0)q′(z0)\frac{p(z_0)}{q'(z_0)}.

Example∫−∞∞dx1+x4=π2\displaystyle\int_{-\infty}^{\infty}\frac{dx}{1 + x^4} = \frac{\pi}{\sqrt2}

Integrate f(z)=11+z4f(z) = \frac{1}{1 + z^4} around the boundary of the half-disc of radius RR in the upper half-plane.

Poles inside: z4=−1z^4 = -1 gives z=eiπ/4z = e^{i\pi/4} and z=e3iπ/4z = e^{3i\pi/4} in the upper half-plane.

Residues: 14z3=z4z4=−z4\frac{1}{4z^3} = \frac{z}{4z^4} = -\frac z4 at each pole. Their sum is

−14(eiπ/4+e3iπ/4)=−14⋅i2.-\frac14\left(e^{i\pi/4} + e^{3i\pi/4}\right) = -\frac14\cdot i\sqrt2.

The arc: on ∣z∣=R|z| = R, ∣f∣≤1R4−1|f| \le \frac{1}{R^4 - 1}, and the arc has length πR\pi R. So its contribution is at most πRR4−1→0\frac{\pi R}{R^4 - 1} \to 0.

Conclusion: as R→∞R \to \infty,

∫−∞∞dx1+x4=2πi⋅(−i24)=π22=π2≈2.2214.\int_{-\infty}^\infty\frac{dx}{1 + x^4} = 2\pi i\cdot\left(-\frac{i\sqrt2}{4}\right) = \frac{\pi\sqrt2}{2} = \frac{\pi}{\sqrt2} \approx 2.2214.
ExampleTrigonometric integrals around the unit circle

With z=eiθz = e^{i\theta}: cos⁡θ=12(z+1z)\cos\theta = \frac12\left(z + \frac1z\right) and dθ=dzizd\theta = \frac{dz}{iz}. For instance

∫02πdθ2+cos⁡θ=∮∣z∣=12 dzi(z2+4z+1).\int_0^{2\pi}\frac{d\theta}{2 + \cos\theta} = \oint_{|z| = 1}\frac{2\,dz}{i(z^2 + 4z + 1)}.

The only pole inside the circle is z=−2+3z = -2 + \sqrt3. The residue there is 2i⋅23\frac{2}{i\cdot2\sqrt3}, so the integral is 2πi⋅1i3=2π32\pi i\cdot\frac{1}{i\sqrt3} = \frac{2\pi}{\sqrt3}.

These techniques evaluate in a few lines integrals that would be very hard by real methods. The Complex numbers topic develops the theory further.

Why does this work?

Why does this work?Why does integration by parts work?

The product rule says (uv)′=u′v+uv′(uv)' = u'v + uv'. Integrate both sides: uv=∫u′v dx+∫uv′ dxuv = \int u'v\,dx + \int uv'\,dx. Rearranging, ∫uv′ dx=uv−∫u′v dx\int uv'\,dx = uv - \int u'v\,dx. Integration by parts is the product rule run backwards.

Why does this work?Why is the integral an area? (The fundamental theorem)

Let A(x)A(x) be the area under ff from aa to xx. Increasing xx by hh adds a thin strip of area about f(x)hf(x)h, so A(x+h)−A(x)h→f(x)\frac{A(x + h) - A(x)}{h} \to f(x): A′=fA' = f. Area is an antiderivative. So to find areas, undo differentiation.

Beyond the syllabus

Beyond the syllabusFeynman's trick: differentiating under the integral sign

Introduce a parameter, differentiate with respect to it, and integrate back. If ff and ∂f∂t\frac{\partial f}{\partial t} are continuous, ddt∫abf(x,t) dx=∫ab∂f∂t(x,t) dx\frac{d}{dt}\int_a^b f(x, t)\,dx = \int_a^b\frac{\partial f}{\partial t}(x, t)\,dx (the Leibniz integral rule).

Example. I(t)=∫01xt−1ln⁡x dxI(t) = \int_0^1\frac{x^t - 1}{\ln x}\,dx. Then I′(t)=∫01xt dx=1t+1I'(t) = \int_0^1 x^t\,dx = \frac{1}{t + 1}, so I(t)=ln⁡(t+1)+CI(t) = \ln(t + 1) + C, and I(0)=0I(0) = 0 gives C=0C = 0. Hence ∫01x−1ln⁡x dx=ln⁡2\int_0^1\frac{x - 1}{\ln x}\,dx = \ln 2.

Example. For I(t)=∫0∞e−txsin⁡xx dxI(t) = \int_0^\infty e^{-tx}\frac{\sin x}{x}\,dx, I′(t)=−∫0∞e−txsin⁡x dx=−11+t2I'(t) = -\int_0^\infty e^{-tx}\sin x\,dx = -\frac{1}{1 + t^2}, so I(t)=π2−arctan⁡tI(t) = \frac\pi2 - \arctan t (since I→0I \to 0 as t→∞t \to \infty). Putting t=0t = 0: the Dirichlet integral ∫0∞sin⁡xx dx=π2\int_0^\infty\frac{\sin x}{x}\,dx = \frac\pi2.

Beyond the syllabusThe Gamma and Beta functions

Γ(s)=∫0∞xs−1e−x dx\Gamma(s) = \int_0^\infty x^{s-1}e^{-x}\,dx for s>0s > 0. Integration by parts gives Γ(s+1)=sΓ(s)\Gamma(s + 1) = s\Gamma(s) and Γ(1)=1\Gamma(1) = 1, so Γ(n+1)=n!\Gamma(n + 1) = n!: Gamma extends the factorial to non-integers. The substitution x=u2x = u^2 and the Gaussian integral ∫−∞∞e−u2 du=π\int_{-\infty}^\infty e^{-u^2}\,du = \sqrt\pi give Γ(12)=π\Gamma\left(\tfrac12\right) = \sqrt\pi, so "(−12)!=π\left(-\tfrac12\right)! = \sqrt\pi".

The Beta function B(a,b)=∫01xa−1(1−x)b−1 dx=Γ(a)Γ(b)Γ(a+b)B(a, b) = \int_0^1 x^{a-1}(1 - x)^{b-1}\,dx = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a + b)} evaluates many integrals at once. For example ∫0π/2sin⁡mθcos⁡nθ dθ=12B(m+12,n+12)\int_0^{\pi/2}\sin^m\theta\cos^n\theta\,d\theta = \frac12B\left(\frac{m + 1}2, \frac{n + 1}2\right).

Beyond the syllabusThe Gaussian integral

Let I=∫−∞∞e−x2 dxI = \int_{-\infty}^\infty e^{-x^2}\,dx. Then I2=∬e−(x2+y2) dx dyI^2 = \iint e^{-(x^2 + y^2)}\,dx\,dy. Switching to polar coordinates (dx dy=r dr dθdx\,dy = r\,dr\,d\theta): I2=∫02π∫0∞e−r2r dr dθ=2π⋅12=πI^2 = \int_0^{2\pi}\int_0^\infty e^{-r^2}r\,dr\,d\theta = 2\pi\cdot\frac12 = \pi. So I=πI = \sqrt\pi. This is why π\pi appears in the normal distribution.

Beyond the syllabusRiemann and Lebesgue: what is an integral, really?

The Riemann integral slices the xx-axis into strips. Lebesgue (1902) sliced the yy-axis instead, asking for the "size" (the measure) of the set where ff takes each range of values. Measure theory lets you integrate wilder functions, such as the indicator of the rationals (integral 00: the rationals have measure zero), and gives powerful limit theorems. It is the foundation of modern probability.

Mathematical curiosities

Mathematical curiosityIntegrals that are surprisingly nice

∫01ln⁡(1+x)1+x2 dx=π8ln⁡2\int_0^1\frac{\ln(1 + x)}{1 + x^2}\,dx = \frac{\pi}{8}\ln2 (substitute x=tan⁡θx = \tan\theta, then θ→π4−θ\theta \to \frac\pi4 - \theta). And the "sophomore's dream" ∫01x−x dx=∑n=1∞n−n\int_0^1x^{-x}\,dx = \sum_{n=1}^\infty n^{-n}.

Mathematical curiosityGabriel's horn

Rotate y=1xy = \frac1x, x≥1x \ge 1, about the xx-axis. The volume is π∫1∞dxx2=π\pi\int_1^\infty\frac{dx}{x^2} = \pi, but the surface area is infinite: you could fill it with paint but never paint its surface.

Further exploration

Further explorationInvestigations
  • Use Feynman's trick on ∫0∞e−x−e−txx dx\int_0^\infty\frac{e^{-x} - e^{-tx}}{x}\,dx. (Answer: ln⁡t\ln t.)
  • Show that ∫0π/2ln⁡(sin⁡x) dx=−π2ln⁡2\int_0^{\pi/2}\ln(\sin x)\,dx = -\frac\pi2\ln2 using the substitution x→π2−xx \to \frac\pi2 - x and sin⁡2x=2sin⁡xcos⁡x\sin2x = 2\sin x\cos x.
  • Compute Γ(52)\Gamma\left(\frac52\right). (Answer: 34π\frac34\sqrt\pi.)

Reading pathway: Inside Interesting Integrals (Paul Nahin), full of Feynman-style techniques; then a course in measure and integration.

Now practise64 questions from Very easy to Extreme →