Skip to content

Riemann Integration

6.1 Definition

Let f:[a,b]Rf : [a,b] \to \mathbb{R} be bounded. A partition of [a,b][a,b] is a finite set P={x0,x1,,xn}P = \{x_0, x_1, \ldots, x_n\} with a=x0<x1<<xn=ba = x_0 \lt x_1 \lt \cdots \lt x_n = b.

The upper sum and lower sum of ff with respect to PP are:

U(f,P)=i=1nMiΔxi,L(f,P)=i=1nmiΔxiU(f, P) = \sum_{i=1}^{n} M_i \Delta x_i, \quad L(f, P) = \sum_{i=1}^{n} m_i \Delta x_i

Where Mi=sup{f(x):x[xi1,xi]}M_i = \sup\{f(x) : x \in [x_{i-1}, x_i]\}, mi=inf{f(x):x[xi1,xi]}m_i = \inf\{f(x) : x \in [x_{i-1}, x_i]\}And Δxi=xixi1\Delta x_i = x_i - x_{i-1}.

The mesh of PP is P=max1inΔxi\|P\| = \max_{1 \leq i \leq n} \Delta x_i.

Definition. ff is Riemann integrable on [a,b][a,b] if the upper and lower integrals are equal:

abf(x)dx=abf(x)dx\overline{\int_a^b} f(x)\, dx = \underline{\int_a^b} f(x)\, dx

Where abf=inf{U(f,P):P is a partition}\overline{\int_a^b} f = \inf\{U(f,P) : P \mathrm{\ is\ a\ partition}\} and abf=sup{L(f,P):P is a partition}\underline{\int_a^b} f = \sup\{L(f,P) : P \mathrm{\ is\ a\ partition}\}.

The common value is denoted abf(x)dx\int_a^b f(x)\, dx.

6.2 Integrability Criteria

Theorem 6.1 (Riemann Integrability Criterion). A bounded function f:[a,b]Rf : [a,b] \to \mathbb{R} is Riemann integrable if and only if for every ε>0\varepsilon > 0There exists a partition PP such that

U(f,P)L(f,P)<εU(f,P) - L(f,P) \lt \varepsilon

Theorem 6.2. Every continuous function on [a,b][a,b] is Riemann integrable.

Proof. Let ff be continuous on [a,b][a,b]. By the Heine-Cantor theorem, ff is uniformly continuous. Given ε>0\varepsilon > 0Choose δ>0\delta > 0 such that xy<δ|x - y| \lt \delta implies f(x)f(y)<ε/(ba)|f(x) - f(y)| \lt \varepsilon/(b-a).

Let PP be any partition with P<δ\|P\| \lt \delta. On each subinterval [xi1,xi][x_{i-1}, x_i]By the Extreme Value Theorem, ff attains its maximum MiM_i and minimum mim_i. By uniform continuity: Mimi<ε/(ba)M_i - m_i \lt \varepsilon/(b-a). Therefore:

U(f,P)L(f,P)=i=1n(Mimi)Δxi<εbai=1nΔxi=εU(f,P) - L(f,P) = \sum_{i=1}^{n}(M_i - m_i)\Delta x_i \lt \frac{\varepsilon}{b-a} \sum_{i=1}^{n} \Delta x_i = \varepsilon

By the Riemann integrability criterion, ff is integrable. \blacksquare

Theorem 6.3. Every monotone function on [a,b][a,b] is Riemann integrable.

Proof. Assume ff is increasing (the decreasing case is analogous). Given ε>0\varepsilon > 0Let PnP_n be the uniform partition with nn subintervals of length (ba)/n(b-a)/n. On [xi1,xi][x_{i-1}, x_i]: Mi=f(xi)M_i = f(x_i) and mi=f(xi1)m_i = f(x_{i-1}). Then:

U(f,Pn)L(f,Pn)=i=1n[f(xi)f(xi1)]ban=[f(b)f(a)]banU(f, P_n) - L(f, P_n) = \sum_{i=1}^{n} [f(x_i) - f(x_{i-1})] \cdot \frac{b-a}{n} = [f(b) - f(a)] \cdot \frac{b-a}{n}

Choose nn large enough that [f(b)f(a)](ba)/n<ε[f(b) - f(a)](b-a)/n \lt \varepsilon. \blacksquare

Theorem 6.4. A bounded function with finitely many discontinuities on [a,b][a,b] is Riemann integrable.

Proof (sketch). Let ff have discontinuities at d1,,dm[a,b]d_1, \ldots, d_m \in [a,b]. Given ε>0\varepsilon > 0 Enclose each djd_j in a small interval IjI_j of total length ε/(2M)\varepsilon/(2M)Where M=sup[a,b]fM = \sup_{[a,b]} |f|. On the remaining set (a finite union of closed intervals), ff is continuous, Hence uniformly continuous. Choose a partition fine enough that the oscillation of ff on each Subinterval outside the IjI_j is less than ε/(2(ba))\varepsilon/(2(b-a)). Then:

U(f,P)L(f,P)ε2(ba)(ba)+2Mε2M=εU(f, P) - L(f, P) \leq \frac{\varepsilon}{2(b-a)} \cdot (b - a) + 2M \cdot \frac{\varepsilon}{2M} = \varepsilon

\blacksquare

Proposition 6.4a. The set of Riemann integrable functions on [a,b][a,b] forms a vector space, and If ff and gg are integrable, then so are f|f|, f2f^2And max(f,g)\max(f, g).

Theorem 6.4b (Lebesgue”s Criterion for Riemann Integrability). A bounded function f:[a,b]Rf : [a,b] \to \mathbb{R} Is Riemann integrable if and only if the set of its discontinuities has (Lebesgue) measure zero.

Remark. A set has measure zero if it can be covered by countably many intervals of arbitrarily Small total length. In particular, every countable set has measure zero. This means:

  • Every continuous function is integrable (empty set of discontinuities).
  • Every function with countably many discontinuities is integrable (Theorem 6.4 is a special case).
  • The Dirichlet function f(x)=1f(x) = 1 for xQx \in \mathbb{Q} and f(x)=0f(x) = 0 for xQx \notin \mathbb{Q} is discontinuous everywhere (set of discontinuities = [a,b][a,b]Measure >0> 0), hence not integrable.
  • Thomae’s function f(x)=1/qf(x) = 1/q if x=p/qx = p/q in lowest terms, and f(x)=0f(x) = 0 if xx is irrational, is continuous at every irrational and discontinuous at every rational. Since Q\mathbb{Q} is countable (measure zero), Thomae’s function is Riemann integrable, with 01f=0\int_0^1 f = 0.

6.3 Properties of the Integral

Theorem 6.5 (Linearity). If ff and gg are integrable on [a,b][a,b] and α,βR\alpha, \beta \in \mathbb{R}:

ab(αf+βg)=αabf+βabg\int_a^b (\alpha f + \beta g) = \alpha \int_a^b f + \beta \int_a^b g

Theorem 6.6 (Monotonicity). If f(x)g(x)f(x) \leq g(x) for all x[a,b]x \in [a,b]Then abfabg\int_a^b f \leq \int_a^b g.

Theorem 6.7 (Triangle Inequality). abfabf\left|\int_a^b f\right| \leq \int_a^b |f|.

6.4 The Fundamental Theorem of Calculus

Theorem 6.8 (FTC Part 1). If ff is continuous on [a,b][a,b]Then the function

F(x)=axf(t)dtF(x) = \int_a^x f(t)\, dt

Is differentiable on (a,b)(a,b) and F(x)=f(x)F'(x) = f(x).

Proof. Let h>0h > 0 (the case h<0h \lt 0 is similar). By the Mean Value Theorem for Integrals (which follows from the EVT), there exists ξ[x,x+h]\xi \in [x, x+h] such that

F(x+h)F(x)h=1hxx+hf(t)dt=f(ξ)\frac{F(x+h) - F(x)}{h} = \frac{1}{h}\int_x^{x+h} f(t)\, dt = f(\xi)

As h0+h \to 0^+We have ξx+\xi \to x^+ (since ξ[x,x+h]\xi \in [x, x+h]). By continuity of ff f(ξ)f(x)f(\xi) \to f(x). Hence F+(x)=f(x)F'_+(x) = f(x). A similar argument gives F(x)=f(x)F'_-(x) = f(x). \blacksquare

Theorem 6.9 (FTC Part 2). If FF is differentiable on [a,b][a,b] with F=fF' = f (and ff is integrable), Then

abf(x)dx=F(b)F(a)\int_a^b f(x)\, dx = F(b) - F(a)

Proof. Let P={x0,,xn}P = \{x_0, \ldots, x_n\} be any partition of [a,b][a,b]. By the Mean Value Theorem, For each ii there exists ξi[xi1,xi]\xi_i \in [x_{i-1}, x_i] with F(xi)F(xi1)=f(ξi)ΔxiF(x_i) - F(x_{i-1}) = f(\xi_i)\Delta x_i. Summing:

F(b)F(a)=i=1n[F(xi)F(xi1)]=i=1nf(ξi)ΔxiF(b) - F(a) = \sum_{i=1}^{n} [F(x_i) - F(x_{i-1})] = \sum_{i=1}^{n} f(\xi_i) \Delta x_i

The right-hand side is a Riemann sum for abf\int_a^b f. As P0\|P\| \to 0This converges to the Integral. Hence F(b)F(a)=abf(x)dxF(b) - F(a) = \int_a^b f(x)\, dx. \blacksquare

6.5 Worked Examples

Problem. Compute 01x2dx\int_0^1 x^2\, dx from the definition.

Solution. Let Pn={0,1/n,2/n,,1}P_n = \{0, 1/n, 2/n, \ldots, 1\}. On [xi1,xi]=[(i1)/n,i/n][x_{i-1}, x_i] = [(i-1)/n, i/n], f(x)=x2f(x) = x^2 Has Mi=(i/n)2M_i = (i/n)^2 and mi=((i1)/n)2m_i = ((i-1)/n)^2.

U(f,Pn)=i=1ni2n21n=1n3i=1ni2=1n3n(n+1)(2n+1)6U(f, P_n) = \sum_{i=1}^{n} \frac{i^2}{n^2} \cdot \frac{1}{n} = \frac{1}{n^3} \sum_{i=1}^{n} i^2 = \frac{1}{n^3} \cdot \frac{n(n+1)(2n+1)}{6}

As nn \to \infty: limnU(f,Pn)=limn(n+1)(2n+1)6n2=26=13\lim_{n \to \infty} U(f, P_n) = \lim_{n \to \infty} \frac{(n+1)(2n+1)}{6n^2} = \frac{2}{6} = \frac{1}{3}.

Similarly, L(f,Pn)1/3L(f, P_n) \to 1/3. So 01x2dx=1/3\int_0^1 x^2\, dx = 1/3. \blacksquare

Worked Example: Compute $\int_0^1 \sqrt{x}\, dx$ from the definition

Solution. Let Pn={0,1/n,2/n,,1}P_n = \{0, 1/n, 2/n, \ldots, 1\}. On [(i1)/n,i/n][(i-1)/n, i/n], f(x)=xf(x) = \sqrt{x} has Mi=i/nM_i = \sqrt{i/n} and mi=(i1)/nm_i = \sqrt{(i-1)/n}.

U(f,Pn)=i=1nin1n=1n3/2i=1niU(f, P_n) = \sum_{i=1}^{n} \sqrt{\frac{i}{n}} \cdot \frac{1}{n} = \frac{1}{n^{3/2}} \sum_{i=1}^{n} \sqrt{i}

Using i=1ni=23n3/2+O(n1/2)\sum_{i=1}^{n} \sqrt{i} = \frac{2}{3} n^{3/2} + O(n^{1/2}) (obtained from comparing with 0nxdx\int_0^n \sqrt{x}\, dx):

limnU(f,Pn)=limn1n3/223n3/2=23\lim_{n \to \infty} U(f, P_n) = \lim_{n \to \infty} \frac{1}{n^{3/2}} \cdot \frac{2}{3}n^{3/2} = \frac{2}{3}

Similarly L(f,Pn)2/3L(f, P_n) \to 2/3Confirming 01xdx=2/3\int_0^1 \sqrt{x}\, dx = 2/3. \blacksquare

6.6 Improper Integrals

Definition. An improper integral is a Riemann integral where either the interval of integration Is unbounded or the integrand is unbounded.

Type I (Infinite Intervals). If ff is Riemann integrable on [a,b][a, b] for every b>ab > aDefine:

af(x)dx=limbabf(x)dx\int_a^{\infty} f(x)\, dx = \lim_{b \to \infty} \int_a^b f(x)\, dx

The integral converges if this limit exists as a finite number; otherwise it diverges.

Type II (Unbounded Integrands). If ff is unbounded near aa but integrable on [c,b][c, b] for every c(a,b]c \in (a, b]:

abf(x)dx=limca+cbf(x)dx\int_a^b f(x)\, dx = \lim_{c \to a^+} \int_c^b f(x)\, dx

Theorem 6.10 (Comparison Test for Improper Integrals). If 0f(x)g(x)0 \leq f(x) \leq g(x) for xax \geq a:

  • If ag\int_a^{\infty} g converges, then af\int_a^{\infty} f converges.
  • If af\int_a^{\infty} f diverges, then ag\int_a^{\infty} g diverges.

Theorem 6.11 (Absolute Convergence). If af(x)dx\int_a^{\infty} |f(x)|\, dx converges, then af(x)dx\int_a^{\infty} f(x)\, dx converges.

Theorem 6.12 (pp-Test for Improper Integrals).

  • Type I: 11xpdx\int_1^{\infty} \frac{1}{x^p}\, dx converges if and only if p>1p > 1.
  • Type II: 011xpdx\int_0^1 \frac{1}{x^p}\, dx converges if and only if p<1p < 1.

Proof. For Type I with p1p \neq 1:

1xpdx=limb[x1p1p]1b=limbb1p11p\int_1^{\infty} x^{-p}\, dx = \lim_{b \to \infty} \left[\frac{x^{1-p}}{1-p}\right]_1^b = \lim_{b \to \infty} \frac{b^{1-p} - 1}{1-p}

This converges when 1p<01 - p < 0I.e., p>1p > 1. For p=1p = 1: 11/xdx=limblnb=\int_1^{\infty} 1/x\, dx = \lim_{b \to \infty} \ln b = \infty.

For Type II: 01xpdx=limc0+1c1p1p\int_0^1 x^{-p}\, dx = \lim_{c \to 0^+} \frac{1 - c^{1-p}}{1-p}. This converges when 1p>01 - p > 0I.e., p<1p < 1. \blacksquare

Remark. The pp-test for Type I integrals mirrors the pp-series test: 1/np\sum 1/n^p converges Iff p>1p > 1. This is not a coincidence --- the integral test establishes the connection.

Worked Example: Evaluate $\int_0^{\infty} e^{-x}\, dx$

Solution. This is a Type I improper integral:

0exdx=limb0bexdx=limb[ex]0b=limb(eb+1)=1\int_0^{\infty} e^{-x}\, dx = \lim_{b \to \infty} \int_0^b e^{-x}\, dx = \lim_{b \to \infty} \left[-e^{-x}\right]_0^b = \lim_{b \to \infty} (-e^{-b} + 1) = 1

So the integral converges to 11. \blacksquare

Worked Example: Does $\int_1^{\infty} \frac{\sin x}{x}\, dx$ converge?

Solution. The integral 1sinxxdx\int_1^{\infty} \left|\frac{\sin x}{x}\right|\, dx diverges (compare with 1sinxxdxk=1kπ(k+1)πsinxxdxk=12(k+1)π\int_1^{\infty} \frac{|\sin x|}{x}\, dx \geq \sum_{k=1}^{\infty} \int_{k\pi}^{(k+1)\pi} \frac{|\sin x|}{x}\, dx \geq \sum_{k=1}^{\infty} \frac{2}{(k+1)\pi}, which diverges by comparison with the harmonic series).

However, 1sinxxdx\int_1^{\infty} \frac{\sin x}{x}\, dx converges by Dirichlet’s test for integrals. Let F(b)=1bsinxdx=cos1cosbF(b) = \int_1^b \sin x\, dx = \cos 1 - \cos bWhich is bounded by cos1cosb2|\cos 1 - \cos b| \leq 2. Since 1/x1/x decreases to 00By integration by parts:

1bsinxxdx=cosxx1b1bcosxx2dx\int_1^b \frac{\sin x}{x}\, dx = \frac{-\cos x}{x}\bigg|_1^b - \int_1^b \frac{\cos x}{x^2}\, dx

As bb \to \inftyThe boundary term cosb/b0\cos b / b \to 0 and 1cosxx2dx11x2dx=1\int_1^{\infty} \frac{|\cos x|}{x^2}\, dx \leq \int_1^{\infty} \frac{1}{x^2}\, dx = 1, so the improper integral converges (conditionally). \blacksquare

Worked Example: Evaluate $\int_0^1 \frac{1}{\sqrt{x}}\, dx$ (Type II improper integral)

Solution. The integrand f(x)=1/xf(x) = 1/\sqrt{x} is unbounded as x0+x \to 0^+. Compute:

011xdx=limc0+c1x1/2dx=limc0+[2x]c1=limc0+(22c)=2\int_0^1 \frac{1}{\sqrt{x}}\, dx = \lim_{c \to 0^+} \int_c^1 x^{-1/2}\, dx = \lim_{c \to 0^+} \left[2\sqrt{x}\right]_c^1 = \lim_{c \to 0^+} (2 - 2\sqrt{c}) = 2

The improper integral converges to 22. Note that 01xpdx\int_0^1 x^{-p}\, dx converges for p<1p \lt 1 and Diverges for p1p \geq 1. \blacksquare

Worked Example: Determine convergence of $\int_1^{\infty} \frac{1}{x^p}\, dx$ for various $p$

Solution. By the pp-test (Theorem 6.12): 1xpdx\int_1^{\infty} x^{-p}\, dx converges iff p>1p > 1.

Specifically:

  • p=2p = 2: 11/x2dx=limb[1/x]1b=0(1)=1\int_1^{\infty} 1/x^2\, dx = \lim_{b \to \infty} [-1/x]_1^b = 0 - (-1) = 1. Converges.
  • p=1p = 1: 11/xdx=limblnb=\int_1^{\infty} 1/x\, dx = \lim_{b \to \infty} \ln b = \infty. Diverges.
  • p=1/2p = 1/2: 11/xdx=limb[2x]1b=\int_1^{\infty} 1/\sqrt{x}\, dx = \lim_{b \to \infty} [2\sqrt{x}]_1^b = \infty. Diverges.

This mirrors the pp-series test: 1/np\sum 1/n^p converges iff p>1p > 1. \blacksquare

Worked Example: Evaluate $\int_0^{\infty} x e^{-x}\, dx$

Solution. This integral requires both a Type I and Type II limit:

0xexdx=lima0+limbabxexdx\int_0^{\infty} x e^{-x}\, dx = \lim_{a \to 0^+} \lim_{b \to \infty} \int_a^b x e^{-x}\, dx

Integrate by parts with u=xu = x, dv=exdxdv = e^{-x}\, dxSo du=dxdu = dx, v=exv = -e^{-x}:

xexdx=xex+exdx=xexex=(x+1)ex\int x e^{-x}\, dx = -xe^{-x} + \int e^{-x}\, dx = -xe^{-x} - e^{-x} = -(x+1)e^{-x}

Evaluating: limb[(b+1)eb]lima0+[(a+1)ea]=0(1)=1\lim_{b \to \infty} [-(b+1)e^{-b}] - \lim_{a \to 0^+} [-(a+1)e^{-a}] = 0 - (-1) = 1.

So 0xexdx=1\int_0^{\infty} x e^{-x}\, dx = 1. This equals Γ(2)=1!=1\Gamma(2) = 1! = 1. \blacksquare

:::caution Common Pitfall The Riemann integral is defined for bounded functions on closed, bounded intervals. For unbounded Functions or infinite intervals, one must use the improper Riemann integral. A common error is Applying the FTC directly to improper integrals without taking the limit. Also, conditional Convergence of improper integrals behaves differently from absolute convergence: rearranging the “terms” (subintervals) of a conditionally convergent improper integral can change its value.

:::