Monotonicity and Triangle Inequality for Integrals

Suppose you know two functions satisfy f(x)≤g(x)f(x) \le g(x) everywhere on an interval. Does the same inequality survive integration? In other words, is the area under ff at most the area under gg? This question sits at the heart of how integrals let us compare, bound, and estimate quantities we cannot compute exactly. The answer is yes. Proving it rigorously from the definition of the Riemann integral is the goal of this article. Monotonicity of the integral is one of the load-bearing walls of integration theory. It converts pointwise information into global information about accumulated area. Pointwise information is an inequality that holds at every single point of a domain. This is exactly the kind of translation calculus is built to perform. Local data, like derivatives or pointwise bounds, becomes global conclusions, like total change or total area. Without monotonicity, we would have no way to bound an integral we cannot evaluate. We do this by comparing it to one we can evaluate. This technique is used constantly in analysis. It appears in convergence tests for series and error estimates in numerical methods. The triangle inequality for integrals, ∣∫abf∣≤∫ab∣f∣\left|\int_a^b f\right| \le \int_a^b |f|, is the single most-used corollary of monotonicity. It is the integral analogue of ∣x+y∣≤∣x∣+∣y∣|x+y| \le |x|+|y|. It appears everywhere estimates are needed. Examples include bounding remainder terms in Taylor's theorem, proving convergence of improper integrals, and controlling errors in approximation schemes. It also foreshadows deep structural facts, such as why L1L^1 and L2L^2 spaces are normed vector spaces. This article builds these results from the ground up. We use only the definition of the Riemann integral and the previously established Basic Properties: Linearity and Additivity. We state precise hypotheses. We give complete proofs by direct manipulation of Riemann sums and infima/suprema. We work two asymmetric examples. We show exactly what breaks when a hypothesis — integrability, or the direction of the inequality — is dropped.

Key takeaways
  • If f≤gf \le g pointwise on [a,b][a,b] and both are Riemann integrable, then ∫abf≤∫abg\int_a^b f \le \int_a^b g.
  • Bounding ff between constants m≤f≤Mm \le f \le M forces m(b−a)≤∫abf≤M(b−a)m(b-a) \le \int_a^b f \le M(b-a).
  • If f≥0f \ge 0 on [a,b][a,b], then ∫abf≥0\int_a^b f \ge 0; this is the special case that drives everything else.
  • The triangle inequality ∣∫abf∣≤∫ab∣f∣\left|\int_a^b f\right| \le \int_a^b |f| follows from monotonicity applied to −∣f∣≤f≤∣f∣-|f| \le f \le |f|.
  • Integrability of ff forces integrability of ∣f∣|f|, which is proved separately using a Riemann-sum estimate.
  • Strict pointwise inequality does not imply strict inequality of integrals — equality on a single point set of measure zero can still occur.
  • Key idea: integration is an order-preserving, norm-shrinking linear operation, and every such fact reduces to comparing sup/inf of Riemann sums.

Where this lives today

Monotonicity and the triangle inequality for integrals are the quiet workhorses behind an enormous range of later results. The Mean Value Theorem for Integrals uses exactly the sup/inf bound of part (c) to trap the average value of a continuous function between its extremes, then invokes the Intermediate Value Theorem to locate a point where the average is achieved exactly. The Integral Test for Series compares a series to an integral by bounding rectangles above and below a decreasing function, a direct application of order preservation applied term by term. In probability and statistics, monotonicity of the integral underlies the fact that expectations preserve order: if a random variable X≤YX \le Y almost surely, then E[X]≤E[Y]\mathbb{E}[X] \le \mathbb{E}[Y], a statement whose proof (in the measure-theoretic setting) mirrors the Riemann-sum argument given here almost verbatim. In numerical analysis, error bounds for quadrature rules (trapezoidal rule, Simpson's rule) rely on bounding ∣∫f−Q(f)∣\left|\int f - Q(f)\right| using the triangle inequality applied to the difference of ff and its approximation. In physics and engineering, energy and norm estimates in differential equations frequently reduce to showing ∣∫f dx∣≤∫∣f∣ dx≤∥f∥∞(b−a)\left|\int f \, dx\right| \le \int |f| \, dx \le \|f\|_\infty (b-a), chaining the triangle inequality with the sup/inf bound. In functional analysis and cryptographic protocol analysis (where integral or sum bounds control probability of failure events), the same two-line argument — replace a signed quantity by its absolute value, then bound by a supremum times a measure — recurs constantly, making this one of the most-reused proof patterns in all of analysis.

:::quiz[If f(x)=−3f(x) = -3 for all x∈[0,4]x \in [0,4], what does part (c) of the theorem give as a valid lower bound for ∫04f dx\int_0^4 f\,dx, using m=−3,M=−3m=-3, M=-3?]

  • 0
  • -3
  • -12 ✓
  • 12

:::quiz[Which hypothesis is essential for concluding ∫abf≤∫abg\int_a^b f \le \int_a^b g from f(x)≤g(x)f(x)\le g(x) on [a,b][a,b]?]

  • f and g must be differentiable
  • f and g must both be Riemann integrable on [a,b] ✓
  • f and g must be equal at the endpoints
  • f and g must both be nonnegative

:::quiz[If ∣f∣|f| is Riemann integrable on [a,b][a,b], does it follow that ff is Riemann integrable?]

  • Yes, always, by the triangle inequality
  • No — |f| integrable does not imply f integrable, e.g. f = ±1 based on rationality ✓
  • Yes, but only if f is continuous
  • No, integrability of |f| implies f is unbounded

:::faq[Why is proving ∣f∣∈R[a,b]|f|\in\mathcal R[a,b] a separate step rather than something obvious?] Because Riemann integrability is a nontrivial property tied to the oscillation of a function across partitions, and applying an operation to ff (like taking absolute value) could in principle worsen its oscillation. The proof must verify that it does not: using the reverse triangle inequality, one shows the oscillation of ∣f∣|f| on any subinterval is never larger than the oscillation of ff itself. This lets a partition that makes ff's upper-minus-lower sum small automatically make ∣f∣|f|'s upper-minus-lower sum small too, which is precisely the Riemann integrability criterion.

Ask the tutor: Why must ∣f∣|f|'s integrability be proved separately instead of just assumed once ff is known integrable?

DefinitionRiemann Integrability and the Integral

Let f:[a,b]→Rf:[a,b]\to\mathbb{R} be a bounded function. For a partition P={a=x0<x1<⋯<xn=b}P = \{a = x_0 < x_1 < \cdots < x_n = b\} of [a,b][a,b], define

Mi=sup⁡x∈[xi−1,xi]f(x),mi=inf⁡x∈[xi−1,xi]f(x),M_i = \sup_{x \in [x_{i-1},x_i]} f(x), \qquad m_i = \inf_{x \in [x_{i-1},x_i]} f(x),

and the upper and lower Darboux sums

U(f,P)=∑i=1nMi Δxi,L(f,P)=∑i=1nmi Δxi,Δxi=xi−xi−1.U(f,P) = \sum_{i=1}^n M_i \,\Delta x_i, \qquad L(f,P) = \sum_{i=1}^n m_i \,\Delta x_i, \qquad \Delta x_i = x_i - x_{i-1}.

Define the upper and lower integrals

∫ab‾f=inf⁡PU(f,P),∫ab‾f=sup⁡PL(f,P).\overline{\int_a^b} f = \inf_P U(f,P), \qquad \underline{\int_a^b} f = \sup_P L(f,P).

The function ff is Riemann integrable on [a,b][a,b] if ∫ab‾f=∫ab‾f\overline{\int_a^b} f = \underline{\int_a^b} f, and this common value is denoted ∫abf\int_a^b f. We write f∈R[a,b]f \in \mathcal{R}[a,b].

Intuition

Picture the integral as the net signed area trapped between the graph of ff and the xx-axis. If a second function gg never dips below ff, then any rectangle you use to approximate the area under gg from below must be at least as tall as the corresponding rectangle for ff. Every lower Darboux sum for gg dominates the corresponding lower sum for ff, and the same argument works for upper sums. Since the integral is squeezed between these sums, it inherits the inequality. The triangle inequality is a sharper version of the same idea: no matter how much ff oscillates between positive and negative values, replacing ff by ∣f∣|f| can only increase the total area being summed, because cancellation between positive and negative pieces of ff is destroyed once you take absolute values. The signed area of ff is thus always dominated in magnitude by the unsigned area of ∣f∣|f|.

Figure
Pointwise inequality f ≤ g forces area(f) ≤ area(g)
x y a b g(x) f(x) ∫f ≤ ∫g since f(x) ≤ g(x) for all x ∈ [a,b]
TheoremMonotonicity and the Triangle Inequality for Integrals

Let f,g∈R[a,b]f, g \in \mathcal{R}[a,b].

(a) (Nonnegativity.) If f(x)≥0f(x) \ge 0 for all x∈[a,b]x \in [a,b], then

∫abf≥0.\int_a^b f \ge 0.

(b) (Order preservation.) If f(x)≤g(x)f(x) \le g(x) for all x∈[a,b]x \in [a,b], then

∫abf≤∫abg.\int_a^b f \le \int_a^b g.

(c) (Sup/inf bounds.) If m≤f(x)≤Mm \le f(x) \le M for all x∈[a,b]x \in [a,b] and constants m,M∈Rm, M \in \mathbb{R}, then

m(b−a)≤∫abf≤M(b−a).m(b-a) \le \int_a^b f \le M(b-a).

(d) (Triangle inequality.) ∣f∣∈R[a,b]|f| \in \mathcal{R}[a,b], and

∣∫abf∣≤∫ab∣f∣.\left| \int_a^b f \right| \le \int_a^b |f|.
Proof

We prove each part in turn, using only the definition of the Darboux/Riemann integral and previously established Basic Properties: Linearity and Additivity (linearity of the integral and additivity over the sum f+gf+g).

Proof technique: direct estimation of Darboux sums, together with a ε\varepsilon-partition argument for integrability of ∣f∣|f|.

(a) Nonnegativity. Suppose f(x)≥0f(x) \ge 0 for every x∈[a,b]x \in [a,b]. Let P={x0,…,xn}P = \{x_0, \dots, x_n\} be any partition of [a,b][a,b]. On each subinterval [xi−1,xi][x_{i-1}, x_i], since f≥0f \ge 0 pointwise,

mi=inf⁡x∈[xi−1,xi]f(x)≥0,m_i = \inf_{x \in [x_{i-1},x_i]} f(x) \ge 0,

because the infimum of a set of nonnegative numbers is nonnegative (any lower bound ℓ<0\ell < 0 is not the greatest lower bound, since 00 is also a lower bound and 0>ℓ0 > \ell; formally, mi≥0m_i \ge 0 since every value f(x)f(x) in the subinterval satisfies f(x)≥0f(x)\ge 0, so 00 is a lower bound for {f(x):x∈[xi−1,xi]}\{f(x): x\in[x_{i-1},x_i]\}, hence mi≥0m_i \ge 0 as the supremum of lower bounds). Since Δxi=xi−xi−1>0\Delta x_i = x_i - x_{i-1} > 0, we get miΔxi≥0m_i \Delta x_i \ge 0 for every ii, hence

L(f,P)=∑i=1nmiΔxi≥0.L(f,P) = \sum_{i=1}^n m_i \Delta x_i \ge 0.

This holds for every partition PP. Therefore 00 is a lower bound for the set {L(f,P):P a partition}\{L(f,P) : P \text{ a partition}\}, so

∫ab‾f=sup⁡PL(f,P)≥0.\underline{\int_a^b} f = \sup_P L(f,P) \ge 0.

(The supremum of a set that has a lower bound 00, and that is nonempty, is itself ≥0\ge 0 precisely because the supremum is an upper bound for the set and the set contains values ≥0\ge 0; more directly, since every element of the set is ≥0\ge 0, the least upper bound cannot be negative — a negative number would fail to be an upper bound whenever the set is nonempty, but here we simply use that sup⁡S≥s\sup S \ge s for any s∈Ss \in S, and pick any particular L(f,P)≥0L(f,P) \ge 0.) Since f∈R[a,b]f \in \mathcal{R}[a,b] by hypothesis, ∫abf=∫ab‾f≥0\int_a^b f = \underline{\int_a^b} f \ge 0. This proves (a).

(b) Order preservation. Suppose f(x)≤g(x)f(x) \le g(x) for all x∈[a,b]x \in [a,b], with f,g∈R[a,b]f, g \in \mathcal{R}[a,b]. Define h=g−fh = g - f. By linearity (additivity of integrable functions under subtraction, a special case of Basic Properties: Linearity and Additivity), h∈R[a,b]h \in \mathcal{R}[a,b] and

∫abh=∫abg−∫abf.\int_a^b h = \int_a^b g - \int_a^b f.

Moreover h(x)=g(x)−f(x)≥0h(x) = g(x) - f(x) \ge 0 for every x∈[a,b]x \in [a,b] by hypothesis. Applying part (a) to hh,

∫abh≥0⟹∫abg−∫abf≥0⟹∫abf≤∫abg.\int_a^b h \ge 0 \quad\Longrightarrow\quad \int_a^b g - \int_a^b f \ge 0 \quad\Longrightarrow\quad \int_a^b f \le \int_a^b g.

This proves (b).

(c) Sup/inf bounds. Suppose m≤f(x)≤Mm \le f(x) \le M for all x∈[a,b]x \in [a,b]. Let c(x)≡mc(x) \equiv m and C(x)≡MC(x) \equiv M denote the constant functions. Constant functions are Riemann integrable (every Darboux sum for a constant kk on [a,b][a,b] equals k(b−a)k(b-a) regardless of partition, so upper and lower integrals both equal k(b−a)k(b-a)), with

∫abm dx=m(b−a),∫abM dx=M(b−a).\int_a^b m \, dx = m(b-a), \qquad \int_a^b M \, dx = M(b-a).

Since c(x)=m≤f(x)≤M=C(x)c(x) = m \le f(x) \le M = C(x) for every x∈[a,b]x \in [a,b], apply part (b) twice: once to the pair (c,f)(c, f) and once to the pair (f,C)(f, C):

∫abc≤∫abfand∫abf≤∫abC.\int_a^b c \le \int_a^b f \quad\text{and}\quad \int_a^b f \le \int_a^b C.

Substituting the values of the constant integrals gives

m(b−a)≤∫abf≤M(b−a),m(b-a) \le \int_a^b f \le M(b-a),

proving (c).

(d) Triangle inequality. We must first show ∣f∣∈R[a,b]|f| \in \mathcal{R}[a,b], then deduce the inequality. Step 1: ∣f∣|f| is Riemann integrable. Since ff is bounded (as f∈R[a,b]f \in \mathcal{R}[a,b] requires boundedness), so is ∣f∣|f|. Fix any x,y∈[xi−1,xi]x, y \in [x_{i-1}, x_i] for a subinterval of some partition PP. By the reverse triangle inequality for real numbers,

∣∣f(x)∣−∣f(y)∣∣≤∣f(x)−f(y)∣.\big| |f(x)| - |f(y)| \big| \le |f(x) - f(y)|.

Taking the supremum over x,yx, y in the subinterval on both sides shows that the oscillation of ∣f∣|f| on [xi−1,xi][x_{i-1},x_i] is at most the oscillation of ff on the same subinterval:

Mi(∣f∣)−mi(∣f∣)≤Mi(f)−mi(f),M_i(|f|) - m_i(|f|) \le M_i(f) - m_i(f),

where Mi(⋅),mi(⋅)M_i(\cdot), m_i(\cdot) denote the sup and inf of the respective function on [xi−1,xi][x_{i-1}, x_i]. (To see this bound rigorously: for any x,yx,y in the subinterval, ∣f(x)∣−∣f(y)∣≤∣f(x)−f(y)∣≤Mi(f)−mi(f)|f(x)| - |f(y)| \le |f(x)-f(y)| \le M_i(f) - m_i(f); taking the supremum over xx and then over yy of the left side gives Mi(∣f∣)−mi(∣f∣)≤Mi(f)−mi(f)M_i(|f|) - m_i(|f|) \le M_i(f) - m_i(f).) Now let ε>0\varepsilon > 0. Since f∈R[a,b]f \in \mathcal{R}[a,b], the Riemann/Darboux integrability criterion (equivalence of upper and lower integrals) guarantees a partition PP with

U(f,P)−L(f,P)=∑i=1n(Mi(f)−mi(f))Δxi<ε.U(f,P) - L(f,P) = \sum_{i=1}^n \big(M_i(f) - m_i(f)\big)\Delta x_i < \varepsilon.

Using the oscillation bound just proved, term by term,

U(∣f∣,P)−L(∣f∣,P)=∑i=1n(Mi(∣f∣)−mi(∣f∣))Δxi≤∑i=1n(Mi(f)−mi(f))Δxi<ε.U(|f|,P) - L(|f|,P) = \sum_{i=1}^n \big(M_i(|f|) - m_i(|f|)\big)\Delta x_i \le \sum_{i=1}^n \big(M_i(f) - m_i(f)\big)\Delta x_i < \varepsilon.

Since ε>0\varepsilon > 0 was arbitrary, ∣f∣|f| satisfies the Riemann integrability criterion, so ∣f∣∈R[a,b]|f| \in \mathcal{R}[a,b]. Step 2: the inequality. For every x∈[a,b]x \in [a,b],

−∣f(x)∣≤f(x)≤∣f(x)∣.-|f(x)| \le f(x) \le |f(x)|.

Both −∣f∣-|f| and ∣f∣|f| are Riemann integrable (−∣f∣-|f| by linearity applied to ∣f∣|f|, using ∫ab(−∣f∣)=−∫ab∣f∣\int_a^b(-|f|) = -\int_a^b |f|). Apply part (b) to the two inequalities −∣f∣≤f-|f| \le f and f≤∣f∣f \le |f|:

−∫ab∣f∣=∫ab(−∣f∣)≤∫abf≤∫ab∣f∣.-\int_a^b |f| = \int_a^b (-|f|) \le \int_a^b f \le \int_a^b |f|.

This chain of inequalities is exactly the statement

∣∫abf∣≤∫ab∣f∣,\left| \int_a^b f \right| \le \int_a^b |f|,

since for real numbers tt, the two-sided bound −K≤t≤K-K \le t \le K (with K≥0K \ge 0) is equivalent to ∣t∣≤K|t| \le K. Here t=∫abft = \int_a^b f and K=∫ab∣f∣≥0K = \int_a^b |f| \ge 0 (by part (a), since ∣f∣≥0|f| \ge 0 pointwise). This completes the proof of (d). ■\blacksquare

∎

Worked examples

Example 1 (order preservation with genuinely different functions). Let f(x)=x2f(x) = x^2 and g(x)=2x+3g(x) = 2x + 3 on [0,2][0,2]. We check f(x)≤g(x)f(x) \le g(x) on this interval: the difference is

g(x)−f(x)=−x2+2x+3=−(x−3)(x+1),g(x) - f(x) = -x^2 + 2x + 3 = -(x-3)(x+1),

which is nonnegative exactly when −1≤x≤3-1 \le x \le 3; since [0,2]⊂[−1,3][0,2] \subset [-1,3], indeed f(x)≤g(x)f(x) \le g(x) for all x∈[0,2]x \in [0,2]. Both ff and gg are continuous, hence Riemann integrable on [0,2][0,2]. Compute both integrals directly (using the Fundamental Theorem of Calculus, which presupposes only the integrability already established):

∫02x2 dx=[x33]02=83,\int_0^2 x^2 \, dx = \left[\frac{x^3}{3}\right]_0^2 = \frac{8}{3},
∫02(2x+3) dx=[x2+3x]02=4+6=10.\int_0^2 (2x+3) \, dx = \left[x^2 + 3x\right]_0^2 = 4 + 6 = 10.

Indeed 83≈2.667≤10\frac{8}{3} \approx 2.667 \le 10, confirming Theorem part (b) numerically. Notice the functions are not close to each other in shape — one is a parabola, one is a line — which is the point: monotonicity of the integral requires nothing about the functions except the pointwise inequality and integrability. We can also illustrate part (c): on [0,2][0,2], f(x)=x2f(x) = x^2 satisfies 0≤f(x)≤40 \le f(x) \le 4 (with m=0,M=4m=0, M=4), so the theorem predicts

0⋅2≤∫02x2 dx≤4⋅2,i.e.,0≤83≤8,0 \cdot 2 \le \int_0^2 x^2\,dx \le 4 \cdot 2, \quad\text{i.e.,}\quad 0 \le \tfrac{8}{3} \le 8,

which indeed holds, though the bound 88 is far from tight — the sup/inf bound is a crude but always-valid estimate.

Example 2 (the triangle inequality with a sign-changing function). Let f(x)=sin⁡(x)−12f(x) = \sin(x) - \tfrac12 on [0,π][0, \pi], a function that is continuous (hence integrable) and changes sign on this interval, since f(0)=−12<0f(0) = -\tfrac12 < 0 while f(π/2)=12>0f(\pi/2) = \tfrac12 > 0. First compute ∫0πf(x) dx\int_0^\pi f(x)\,dx directly:

∫0π(sin⁡x−12)dx=[−cos⁡x−12x]0π=(−cos⁡π−π2)−(−cos⁡0−0)=(1−π2)−(−1)=2−π2.\int_0^\pi \left(\sin x - \tfrac12\right) dx = \big[-\cos x - \tfrac12 x\big]_0^\pi = \left(-\cos\pi - \tfrac{\pi}{2}\right) - \left(-\cos 0 - 0\right) = (1 - \tfrac{\pi}{2}) - (-1) = 2 - \tfrac{\pi}{2}.

Numerically, π2≈1.5708\tfrac{\pi}{2} \approx 1.5708, so ∫0πf≈2−1.5708=0.4292\int_0^\pi f \approx 2 - 1.5708 = 0.4292, hence ∣∫0πf∣≈0.4292\left|\int_0^\pi f\right| \approx 0.4292. Now we need ∫0π∣f(x)∣ dx=∫0π∣sin⁡x−12∣dx\int_0^\pi |f(x)|\,dx = \int_0^\pi \left|\sin x - \tfrac12\right| dx. The expression sin⁡x−12\sin x - \tfrac12 vanishes when sin⁡x=12\sin x = \tfrac12, i.e. at x=π/6x = \pi/6 and x=5π/6x = 5\pi/6 in [0,π][0,\pi]. On [0,π/6][0, \pi/6] and [5π/6,π][5\pi/6, \pi], sin⁡x<12\sin x < \tfrac12 so f<0f < 0; on [π/6,5π/6][\pi/6, 5\pi/6], f≥0f \ge 0. Split the integral accordingly:

∫0π∣f∣ dx=∫0π/6(12−sin⁡x)dx+∫π/65π/6(sin⁡x−12)dx+∫5π/6π(12−sin⁡x)dx.\int_0^\pi |f| \,dx = \int_0^{\pi/6} \left(\tfrac12 - \sin x\right)dx + \int_{\pi/6}^{5\pi/6}\left(\sin x - \tfrac12\right)dx + \int_{5\pi/6}^{\pi}\left(\tfrac12 - \sin x\right)dx.

Using an antiderivative F(x)=−cos⁡x−x2F(x) = -\cos x - \tfrac{x}{2} for sin⁡x−12\sin x - \tfrac12 (so −F(x)=cos⁡x+x2-F(x) = \cos x + \tfrac{x}{2} is an antiderivative of 12−sin⁡x\tfrac12 - \sin x): First piece:

∫0π/6(12−sin⁡x)dx=[cos⁡x+x2]0π/6=(32+π12)−(1+0)=32+π12−1.\int_0^{\pi/6}\left(\tfrac12 - \sin x\right)dx = \left[\cos x + \tfrac{x}{2}\right]_0^{\pi/6} = \left(\tfrac{\sqrt3}{2} + \tfrac{\pi}{12}\right) - (1 + 0) = \tfrac{\sqrt3}{2} + \tfrac{\pi}{12} - 1.

Numerically: 32≈0.8660\tfrac{\sqrt3}{2} \approx 0.8660, π12≈0.2618\tfrac{\pi}{12} \approx 0.2618, sum ≈1.1278\approx 1.1278, minus 11 gives ≈0.1278\approx 0.1278. Second piece:

∫π/65π/6(sin⁡x−12)dx=[−cos⁡x−x2]π/65π/6=(−cos⁡5π6−5π12)−(−cos⁡π6−π12).\int_{\pi/6}^{5\pi/6}\left(\sin x - \tfrac12\right)dx = \left[-\cos x - \tfrac x2\right]_{\pi/6}^{5\pi/6} = \left(-\cos\tfrac{5\pi}{6} - \tfrac{5\pi}{12}\right) - \left(-\cos\tfrac\pi6 - \tfrac{\pi}{12}\right).

Since cos⁡(5π/6)=−32\cos(5\pi/6) = -\tfrac{\sqrt3}{2} and cos⁡(π/6)=32\cos(\pi/6) = \tfrac{\sqrt3}{2}:

=(32−5π12)−(−32−π12)=3−4π12=3−π3.= \left(\tfrac{\sqrt3}{2} - \tfrac{5\pi}{12}\right) - \left(-\tfrac{\sqrt3}{2} - \tfrac{\pi}{12}\right) = \sqrt3 - \tfrac{4\pi}{12} = \sqrt3 - \tfrac{\pi}{3}.

Numerically: 3≈1.7321\sqrt3 \approx 1.7321, π3≈1.0472\tfrac{\pi}{3}\approx 1.0472, difference ≈0.6849\approx 0.6849. Third piece (by the symmetry x↦π−xx \mapsto \pi - x mapping [5π/6,π][5\pi/6,\pi] to [0,π/6][0,\pi/6], and sin⁡(π−x)=sin⁡x\sin(\pi - x) = \sin x): this equals the first piece, ≈0.1278\approx 0.1278. Summing:

∫0π∣f∣ dx≈0.1278+0.6849+0.1278=0.9405.\int_0^\pi |f|\,dx \approx 0.1278 + 0.6849 + 0.1278 = 0.9405.

Check the theorem: ∣∫0πf∣≈0.4292≤0.9405≈∫0π∣f∣\left|\int_0^\pi f\right| \approx 0.4292 \le 0.9405 \approx \int_0^\pi |f|. The inequality holds, and it is strict, exactly because ff changes sign — the negative contributions near the endpoints partially cancel the positive contribution in the middle when we do not take absolute values, so the signed integral is much smaller in magnitude than the unsigned one.

CounterexampleDropping integrability breaks additivity-based proofs, and dropping the pointwise hypothesis breaks the conclusion

The theorem requires both functions to be Riemann integrable and the inequality f≤gf \le g to hold at every point of [a,b][a,b]. Both hypotheses are essential.

Dropping integrability. Let [a,b]=[0,1][a,b] = [0,1] and define

f(x)={1x∈Q∩[0,1]0x∉Q,g(x)=1 for all x∈[0,1].f(x) = \begin{cases} 1 & x \in \mathbb{Q} \cap [0,1] \\ 0 & x \notin \mathbb{Q} \end{cases}, \qquad g(x) = 1 \text{ for all } x \in [0,1].

Certainly f(x)≤g(x)f(x) \le g(x) for every x∈[0,1]x \in [0,1], and gg is integrable with ∫01g=1\int_0^1 g = 1. But ff is the Dirichlet function, which is not Riemann integrable: every subinterval of every partition contains both rational and irrational points, so Mi=1M_i = 1 and mi=0m_i = 0 for every subinterval of every partition, giving

U(f,P)=1 for all P,L(f,P)=0 for all P,U(f,P) = 1 \text{ for all } P, \qquad L(f,P) = 0 \text{ for all } P,

hence ∫01‾f=1≠0=∫01‾f\overline{\int_0^1} f = 1 \ne 0 = \underline{\int_0^1} f. Since f∉R[0,1]f \notin \mathcal{R}[0,1], the statement "∫01f≤∫01g\int_0^1 f \le \int_0^1 g" is not merely false, it is meaningless — the symbol ∫01f\int_0^1 f does not denote a number. The theorem's proof used additivity/linearity, which presupposes both functions are integrable; without that, the argument (and the conclusion) simply does not apply.

Dropping the everywhere hypothesis (pointwise inequality almost everywhere is not enough for the naive argument, though the conclusion happens to survive in this case with more machinery). More instructively, consider what happens if the inequality f≤gf \le g fails at even a single point, and we still try to compare sup and inf bounds carelessly. Take [a,b]=[0,1][a,b] = [0,1],

f(x)={5x=120x≠12,g(x)=0 for all x∈[0,1].f(x) = \begin{cases} 5 & x = \tfrac12 \\ 0 & x \ne \tfrac12 \end{cases}, \qquad g(x) = 0 \text{ for all } x \in [0,1].

Here ff fails f≤gf \le g only at the single point x=1/2x = 1/2, yet both are Riemann integrable (a function differing from 00 at only one point has ∫01f=0\int_0^1 f = 0, since the single point contributes nothing to any Darboux sum in the limit — the oscillation on any subinterval containing 1/21/2 can be made to contribute arbitrarily little total area by shrinking that subinterval). Indeed ∫01f=0=∫01g\int_0^1 f = 0 = \int_0^1 g, so equality (not strict violation) occurs; monotonicity as stated (f≤gf \le g everywhere ⇒∫f≤∫g\Rightarrow \int f \le \int g) is not contradicted, since here f≤gf\le g fails at one point, yet the integrals still satisfy ≤\le. This shows the everywhere-hypothesis is sufficient but the conclusion can survive violations on small sets — precisely the phenomenon that later motivates measure-zero refinements (e.g., in Lebesgue theory), but it also warns that one must never assume the theorem applies when the pointwise hypothesis fails; one must check it, or use finer tools.

Scope, edge cases & common traps

SituationWhat holdsWhat can fail
f≤gf \le g pointwise everywhere, both integrable∫f≤∫g\int f \le \int gNothing — this is the theorem
f≤gf \le g except on a finite set, both integrableOften still ∫f≤∫g\int f \le \int g if violations are "small"Requires separate justification; not covered directly by the theorem as stated
f<gf < g strictly everywhere∫f≤∫g\int f \le \int g (only non-strict guaranteed in general)Strict inequality of integrals is not automatic from strict pointwise inequality without extra hypotheses (e.g. continuity)
ff or gg not integrable—The statement ∫f≤∫g\int f \le \int g is not even meaningful
∣f∣|f| integrableDoes not imply ff integrableClassic example: f(x)=1f(x)=1 on rationals, −1-1 on irrationals; ∣f∣≡1|f|\equiv 1 is integrable but ff is not

The mathematician behind it

Origins · 1 minBernhard Riemann and how this was discovered
BR
Bernhard Riemann
1826–1866 · Göttingen, mid-19th-century analysis

Riemann formalized the modern notion of the definite integral in his 1854 habilitation thesis, seeking the most general conditions under which a function could be integrated using a limit of sums over ever-finer partitions. His construction — later reformulated by Darboux using upper and lower sums, the version used throughout this article — replaced earlier, less rigorous notions of "area under a curve" with a precise, provable framework. Riemann's broader work, spanning complex analysis, differential geometry, and number theory, reshaped much of 19th-century mathematics, but the integral bearing his name remains the entry point through which nearly every student first encounters rigorous analysis.

History
- 1823: Cauchy gives an early rigorous definition of the integral for continuous functions, using sums over partitions.
- 1854: Riemann's habilitation thesis extends integrability to a broader class of bounded functions, introducing the criterion later phrased via oscillation sums.
- 1875: Gaston Darboux reformulates Riemann's integral using upper and lower sums (the U(f,P)U(f,P), L(f,P)L(f,P) machinery used here), clarifying the sup/inf structure.
- 1902: Henri Lebesgue introduces measure-theoretic integration, resolving pathologies (like the Dirichlet function) that Riemann integration cannot handle.
- 1958-present: Monotonicity and the triangle inequality for integrals become standard early lemmas in every rigorous real analysis curriculum, feeding directly into the Mean Value Theorem for Integrals and convergence tests for series and improper integrals.
Does f≤gf \le g pointwise and f≠gf \ne g somewhere imply ∫f<∫g\int f < \int g strictly?

No, not in general. Strict pointwise inequality at isolated points, or even on a "small" set, need not force strict inequality of the integrals. For instance, if ff and gg differ only at finitely many points but agree everywhere else, both integrals can be equal, because Riemann sums are insensitive to function values at finitely many points in the limit of fine partitions. Strict inequality of integrals is guaranteed only under extra hypotheses, such as f<gf < g holding on an entire subinterval with both functions continuous there — in that setting, continuity forces the integral of the (nonnegative, not-identically-zero) difference to be strictly positive.

Why does the proof of part (a) not just say "obviously, integrating a nonnegative function gives a nonnegative number"?

Because in a rigorous framework, "the integral" is defined as the common value of an infimum of upper sums and a supremum of lower sums, not as an intuitive area. To prove ∫abf≥0\int_a^b f \ge 0 rigorously, one must show that every lower Darboux sum for a nonnegative ff is itself nonnegative (which follows because infima of nonnegative values are nonnegative), and then that the supremum of a set of nonnegative numbers is nonnegative. Skipping this and appealing to intuition would leave a gap: it would not explain why the definition guarantees the geometric intuition holds.

Is the triangle inequality for integrals related to the triangle inequality for absolute values?

Yes, directly. The inequality ∣∫abf∣≤∫ab∣f∣\left|\int_a^b f\right| \le \int_a^b |f| is the continuum analogue of ∣x1+x2+⋯+xn∣≤∣x1∣+∣x2∣+⋯+∣xn∣|x_1 + x_2 + \cdots + x_n| \le |x_1| + |x_2| + \cdots + |x_n| for real numbers, since the Riemann integral is itself a limit of such finite sums (Riemann sums). Just as the discrete triangle inequality can make a sum's magnitude smaller than the sum of magnitudes due to cancellation of signs, the integral inequality can be strict whenever ff changes sign on [a,b][a,b], as shown explicitly in Worked Example 2.

Can the sup/inf bound in part (c) ever be an equality?

Yes. If ff is the constant function f(x)=cf(x) = c for all x∈[a,b]x \in [a,b], then m=M=cm = M = c works, and both inequalities in part (c) become equalities: c(b−a)≤∫abc dx≤c(b−a)c(b-a) \le \int_a^b c\,dx \le c(b-a). More generally, equality on the upper bound ∫abf=M(b−a)\int_a^b f = M(b-a) forces f(x)=Mf(x) = M almost everywhere in a suitable sense (exactly everywhere if ff is continuous), since any strict dip below MM on a subinterval of positive length would strictly lower the integral below M(b−a)M(b-a).

Does monotonicity hold if a>ba > b, using the convention ∫baf=−∫abf\int_b^a f = -\int_a^b f?

The theorem as stated assumes a<ba < b (or at least a≤ba \le b) so that all Δxi>0\Delta x_i > 0 in the Darboux sums; this positivity is exactly what makes miΔxi≥0m_i \Delta x_i \ge 0 follow from mi≥0m_i \ge 0. If one uses the standard orientation convention ∫abf=−∫baf\int_a^b f = -\int_b^a f for a>ba > b, monotonicity flips: f≤gf \le g on [b,a][b,a] gives ∫baf≤∫bag\int_b^a f \le \int_b^a g, hence −∫abf≤−∫abg-\int_a^b f \le -\int_a^b g, i.e. ∫abf≥∫abg\int_a^b f \ge \int_a^b g — the inequality reverses. This is a common source of sign errors and should always be checked explicitly rather than assumed.

How does this theorem connect to the Mean Value Theorem for Integrals?

The Mean Value Theorem for Integrals states that for continuous ff on [a,b][a,b], there exists c∈[a,b]c \in [a,b] with ∫abf=f(c)(b−a)\int_a^b f = f(c)(b-a). Its proof begins exactly with part (c) of this theorem: letting m=min⁡fm = \min f and M=max⁡fM = \max f (which exist by the Extreme Value Theorem, since ff is continuous on a compact interval), monotonicity gives m(b−a)≤∫abf≤M(b−a)m(b-a) \le \int_a^b f \le M(b-a), so the "average value" 1b−a∫abf\frac{1}{b-a}\int_a^b f lies in [m,M][m, M]. The Intermediate Value Theorem then produces the point cc where f(c)f(c) equals this average exactly.

Before this

Where this leads