Search Knowledge

© 2026 LIBREUNI PROJECT

Page 6 of 12

Integration: Rigorous Riemann Integral

Foundations of the Riemann integral, Darboux sums, partitions, and the Mean Value Theorem for Integrals.

Lesson briefIntegration · 3 h · 3 outcomes

Required knowledge

  • Supremum/infimum of bounded sets and continuity on compact intervals
  • Summation notation and the Mean Value Theorem

Learning outcomes

  • Compute upper and lower Darboux sums and prove Riemann integrability via the oscillation criterion
  • Establish integrability of continuous and monotone functions on closed bounded intervals
  • Apply linearity, domain additivity, and the Mean Value Theorem for Integrals

Assessment target

Verify Darboux integrability from partition refinements and bound definite integrals using upper/lower sums and the integral Mean Value Theorem.

Scope boundary

  • Lebesgue measure, Lebesgue integration, and improper integrals over unbounded domains.

Integration is traditionally introduced as finding the “area under a curve.” Historically, Archimedes used the method of exhaustion, but a modern mathematical treatment requires the formal definition of partitions and Riemann (or Darboux) sums to define integrability.

Partitions and Darboux Sums

Let [a,b][a, b] be a closed and bounded interval.

Definition 2.1.1Partition and Darboux Sums

A partition PP of [a,b][a, b] is a finite set of points {x0,x1,…,xn}\{x_0, x_1, \dots, x_n\} such that:

a=x0<x1<x2<⋯<xn=b.a = x_0 < x_1 < x_2 < \dots < x_n = b.

For each subinterval [xi−1,xi][x_{i-1}, x_i] we define:

Δxi=xi−xi−1.\Delta x_i = x_i - x_{i-1}.

Let f:[a,b]→Rf: [a, b] \to \mathbb{R} be a bounded function. For each subinterval, let:

mi=inf⁡{f(x)∣x∈[xi−1,xi]}andMi=sup⁡{f(x)∣x∈[xi−1,xi]}.m_i = \inf \{f(x) \mid x \in [x_{i-1}, x_i]\} \quad \text{and} \quad M_i = \sup \{f(x) \mid x \in [x_{i-1}, x_i]\}.

We define the Lower Darboux Sum L(f,P)L(f, P) and Upper Darboux Sum U(f,P)U(f, P) as:

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

Pause & Predict: Partition Refinement Behavior. Suppose you take a partition PP of [a,b][a, b] and insert exactly one new division point x∗x^* forming refinement P∗=P∪{x∗}P^* = P \cup \{x^*\}

  • Does the lower sum L(f,P∗)L(f, P^*) increase, decrease, or stay the same relative to L(f,P)L(f, P)
  • Does the Darboux gap U(f,P∗)−L(f,P∗)U(f, P^*) - L(f, P^*) expand or contract? Commit your reasoning before opening the analysis below.
Show hintExpand

Consider the infimum of ff over a subset versus the infimum over the whole interval: does inf⁡S′f\inf_{S'} f increase or decrease when S′⊆SS' \subseteq S?

Reveal analysisExpand

Analysis: Suppose x∗∈(xk−1,xk)x^* \in (x_{k-1}, x_k) On the original interval [xk−1,xk][x_{k-1}, x_k] the infimum is mkm_k On the subintervals [xk−1,x∗][x_{k-1}, x^*] and [x∗,xk][x^*, x_k] the infima mk′=inf⁡x∈[xk−1,x∗]f(x)m'_k = \inf_{x \in [x_{k-1}, x^*]} f(x) and mk′′=inf⁡x∈[x∗,xk]f(x)m''_k = \inf_{x \in [x^*, x_k]} f(x) must satisfy mk′≥mkm'_k \ge m_k and mk′′≥mkm''_k \ge m_k because the infimum over a subset cannot decrease. Since (x∗−xk−1)+(xk−x∗)=Δxk(x^* - x_{k-1}) + (x_k - x^*) = \Delta x_k we have: mk′(x∗−xk−1)+mk′′(xk−x∗)≥mkΔxk.m'_k(x^* - x_{k-1}) + m''_k(x_k - x^*) \ge m_k \Delta x_k. Thus, adding points monotonically increases (or maintains) the lower sum L(f,P)≤L(f,P∗)L(f, P) \le L(f, P^*) and monotonically decreases (or maintains) the upper sum U(f,P∗)≤U(f,P)U(f, P^*) \le U(f, P) Refinements strictly squeeze the upper and lower Darboux bounds closer together.

Interactive exploration

Refine a Riemann sum

Increase n to see the rectangles track the area more closely.

n = 8
left Riemann sum (equals the lower Darboux sum here because f is increasing)n = 8 rectangles
Refine a Riemann sum
left Riemann sum (equals the lower Darboux sum here because f is increasing)n = 8 rectangles

A finite rectangular sum approximates the area under a curve.

The lower and upper sums trap the limiting area from below and above:

Darboux sums for $f(x) = x^2$ on $[0, 1]$ with $n = 4$: lower sum $L = \frac{7}{32} = 0.21875$ and upper sum $U = \frac{15}{32} = 0.46875$ sandwich $\int_0^1 x^2 \, dx = \frac{1}{3}$. Lower and upper Darboux sums for y = x squared on [0, 1] with n = 4 subintervals, demonstrating lower sum 7/32 and upper sum 15/32 bounding the true integral 1/3.
Figure 2.1.1: Darboux sums for f(x)=x2f(x) = x^2 on [0,1][0, 1] with n=4n = 4: lower sum L=732=0.21875L = \frac{7}{32} = 0.21875 and upper sum U=1532=0.46875U = \frac{15}{32} = 0.46875 sandwich ∫01x2 dx=13\int_0^1 x^2 \, dx = \frac{1}{3}.

Riemann Integrability

We define the actual integral by taking supremum and infimum over all possible partitions.

Definition 2.1.2Riemann Integrability

Let P\mathcal{P} be the set of all possible partitions of [a,b][a, b] We define the lower integral and upper integral of ff on [a,b][a, b] by:

∫ab‾f(x) dx=sup⁡{L(f,P)∣P∈P},\underline{\int_a^b} f(x) \, dx = \sup \{L(f, P) \mid P \in \mathcal{P}\}, ∫ab‾f(x) dx=inf⁡{U(f,P)∣P∈P}.\overline{\int_a^b} f(x) \, dx = \inf \{U(f, P) \mid P \in \mathcal{P}\}.

If the lower and upper integrals are equal, we say that ff is Riemann integrable on [a,b][a, b] The common value is denoted by:

∫abf(x) dx.\int_a^b f(x) \, dx.

Let us write a Python script to compute the upper and lower Darboux sums for f(x)=x2f(x) = x^2 on [0,2][0, 2] using uniform partitions of increasing size. This shows how they converge to the true value of 8/3≈2.66678/3 \approx 2.6667

python

Interactive Lab

1import numpy as np
2 
3def f(x): return x**2
4 
5a, b = 0.0, 2.0
6n_values = [4, 10, 100, 1000]
7 
8print(f"{'n':<6} | {'Lower Sum L(f, P)':<20} | {'Upper Sum U(f, P)':<20}")
9print("-" * 52)
10 
11for n in n_values:
12 x_coords = np.linspace(a, b, n + 1)
13 lower_sum = 0.0
14 upper_sum = 0.0
15 
16 for i in range(n):
17 x_left = x_coords[i]
18 x_right = x_coords[i+1]
19 dx = x_right - x_left
20 
21 # Since f(x)=x^2 is strictly increasing on [0, 2]
22 # inf is at the left endpoint, sup is at the right endpoint
23 mi = f(x_left)
24 Mi = f(x_right)
25 
26 lower_sum += mi * dx
27 upper_sum += Mi * dx
28 
29 print(f"{n:<6} | {lower_sum:<20.6f} | {upper_sum:<20.6f}")
30 

Worked Trace: Exact Analytical Evaluation of ∫0bx2 dx\int_0^b x^2\,dx via Darboux Sums

To see the Darboux machinery in action without relying on the Fundamental Theorem of Calculus, consider f(x)=x2f(x) = x^2 on [0,b][0, b] partitioned into nn equal subintervals of width Δx=bn\Delta x = \frac{b}{n} with division points xi=ibnx_i = \frac{i b}{n} for i=0,1,…,ni = 0, 1, \dots, n

  1. Subinterval Bounds: Because f(x)=x2f(x) = x^2 is strictly increasing on [0,b][0, b] on each interval [xi−1,xi][x_{i-1}, x_i]

    • mi=inf⁡x∈[xi−1,xi]f(x)=f(xi−1)=((i−1)bn)2m_i = \inf_{x \in [x_{i-1}, x_i]} f(x) = f(x_{i-1}) = \left(\frac{(i-1)b}{n}\right)^2
    • Mi=sup⁡x∈[xi−1,xi]f(x)=f(xi)=(ibn)2M_i = \sup_{x \in [x_{i-1}, x_i]} f(x) = f(x_i) = \left(\frac{ib}{n}\right)^2
  2. Evaluating Upper and Lower Sums: Using the summation identity ∑i=1ni2=n(n+1)(2n+1)6\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6} U(f,Pn)=∑i=1nMiΔx=∑i=1n(ibn)2bn=b3n3n(n+1)(2n+1)6=b36(2+3n+1n2)U(f, P_n) = \sum_{i=1}^n M_i \Delta x = \sum_{i=1}^n \left(\frac{ib}{n}\right)^2 \frac{b}{n} = \frac{b^3}{n^3} \frac{n(n+1)(2n+1)}{6} = \frac{b^3}{6} \left(2 + \frac{3}{n} + \frac{1}{n^2}\right)

    Similarly, for the lower sum: L(f,Pn)=∑i=1nmiΔx=∑i=1n((i−1)bn)2bn=b3n3(n−1)n(2n−1)6=b36(2−3n+1n2)L(f, P_n) = \sum_{i=1}^n m_i \Delta x = \sum_{i=1}^n \left(\frac{(i-1)b}{n}\right)^2 \frac{b}{n} = \frac{b^3}{n^3} \frac{(n-1)n(2n-1)}{6} = \frac{b^3}{6} \left(2 - \frac{3}{n} + \frac{1}{n^2}\right)

  3. Bounding the Darboux Gap: U(f,Pn)−L(f,Pn)=b36(6n)=b3nU(f, P_n) - L(f, P_n) = \frac{b^3}{6} \left(\frac{6}{n}\right) = \frac{b^3}{n} For any ϵ>0\epsilon > 0 choosing n>b3ϵn > \frac{b^3}{\epsilon} guarantees U(f,Pn)−L(f,Pn)<ϵU(f, P_n) - L(f, P_n) < \epsilon

  4. Convergence to the Riemann Integral: Taking n→∞n \to \infty sup⁡nL(f,Pn)=b33≤∫0b‾x2 dx≤∫0b‾x2 dx≤inf⁡nU(f,Pn)=b33\sup_n L(f, P_n) = \frac{b^3}{3} \le \underline{\int_0^b} x^2\,dx \le \overline{\int_0^b} x^2\,dx \le \inf_n U(f, P_n) = \frac{b^3}{3} Since the upper and lower integrals coincide at b33\frac{b^3}{3} f(x)=x2f(x)=x^2 is rigorously Riemann integrable with ∫0bx2 dx=b33\int_0^b x^2\,dx = \frac{b^3}{3}

Counterexample & Failure Mode: Pathological Non-Integrability (Dirichlet’s Function)

Does every bounded function have a Riemann integral? Consider Dirichlet’s function on [0,1][0, 1] f(x)={1if x∈Q0if x∉Qf(x) = \begin{cases} 1 & \text{if } x \in \mathbb{Q} \\ 0 & \text{if } x \notin \mathbb{Q} \end{cases}

  1. Failure Mode Analysis:

    • Between any two real numbers xi−1<xix_{i-1} < x_i there exists an irrational number (since R∖Q\mathbb{R} \setminus \mathbb{Q} is dense). Thus mi=inf⁡[xi−1,xi]f(x)=0m_i = \inf_{[x_{i-1}, x_i]} f(x) = 0
    • Between any two real numbers xi−1<xix_{i-1} < x_i there also exists a rational number (since Q\mathbb{Q} is dense). Thus Mi=sup⁡[xi−1,xi]f(x)=1M_i = \sup_{[x_{i-1}, x_i]} f(x) = 1
  2. Darboux Collapse: For every partition PP of [0,1][0, 1] regardless of refinement: L(f,P)=∑i=1n0⋅Δxi=0  ⟹  ∫01‾f(x) dx=sup⁡PL(f,P)=0L(f, P) = \sum_{i=1}^n 0 \cdot \Delta x_i = 0 \implies \underline{\int_0^1} f(x)\,dx = \sup_{P} L(f, P) = 0 U(f,P)=∑i=1n1⋅Δxi=∑i=1nΔxi=1  ⟹  ∫01‾f(x) dx=inf⁡PU(f,P)=1U(f, P) = \sum_{i=1}^n 1 \cdot \Delta x_i = \sum_{i=1}^n \Delta x_i = 1 \implies \overline{\int_0^1} f(x)\,dx = \inf_{P} U(f, P) = 1

  3. Conclusion: Because ∫01‾f(x) dx=0≠1=∫01‾f(x) dx\underline{\int_0^1} f(x)\,dx = 0 \neq 1 = \overline{\int_0^1} f(x)\,dx the Darboux gap never closes U−L=1U - L = 1 Riemann integration completely fails for functions whose discontinuities are everywhere dense.

Integrability of Continuous Functions

Not all bounded functions are integrable (as Dirichlet’s function demonstrates). However, continuity is a sufficient condition for integrability.

Theorem 2.1.3Integrability of Continuous Functions

If f:[a,b]→Rf: [a, b] \to \mathbb{R} is continuous on [a,b][a, b] then ff is Riemann integrable on [a,b][a, b]

Proof sketch: Since [a,b][a, b] is closed and bounded, any continuous function ff on it is uniformly continuous. This allows us to make the difference Mi−miM_i - m_i arbitrarily small for a sufficiently fine partition, which forces U(f,P)−L(f,P)<ϵU(f, P) - L(f, P) < \epsilon

Mean Value Theorem for Integrals

This theorem guarantees that a continuous function must attain its average value.

Theorem 2.1.4Mean Value Theorem for Integrals

If f:[a,b]→Rf: [a, b] \to \mathbb{R} is continuous, then there exists some c∈[a,b]c \in [a, b] such that:

∫abf(x) dx=f(c)(b−a).\int_a^b f(x) \, dx = f(c)(b - a).

ProofExpand proof

Since ff is continuous on [a,b][a, b] by the Extreme Value Theorem (Theorem 1.1.6), it attains a minimum value mm and a maximum value MM on [a,b][a, b] Thus, for all x∈[a,b]x \in [a, b]

m≤f(x)≤M.m \le f(x) \le M.

Using the monotonicity property of the Riemann integral:

∫abm dx≤∫abf(x) dx≤∫abM dx  ⟹  m(b−a)≤∫abf(x) dx≤M(b−a).\int_a^b m \, dx \le \int_a^b f(x) \, dx \le \int_a^b M \, dx \implies m(b - a) \le \int_a^b f(x) \, dx \le M(b - a).

Dividing by the interval length (b−a)>0(b - a) > 0

m≤1b−a∫abf(x) dx≤M.m \le \frac{1}{b - a} \int_a^b f(x) \, dx \le M.

Let k=1b−a∫abf(x) dxk = \frac{1}{b - a} \int_a^b f(x) \, dx Since kk is a number between the minimum mm and maximum MM of the continuous function ff by the Intermediate Value Theorem (Theorem 1.1.5), there must exist some c∈[a,b]c \in [a, b] such that f(c)=kf(c) = k Therefore,

f(c)=1b−a∫abf(x) dx  ⟹  ∫abf(x) dx=f(c)(b−a).f(c) = \frac{1}{b - a} \int_a^b f(x) \, dx \implies \int_a^b f(x) \, dx = f(c)(b - a).

∎
Section Exercises

Deep Practice

Compute upper and lower Darboux sums directly from partitions, bound integrals via monotonicity, and apply the Mean Value Theorem for Integrals.

Exercise 2.1.1: Darboux Sums and Exact Integrability of a Linear Function

Verificationapplication

Let f(x)=2x+1f(x) = 2x + 1 on [0,2][0, 2] and let Pn={0,2/n,4/n,…,2}P_n = \{0, 2/n, 4/n, \dots, 2\} be the uniform partition into nn subintervals of width Δx=2/n\Delta x = 2/n Compute L(f,Pn)L(f, P_n) and U(f,Pn)U(f, P_n) in closed form, verify that U(f,Pn)−L(f,Pn)=8/nU(f, P_n) - L(f, P_n) = 8/n and deduce ∫02(2x+1) dx\int_0^2 (2x + 1)\,dx directly from Definition 2.1.2.

HintExpand

Since f(x)=2x+1f(x) = 2x + 1 is strictly increasing, the infimum on [xi−1,xi][x_{i-1}, x_i] occurs at xi−1x_{i-1} and the supremum occurs at xix_i. Use ∑i=1ni=n(n+1)2\sum_{i=1}^n i = \frac{n(n+1)}{2}.

Worked solutionExpand
  1. Subinterval bounds: On [xi−1,xi][x_{i-1}, x_i] with xi=2i/nx_i = 2i/n and Δxi=2/n\Delta x_i = 2/n ff is strictly increasing, so: mi=f(xi−1)=2(2(i−1)n)+1=1+4(i−1)n,Mi=f(xi)=1+4in.m_i = f(x_{i-1}) = 2\left(\frac{2(i-1)}{n}\right) + 1 = 1 + \frac{4(i-1)}{n}, \qquad M_i = f(x_i) = 1 + \frac{4i}{n}.
  2. Upper Darboux sum: U(f,Pn)=∑i=1n(1+4in)2n=2n∑i=1n1+8n2∑i=1ni=2+8n2⋅n(n+1)2=6+4n.U(f, P_n) = \sum_{i=1}^n \left(1 + \frac{4i}{n}\right)\frac{2}{n} = \frac{2}{n}\sum_{i=1}^n 1 + \frac{8}{n^2}\sum_{i=1}^n i = 2 + \frac{8}{n^2}\cdot\frac{n(n+1)}{2} = 6 + \frac{4}{n}.
  3. Lower Darboux sum: L(f,Pn)=∑i=1n(1+4(i−1)n)2n=2+8n2⋅(n−1)n2=6−4n.L(f, P_n) = \sum_{i=1}^n \left(1 + \frac{4(i-1)}{n}\right)\frac{2}{n} = 2 + \frac{8}{n^2}\cdot\frac{(n-1)n}{2} = 6 - \frac{4}{n}.
  4. Darboux gap and integral: U(f,Pn)−L(f,Pn)=(6+4n)−(6−4n)=8n→0as n→∞.U(f, P_n) - L(f, P_n) = \left(6 + \frac{4}{n}\right) - \left(6 - \frac{4}{n}\right) = \frac{8}{n} \to 0 \quad \text{as } n \to \infty. Since L(f,Pn)≤∫02‾f≤∫02‾f≤U(f,Pn)L(f, P_n) \le \underline{\int_0^2} f \le \overline{\int_0^2} f \le U(f, P_n) for every nn squeezing as n→∞n \to \infty gives ∫02(2x+1) dx=6\int_0^2 (2x + 1)\,dx = 6

Verification criteria. Requires explicit expressions for mi,Mim_i, M_i closed-form evaluation of both sums, verification that U−L=8/nU - L = 8/n and conclusion ∫02(2x+1) dx=6\int_0^2 (2x+1)\,dx = 6

Exercise 2.1.2: Mean Value Point for a Quadratic Integral

Constructionapplication

Using the Darboux integral result ∫0bx2 dx=b33\int_0^b x^2\,dx = \frac{b^3}{3} established above, find the average value of f(x)=x2f(x) = x^2 on [0,3][0, 3] and determine every point c∈[0,3]c \in [0, 3] guaranteed by Theorem 2.1.4.

HintExpand

Use ∫03x2 dx=333=9\int_0^3 x^2\,dx = \frac{3^3}{3} = 9 to compute the average value 13−0∫03x2 dx\frac{1}{3-0}\int_0^3 x^2\,dx, then solve c2=favgc^2 = f_{\text{avg}} on [0,3][0, 3].

Worked solutionExpand
  1. Compute the integral from the Darboux result: Substituting b=3b = 3 into ∫0bx2 dx=b33\int_0^b x^2\,dx = \frac{b^3}{3} yields: ∫03x2 dx=333=9.\int_0^3 x^2\,dx = \frac{3^3}{3} = 9.
  2. Average value: favg=13−0∫03x2 dx=93=3.f_{\text{avg}} = \frac{1}{3 - 0}\int_0^3 x^2\,dx = \frac{9}{3} = 3.
  3. Solve f(c)=3f(c) = 3 c2=3  ⟹  c=3 or c=−3.c^2 = 3 \implies c = \sqrt{3} \text{ or } c = -\sqrt{3}.
  4. Filter to [0,3][0, 3] Only c=3≈1.732c = \sqrt{3} \approx 1.732 lies in [0,3][0, 3]

Verification criteria. Requires finding ∫03x2 dx=9\int_0^3 x^2\,dx = 9 and favg=3f_{\text{avg}} = 3 solving c2=3c^2 = 3 and selecting the root c=3∈[0,3]c = \sqrt{3} \in [0, 3]

Exercise 2.1.3: Telescoping Darboux Gap for Monotone Functions

Proofsynthesis

Let f:[a,b]→Rf: [a, b] \to \mathbb{R} be monotonically increasing on [a,b][a, b] and let PnP_n be the uniform partition of [a,b][a, b] into nn subintervals of width Δx=(b−a)/n\Delta x = (b - a)/n Prove that U(f,Pn)−L(f,Pn)=b−an(f(b)−f(a)),U(f, P_n) - L(f, P_n) = \frac{b - a}{n}\bigl(f(b) - f(a)\bigr), and deduce that every monotone function on [a,b][a, b] is Riemann integrable—even if it has jump discontinuities.

HintExpand

On each subinterval [xi−1,xi][x_{i-1}, x_i], monotonicity forces mi=f(xi−1)m_i = f(x_{i-1}) and Mi=f(xi)M_i = f(x_i). Factor out Δx\Delta x and telescope the sum.

Worked solutionExpand
  1. Subinterval extrema: Because ff is monotonically increasing on [a,b][a, b] for every subinterval [xi−1,xi][x_{i-1}, x_i] we have f(xi−1)≤f(x)≤f(xi)f(x_{i-1}) \le f(x) \le f(x_i) so mi=f(xi−1)m_i = f(x_{i-1}) and Mi=f(xi)M_i = f(x_i)
  2. Subtract the Darboux sums: Since Δxi=b−an\Delta x_i = \frac{b - a}{n} for all ii U(f,Pn)−L(f,Pn)=∑i=1n(Mi−mi)Δxi=b−an∑i=1n(f(xi)−f(xi−1)).U(f, P_n) - L(f, P_n) = \sum_{i=1}^n (M_i - m_i)\Delta x_i = \frac{b - a}{n}\sum_{i=1}^n \bigl(f(x_i) - f(x_{i-1})\bigr).
  3. Telescope the sum: ∑i=1n(f(xi)−f(xi−1))=(f(x1)−f(x0))+(f(x2)−f(x1))+⋯+(f(xn)−f(xn−1))=f(b)−f(a).\sum_{i=1}^n \bigl(f(x_i) - f(x_{i-1})\bigr) = \bigl(f(x_1) - f(x_0)\bigr) + \bigl(f(x_2) - f(x_1)\bigr) + \dots + \bigl(f(x_n) - f(x_{n-1})\bigr) = f(b) - f(a). Hence U(f,Pn)−L(f,Pn)=b−an(f(b)−f(a))U(f, P_n) - L(f, P_n) = \frac{b - a}{n}\bigl(f(b) - f(a)\bigr)
  4. Oscillation criterion: Given ϵ>0\epsilon > 0 choose n>(b−a)(f(b)−f(a))ϵn > \frac{(b - a)(f(b) - f(a))}{\epsilon} Then U(f,Pn)−L(f,Pn)<ϵU(f, P_n) - L(f, P_n) < \epsilon so ff is Riemann integrable by Definition 2.1.2. Continuity was never used!

Verification criteria. Requires identifying mi=f(xi−1)m_i = f(x_{i-1}) and Mi=f(xi)M_i = f(x_i) by monotonicity, telescoping the sum to f(b)−f(a)f(b) - f(a) and choosing nn so that U−L<ϵU - L < \epsilon

Exercise 2.1.4: Diagnosing Non-Integrability of Nowhere-Continuous Functions

Descriptiontransfer

Examine the Darboux upper and lower integrals of Dirichlet’s indicator function on [0,1][0, 1] and complete the midpoint Riemann sum implementation below.

Verification Check

0 / 4 answered

Let f(x)=1f(x)=1 for rational xx and f(x)=0f(x)=0 for irrational xx on [0,1][0,1]. Evaluate each statement regarding Darboux integrals and integrability:

Classify each option as correct or incorrect, or leave uncertain options unanswered (“I don't know”) and verify at any time.

1
The upper Darboux integral equals 11 because the supremum on every non-empty subinterval is 11.
2
The lower Darboux integral equals 00 because the infimum on every non-empty subinterval is 00.
3
Darboux upper and lower integrals are undefined due to density of rational numbers on the interval.
4
The function is Riemann integrable because upper and lower Darboux sums both converge to 0.50.5.

Code Exercise

1 token to supply

Complete the Midpoint Riemann Sum

def midpoint_riemann_sum(f, a, b, n):
  dx = (b - a) / n
  total_area = 0.0
  for i in range(n):
      # Calculate midpoint of subinterval i
      mid = a + (i + ) * dx
      total_area += f(mid) * dx
  return total_area

References & Further Reading

  • Spivak, M. (2008). Calculus (4th ed.), Chapter 13 (“Integrals”). Publish or Perish.
  • Apostol, T. M. (1967). Calculus, Volume 1: One-Variable Calculus, with an Introduction to Linear Algebra (2nd ed.), Chapter 1 & Chapter 2 (“The Concepts of Integral Calculus” and “Some Applications of Integration”). Wiley.
  • Rudin, W. (1976). Principles of Mathematical Analysis (3rd ed.), Chapter 6 (“The Riemann-Stieltjes Integral”) and Chapter 11 (“The Lebesgue Theory”) for measure-zero sets and Lebesgue’s integrability criterion. McGraw-Hill.
  • Abbott, S. (2015). Understanding Analysis (2nd ed.), Chapter 7 (“The Riemann Integral”), §7.5–7.6 for Lebesgue’s criterion for Riemann integrability. Springer.