---
title: "Integration on a Segment"
book: "University Mathematics — Year 1"
subject: math
language: en
chapter: 15
exercises: 12
source: https://one-course.com/books/math/3/en/chapter/15-integration-on-a-segment
---

# Chapter 15 — Integration on a Segment

The [integral](#thm-b1-integration-def) of the High School volume was founded on areas taken intuitively. This chapter constructs it: first for [step functions](#def-b1-integration-step), where the [integral](#thm-b1-integration-def) is a finite sum, then for [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) (and piecewise [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous)) functions by uniform approximation — the place where Heine’s theorem ([Theorem 13.22](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#thm-b1-continuity-heine)) earns its keep. The fundamental theorem of calculus then connects the construction to primitives, and [Riemann sums](#thm-b1-integration-riemann) connect it to discrete averages.

Throughout, $a < b$ are reals.

## 15.1 Step functions

**Definition 15.1.**

$\varphi \colon \intcc{a}{b} \to \R$ is a *step function* when there is a subdivision $a = x_0
< x_1 < \dots < x_n = b$ such that $\varphi$ is constant, equal to $c_i$, on each [open](https://one-course.com/books/math/3/en/chapter/12-topology-of-the-real-line#def-b1-topology-open) [interval](https://one-course.com/books/math/3/en/chapter/10-real-numbers#prop-b1-reals-intervals) $\intoo{x_{i-1}}{x_i}$ (values at the nodes are unconstrained). Its [integral](#thm-b1-integration-def) is

$$
\int_a^b \varphi = \sum_{i=1}^{n} c_i\,(x_i - x_{i-1}),
$$

independent of the chosen subdivision (refine two subdivisions by their common one: each side is unchanged under refinement).

**Proposition 15.2.**

On [step functions](#def-b1-integration-step), the [integral](#thm-b1-integration-def) is linear, increasing ($\varphi \leq
\psi \implies \int\varphi \leq \int\psi$), and satisfies the Chasles relation $\int_a^b = \int_a^c + \int_c^b$ for $a < c < b$.

**Proof.** The engine is *refinement invariance*, stated in the definition: inserting one extra node $t \in \intoo{x_{i-1}}{x_i}$ into a subdivision replaces the term $c_i(x_i - x_{i-1})$ by $c_i(t - x_{i-1}) + c_i(x_i - t)$ — the same number — so the [integral](#thm-b1-integration-def) is unchanged by any finite refinement. Now take $\varphi$ with subdivision $\sigma$ and $\psi$ with subdivision $\sigma'$: on the common refinement $\sigma \cup \sigma'$ both are [step functions](#def-b1-integration-step) with the *same* nodes, and on each piece $\varphi + \lambda\psi$ is constant equal to $c_i + \lambda
d_i$: linearity reduces to linearity of finite sums. Increase: $c_i \leq d_i$ on each piece gives $\sum c_i \Delta_i \leq \sum
d_i \Delta_i$ (lengths $\Delta_i \geq 0$). Chasles: insert the node $c$ and split the sum at it. ∎

## 15.2 Integral of a continuous function

**Theorem 15.3 (Uniform approximation).**

Let $f$ be [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\intcc{a}{b}$. For every $\varepsilon > 0$ there are [step functions](#def-b1-integration-step) $\varphi, \psi$ with

$$
\varphi \leq f \leq \psi
\qquad\text{and}\qquad
\psi - \varphi \leq \varepsilon \text{ on } \intcc{a}{b}.
$$

**Proof.** By Heine’s theorem ([Theorem 13.22](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#thm-b1-continuity-heine)), $f$ is [uniformly continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-uniform): pick $\delta$ for $\varepsilon$, and a subdivision of mesh $< \delta$ (equally spaced, say, with $n > \frac{b -
a}{\delta}$ pieces). On each [closed](https://one-course.com/books/math/3/en/chapter/12-topology-of-the-real-line#def-b1-topology-closed) piece $\intcc{x_{i-1}}{x_i}$, $f$ attains a minimum $m_i$ and a maximum $M_i$ ([Theorem 13.13](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#thm-b1-continuity-evt)), and $M_i - m_i \leq \varepsilon$ (the two extremal points are within $\delta$). Define $\varphi = m_i$ and $\psi = M_i$ on $\intoo{x_{i-1}}{x_i}$ (and $\varphi = \psi = f$ at the nodes). ∎

**Theorem 15.4 (Definition of the integral).**

Let $f$ be [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\intcc{a}{b}$. The two numbers

$$
I_-(f) = \sup\Bigl\{\int_a^b \varphi : \varphi \text{ step},\
\varphi \leq f\Bigr\},
\qquad
I_+(f) = \inf\Bigl\{\int_a^b \psi : \psi \text{ step},\ \psi \geq
f\Bigr\}
$$

are equal; their common value is the *integral* $\int_a^b f$ (also written $\int_a^b
f(t)\,\dd t$). It coincides with the previous notion on [step functions](#def-b1-integration-step), and extends to piecewise [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) functions by splitting $\intcc{a}{b}$ at the discontinuities (Chasles as a definition there).

**Proof.** Both [sets](https://one-course.com/books/math/3/en/chapter/1-logic-sets-and-maps#def-b1-logic-sets) are nonempty ($f$ is bounded) and every lower step [integral](#thm-b1-integration-def) is $\leq$ every upper one (monotonicity on [step functions](#def-b1-integration-step)): so $I_-(f) \leq I_+(f)$. By [Theorem 15.3](#thm-b1-integration-approx), for every $\varepsilon$ there is a pair with $\int\psi - \int\varphi \leq
\varepsilon(b - a)$: the sup and inf are squeezed together, $I_- =
I_+$. ∎

**Example 15.5 (Piecewise continuous, no drama).**

The [floor function](https://one-course.com/books/math/3/en/chapter/10-real-numbers#thm-b1-reals-floor) on $\intcc{0}{3}$ is a [step function](#def-b1-integration-step) in disguise: splitting at its jumps,

$$
\int_0^3 \lfloor t \rfloor\,\dd t
= \int_0^1 0 + \int_1^2 1 + \int_2^3 2 = 0 + 1 + 2 = 3 ,
$$

and the values *at* the jump points $1, 2$ are irrelevant: changing a function at finitely many points changes no [integral](#thm-b1-integration-def) (the framing [step functions](#def-b1-integration-step) are unaffected). This is the whole content of the “piecewise [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous)” extension: cut at the finitely many discontinuities, integrate each [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) piece, add — Chasles as a definition.

**Example 15.6 (The definition computes, once).**

Let $f(x) = x$ on $\intcc{0}{1}$ and cut into $n$ equal pieces. The best [step functions](#def-b1-integration-step) constant on the pieces are $\varphi =
\frac{k-1}{n}$ and $\psi = \frac kn$ on the $k$-th piece, with

$$
\int_0^1 \varphi = \sum_{k=1}^{n} \frac{k-1}{n}\cdot\frac1n
= \frac{n-1}{2n},
\qquad
\int_0^1 \psi = \sum_{k=1}^{n} \frac{k}{n}\cdot\frac1n
= \frac{n+1}{2n} .
$$

Every lower [integral](#thm-b1-integration-def) is $\leq I_-(f) \leq I_+(f) \leq$ every upper one, so $\frac{n-1}{2n} \leq I_-(f) \leq I_+(f) \leq
\frac{n+1}{2n}$ for all $n$: both squeeze onto $\frac12$, and $\int_0^1 x\,\dd x = \frac12$ straight from the definition. The closing insight: this is the first and last time we integrate from the definition — the fundamental theorem below replaces all such computations by one antiderivative lookup, which is the entire economic point of this chapter.

**Theorem 15.7 (Properties).**

For $f, g$ [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) (or piecewise [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous)) on $\intcc{a}{b}$ and $\lambda \in \R$:

1. linearity: $\int (f + \lambda g) = \int f + \lambda \int g$ ;
2. monotonicity: $f \leq g \implies \int_a^b f \leq \int_a^b g$ ; and $\bigl|\int_a^b f\bigr| \leq \int_a^b \abs f \leq (b -  a)\, \sup\abs f$ ;
3. Chasles: $\int_a^b = \int_a^c + \int_c^b$ (with the convention $\int_b^a = -\int_a^b$ , valid for any order of the bounds);
4. strict positivity: if $f$ is [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) , $f \geq 0$ and $\int_a^b f = 0$ , then $f = 0$ everywhere on $\intcc{a}{b}$ .

**Proof.** (1)–(3) pass from [step functions](#def-b1-integration-step) to the limit through the sup/inf definition. Linearity deserves the details once: given $\varepsilon > 0$, frame $\varphi_f \leq f \leq \psi_f$ and $\varphi_g \leq g \leq \psi_g$ with gaps $\leq \varepsilon$ ([Theorem 15.3](#thm-b1-integration-approx)). For $\lambda \geq 0$, $\varphi_f + \lambda\varphi_g \leq f + \lambda g \leq \psi_f +
\lambda\psi_g$ is a framing by [step functions](#def-b1-integration-step) with gap $\leq
(1 + \lambda)\varepsilon$, and its step [integrals](#thm-b1-integration-def) equal $\int
\varphi_f + \lambda\int\varphi_g$ etc. ([Proposition 15.2](#prop-b1-integration-stepprops)): letting $\varepsilon \to
0$ squeezes $\int(f + \lambda g)$ onto $\int f + \lambda\int g$. For $\lambda < 0$, multiplying by $\lambda$ *reverses* the framing of $g$ — the lower [step function](#def-b1-integration-step) of $\lambda g$ is $\lambda \psi_g$ — and the same squeeze runs with the roles swapped. The bound $\abs{\int f} \leq \int \abs f$ comes from $-\abs f \leq f \leq \abs f$ and monotonicity.

(4) Contrapositive: if $f(x_0) = m > 0$, [continuity](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) provides a subinterval of length $\eta > 0$ on which $f \geq \frac m2$; the [step function](#def-b1-integration-step) worth $\frac m2$ there and $0$ elsewhere is $\leq f$, so $\int f \geq \frac{m\eta}{2} > 0$. ∎

**Example 15.8 (Chasles at work: integrals with absolute values).**

To integrate an absolute value, cut where the sign changes.

$$
\int_0^2 \abs{x - 1}\,\dd x
= \int_0^1 (1 - x)\,\dd x + \int_1^2 (x - 1)\,\dd x
= \frac12 + \frac12 = 1 ,
$$

and, cutting $\intcc{0}{2\pi}$ at $\pi$:

$$
\int_0^{2\pi} \abs{\sin t}\,\dd t
= \int_0^{\pi} \sin t\,\dd t - \int_{\pi}^{2\pi} \sin t\,\dd t
= 2 + 2 = 4 ,
$$

while $\int_0^{2\pi} \sin t\,\dd t = 0$: cancellation is real, and this is why the strict positivity [statement](https://one-course.com/books/math/3/en/chapter/1-logic-sets-and-maps#def-b1-logic-statement) ([Theorem 15.7](#thm-b1-integration-props) (4)) carries the hypothesis $f
\geq 0$ — without it, a vanishing [integral](#thm-b1-integration-def) proves nothing about $f$. The closing insight: $\int \abs f$ measures *area*, $\int f$ measures *signed balance*; the inequality $\abs{\int f} \leq \int\abs f$ is the exact record of what cancellation can destroy.

## 15.3 The fundamental theorem of calculus

**Theorem 15.9 (Fundamental theorem of calculus).**

Let $f$ be [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on an [interval](https://one-course.com/books/math/3/en/chapter/10-real-numbers#prop-b1-reals-intervals) $I$ and $a \in I$. The function

$$
F(x) = \int_a^x f(t)\, \dd t
$$

is of class $C^1$ on $I$, with $F' = f$: every [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) function on an [interval](https://one-course.com/books/math/3/en/chapter/10-real-numbers#prop-b1-reals-intervals) has primitives. Consequently, for *any* primitive $G$ of $f$:

$$
\int_a^b f(t)\,\dd t = G(b) - G(a) .
$$

**Proof.** Fix $x_0 \in I$ and $\varepsilon > 0$; [continuity](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) at $x_0$ provides $\delta$ with $\abs{f(t) - f(x_0)} \leq \varepsilon$ for $\abs{t -
x_0} \leq \delta$. For $0 < \abs{h} \leq \delta$ (and $x_0 + h \in
I$), Chasles gives

$$
\frac{F(x_0 + h) - F(x_0)}{h} - f(x_0)
= \frac 1h \int_{x_0}^{x_0+h} \bigl(f(t) - f(x_0)\bigr)\dd t ,
$$

whose absolute value is $\leq \frac{1}{\abs h}\cdot \abs h\,
\varepsilon = \varepsilon$ (bound (2), valid for either order of the bounds). So $F'(x_0) = f(x_0)$; $F' = f$ is [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous): $F$ is $C^1$. If $G' = f$ too, then $(G - F)' = 0$ on the [interval](https://one-course.com/books/math/3/en/chapter/10-real-numbers#prop-b1-reals-intervals), so $G =
F + c$ ([Corollary 14.12](https://one-course.com/books/math/3/en/chapter/14-differentiation#cor-b1-derivative-monotone)), and $G(b) - G(a) = F(b)
- F(a) = \int_a^b f$. ∎

**Example 15.10 (Symmetry before computation).**

On a symmetric [interval](https://one-course.com/books/math/3/en/chapter/10-real-numbers#prop-b1-reals-intervals), parity does the work: if $f$ is odd, the substitution $t \mapsto -t$ sends $\int_{-a}^{0} f$ to $-\int_0^a f$, so

$$
\int_{-a}^{a} f(t)\,\dd t = 0 ;
\qquad\text{if $f$ is even,}\quad
\int_{-a}^{a} f = 2\int_0^a f .
$$

Thus $\int_{-1}^{1} \frac{t^3\cos t}{1 + t^4}\,\dd t = 0$ with no primitive in sight (the integrand is odd), and $\int_{-\pi}^{\pi} t^2\cos t\,\dd t = 2\int_0^\pi t^2\cos t\,
\dd t$. Check symmetry before reaching for techniques: the fastest [integral](#thm-b1-integration-def) is the one never computed.

**Example 15.11 (Recognizing a derivative on sight).**

Compute $\displaystyle\int_0^{\pi/2} \frac{\dd x}{1 + \cos x}$. The half-angle identity $1 + \cos x = 2\cos^2\frac x2$ turns the integrand into $\frac{1}{2}\bigl(1 + \tan^2\frac
x2\bigr)$, which is exactly the [derivative](https://one-course.com/books/math/3/en/chapter/14-differentiation#def-b1-derivative-def) of $\tan\frac x2$:

$$
\int_0^{\pi/2} \frac{\dd x}{1 + \cos x}
= \Bigl[\tan\frac x2\Bigr]_0^{\pi/2} = \tan\frac\pi4 = 1 .
$$

No substitution machinery was needed — only the reflex of reading an integrand as somebody’s [derivative](https://one-course.com/books/math/3/en/chapter/14-differentiation#def-b1-derivative-def), the fundamental theorem doing the rest. (The systematic tool behind such trigonometric [integrals](#thm-b1-integration-def), the substitution $t = \tan\frac x2$, belongs to the standard toolkit built from [Theorem 15.15](#thm-b1-integration-parts) (2).)

**Example 15.12 (Functions defined by integrals).**

The fundamental theorem manufactures functions. Let

$$
F(x) = \int_0^x \eu^{-t^2}\,\dd t .
$$

No combination of classical functions has [derivative](https://one-course.com/books/math/3/en/chapter/14-differentiation#def-b1-derivative-def) $\eu^{-t^2}$ (a theorem of Liouville, admitted); yet $F$ exists, is $C^1$ with $F'(x) = \eu^{-x^2} > 0$, strictly increasing, odd (substitute $t \mapsto -t$), and bounded: for $x \geq 1$,

$$
F(x) - F(1) = \int_1^x \eu^{-t^2}\dd t
\leq \int_1^x \eu^{-t}\dd t \leq \eu^{-1} ,
$$

so $F \leq F(1) + \eu^{-1} \leq 1 + \eu^{-1}$. (The exact limit, $\frac{\sqrt\pi}{2}$, is computed with double [integrals](#thm-b1-integration-def) in the Year 3 volume.) Chain rule for moving bounds: $\frac{\dd}{\dd
x}\int_x^{x^2} \eu^{-t^2}\dd t = 2x\,\eu^{-x^4} - \eu^{-x^2}$. The closing insight: integration *creates* new functions from old ones, with all their properties readable from the integrand — the primitive you cannot write down is still a function you fully control.

**Example 15.13 (Estimating without evaluating).**

The [integrals](#thm-b1-integration-def) $R_n = \int_0^1 \frac{t^n}{1 + t}\,\dd t$ have no pleasant closed form, yet monotonicity pins them precisely: on $\intcc{0}{1}$, $\frac12 \leq \frac{1}{1+t} \leq 1$, so

$$
\frac{1}{2(n+1)} = \frac12\int_0^1 t^n\,\dd t
\;\leq\; R_n \;\leq\; \int_0^1 t^n \,\dd t = \frac{1}{n+1} :
$$

the exact order of decay ($R_n \sim$ a multiple of $\frac1n$, in fact $R_n \sim \frac{1}{2n}$) with two lines and no antiderivative. The weekend problems of this chapter and the next run on exactly such framings — the analyst’s first instinct before an [integral](#thm-b1-integration-def) should be *bound it*, and only then, if needed, compute it.

**Example 15.14 (Average values).**

The *mean* of a [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) $f$ over $\intcc{a}{b}$ is $\frac{1}{b-a}\int_a^b f$. For the arch of the sine:

$$
\frac{1}{\pi}\int_0^\pi \sin t\,\dd t
= \frac{1}{\pi}\bigl[-\cos t\bigr]_0^\pi = \frac{2}{\pi}
\approx 0.637 :
$$

a full positive arch averages not to $\frac12$ but to $\frac2\pi$ — the curve spends more time high than a triangle would. By [Exercise 15.11](#exo-b1-integration-11) (mean value theorem for [integrals](#thm-b1-integration-def), $g = 1$), the mean is a *value*: $\sin c =
\frac2\pi$ for some $c \in \intoo{0}{\pi}$. And by the [Riemann sums](#thm-b1-integration-riemann) of this chapter, the mean is the limit of ordinary averages of $n$ samples — the bridge between the discrete mean of data and the [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) mean of a signal, which is how the [integral](#thm-b1-integration-def) enters physics.

**Theorem 15.15 (Integration by parts; substitution).**

1. If $u, v$ are $C^1$ on $\intcc{a}{b}$: $$\int_a^b u'v = \bigl[uv\bigr]_a^b - \int_a^b uv' .$$
2. If $\varphi$ is $C^1$ on $\intcc{\alpha}{\beta}$ and $f$ [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\varphi(\intcc{\alpha}{\beta})$: $$\int_{\alpha}^{\beta} f\bigl(\varphi(t)\bigr)\,\varphi'(t)\,  \dd t = \int_{\varphi(\alpha)}^{\varphi(\beta)} f(x)\, \dd x .$$

**Proof.** (1) $(uv)' = u'v + uv'$; integrate over $\intcc{a}{b}$ and apply the fundamental theorem to the $C^1$ function $uv$.

(2) Let $F$ be a primitive of $f$ on the image [interval](https://one-course.com/books/math/3/en/chapter/10-real-numbers#prop-b1-reals-intervals) ([Theorem 15.9](#thm-b1-integration-ftc)). Then $(F \circ \varphi)' = (f
\circ \varphi)\,\varphi'$ (chain rule), so both sides equal $F(\varphi(\beta)) - F(\varphi(\alpha))$. ∎

**Example 15.16.**

$\int_0^1 t\,\eu^t \dd t = \bigl[t\,\eu^t\bigr]_0^1 - \int_0^1
\eu^t\dd t = \eu - (\eu - 1) = 1$. And with the substitution $x =
\sin t$ ($t \in \intcc{0}{\frac\pi2}$):

$$
\int_0^1 \sqrt{1 - x^2}\, \dd x
= \int_0^{\pi/2} \cos t \cdot \cos t \, \dd t
= \int_0^{\pi/2} \frac{1 + \cos 2t}{2}\, \dd t = \frac\pi4 ,
$$

— a quarter of the unit disk, as geometry demands. (Linearization from [Method 3.11](https://one-course.com/books/math/3/en/chapter/3-complex-numbers#met-b1-complex-trig) at work.)

**Remark 15.17 (Common pitfalls in integral calculus).**

(i) *Substitutions must be $C^1$ on the whole [interval](https://one-course.com/books/math/3/en/chapter/10-real-numbers#prop-b1-reals-intervals)*: the change $x = \frac1t$ is illegal across $0$; applied blindly to $\int_{-1}^{1}\frac{\dd x}{1 + x^2}$ it “proves” that the [integral](#thm-b1-integration-def) equals its own negative. When a substitution has a singularity, cut the [interval](https://one-course.com/books/math/3/en/chapter/10-real-numbers#prop-b1-reals-intervals) first (Chasles), substitute on each piece, and only then recombine. (ii) *Logarithmic primitives need absolute values*: $\int \frac{\dd x}{x - 2} =
\ln\abs{x - 2} + C$ on each side of $2$ separately — writing $\ln(x - 2)$ on $\intoo{0}{1}$ is writing the logarithm of a negative number; and the constant $C$ may differ on the two sides of the singularity. (iii) *A vanishing [integral](#thm-b1-integration-def) does not kill the function*: $\int_0^{2\pi}\sin = 0$; positivity of the integrand is required before concluding $f = 0$ ([Example 15.8](#ex-b1-integration-chasleswork)). (iv) *[Riemann sums](#thm-b1-integration-riemann) must be calibrated*: in $\frac{b-a}{n}\sum f\bigl(a +
k\frac{b-a}{n}\bigr)$, the step outside and the points inside must match the same subdivision — the frequent error is a sum $\sum_{k=1}^{n} f\bigl(\frac kn\bigr)$ *without* the factor $\frac1n$, which diverges instead of converging to $\int_0^1
f$. Checklist before invoking [Theorem 15.20](#thm-b1-integration-riemann): factor out $\frac1n$, rewrite the summand as $f$ of $\frac kn$, name $f$ and check its [continuity](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous).

**Example 15.18 (Guess, differentiate, adjust).**

What is $\int_1^x (\ln t)^2\,\dd t$? Guess a primitive of the form $t\,P(\ln t)$ with $P$ [polynomial](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def) and differentiate:

$$
\bigl(t\,P(\ln t)\bigr)' = P(\ln t) + P'(\ln t) .
$$

We need $P(u) + P'(u) = u^2$: take $P(u) = u^2 - 2u + 2$ (matching coefficients downward from $u^2$). Hence

$$
\int_1^x (\ln t)^2\,\dd t
= \bigl[t\bigl((\ln t)^2 - 2\ln t + 2\bigr)\bigr]_1^x
= x(\ln x)^2 - 2x\ln x + 2x - 2 ,
$$

a result otherwise reached by two integrations by parts. The closing insight: for integrands of the form ([polynomial](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def) in $\ln t$) or ([polynomial](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def) times $\eu^{\lambda t}$), the primitive has the same shape — differentiating a shaped guess converts integration into linear algebra on coefficients, faster and less error-prone than iterated parts.

**Example 15.19 (The boomerang integral).**

Compute $I = \int_0^{\pi/2} \eu^x \cos x\,\dd x$. Integrate by parts twice, differentiating the trigonometric factor each time:

$$
I = \bigl[\eu^x \sin x\bigr]_0^{\pi/2}
- \int_0^{\pi/2} \eu^x \sin x\,\dd x
= \eu^{\pi/2} - J,
\qquad
J = \bigl[-\eu^x\cos x\bigr]_0^{\pi/2}
+ \int_0^{\pi/2} \eu^x\cos x\,\dd x = 1 + I .
$$

The [integral](#thm-b1-integration-def) has returned to itself: $I = \eu^{\pi/2} - 1 - I$, whence

$$
I = \frac{\eu^{\pi/2} - 1}{2} .
$$

The closing insight: when the integrand is a product of two functions that reproduce themselves under differentiation ($\eu^{ax}$, $\cos bx$, $\sin bx$), two integrations by parts produce a linear equation for the unknown [integral](#thm-b1-integration-def) — solve it instead of integrating; equivalently, pass through $\eu^{(a + \iu b)x}$ ([Chapter 3](https://one-course.com/books/math/3/en/chapter/3-complex-numbers#ch-b1-complex)) and take real parts. Both roads give the same answer, and checking that they do is a free sanity test.

## 15.4 Riemann sums

**Theorem 15.20 (Riemann sums).**

Let $f$ be [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\intcc{a}{b}$. Then

$$
S_n = \frac{b - a}{n} \sum_{k=0}^{n-1}
f\Bigl(a + k\,\frac{b-a}{n}\Bigr)
\xrightarrow[n \to \infty]{} \int_a^b f(t)\, \dd t ,
$$

and likewise with any evaluation points inside the subintervals.

**Proof.** $S_n$ is the [integral](#thm-b1-integration-def) of the [step function](#def-b1-integration-step) $\varphi_n$ equal to $f(a + k\frac{b-a}{n})$ on the $k$-th subinterval. Given $\varepsilon > 0$, [uniform continuity](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-uniform) (Heine) provides $\delta$; for $n > \frac{b-a}{\delta}$, every point of a subinterval is within $\delta$ of its evaluation point, so $\abs{f - \varphi_n} \leq
\varepsilon$ on $\intcc{a}{b}$, whence

$$
\Bigl| \int_a^b f - S_n \Bigr|
= \Bigl| \int_a^b (f - \varphi_n) \Bigr|
\leq (b-a)\,\varepsilon . \qedhere
$$

∎

![A left Riemann sum with n = 8 rectangles: as the mesh shrinks, uniform continuity forces the staircase area toward ∈t_ab f.](https://one-course.com/images/onecourse/chapters/math-3/b1-integration/fig-3ce085fec6e3.svg)

*A left Riemann sum with $n = 8$ rectangles: as the mesh shrinks, [uniform continuity](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-uniform) forces the staircase area toward $\int_a^b f$.*

**Example 15.21.**

$\displaystyle\sum_{k=1}^{n} \frac{1}{n + k} = \frac 1n
\sum_{k=1}^{n} \frac{1}{1 + k/n} \xrightarrow[n\to\infty]{}
\int_0^1 \frac{\dd x}{1 + x} = \ln 2$: a limit invisible to elementary bounds, transparent as a Riemann sum.

**Example 15.22 (A second Riemann sum, with calibration).**

Find $\lim_{n\to\infty} \sum_{k=1}^{n} \dfrac{n}{(n+k)^2}$. Calibrate:

$$
\sum_{k=1}^{n} \frac{n}{(n+k)^2}
= \frac{1}{n}\sum_{k=1}^{n} \frac{n^2}{(n+k)^2}
= \frac1n \sum_{k=1}^{n} \frac{1}{\bigl(1 + \frac kn\bigr)^2} ,
$$

a Riemann sum of the [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) $f(x) = \frac{1}{(1+x)^2}$ on $\intcc{0}{1}$: the limit is

$$
\int_0^1 \frac{\dd x}{(1 + x)^2}
= \Bigl[-\frac{1}{1+x}\Bigr]_0^1 = \frac12 .
$$

The closing insight: the whole art is the middle line — force the summand into the shape $f(\frac kn)$ at the cost of extracting exactly one factor $\frac1n$; once the shape is right, the theorem does the analysis and the fundamental theorem does the arithmetic.

**Remark 15.23 (Where the integral works next).**

The chapter’s constructions each have a sequel. [Riemann sums](#thm-b1-integration-riemann) return in [Chapter 17](https://one-course.com/books/math/3/en/chapter/17-numerical-series#ch-b1-series) as the bridge between series and [integrals](#thm-b1-integration-def) (comparison of $\sum \frac{1}{n^\alpha}$ with $\int
\frac{\dd t}{t^\alpha}$); the [integral](#thm-b1-integration-def) remainder is the sharpest form of Taylor’s formula in [Chapter 16](https://one-course.com/books/math/3/en/chapter/16-taylor-formulas-and-asymptotic-expansions#ch-b1-taylor); the $\sup$-based definition is the prototype for the Lebesgue [integral](#thm-b1-integration-def) of the Year 3 volume, where the same three properties (linearity, monotonicity, a convergence theorem) are rebuilt on a far larger class of functions. And the weekend problem below turns [integration by parts](#thm-b1-integration-parts) into arithmetic: the irrationality of $\pi^2$.

## 15.5 Exercises

**Exercise 15.1 ★.**

Compute: $\displaystyle\int_0^1 \frac{\dd x}{x^2 - 4}$ *(partial fractions, [Chapter 9](https://one-course.com/books/math/3/en/chapter/9-rational-fractions#ch-b1-fractions))*; $\displaystyle\int_1^{\eu} \ln t \,\dd t$; $\displaystyle\int_0^{\pi} t \sin t\, \dd t$.

**Solution of Exercise 15.1.**

$\dfrac{1}{x^2-4} = \dfrac{1/4}{x - 2} - \dfrac{1/4}{x+2}$ (cover-up), so

$$
\int_0^1 \frac{\dd x}{x^2 - 4}
= \frac14\Bigl[\ln\abs{x-2} - \ln\abs{x+2}\Bigr]_0^1
= \frac14\Bigl(\ln\frac{1}{3} - \ln 1\Bigr) = -\frac{\ln 3}{4}.
$$

By parts ($u' = 1$, $v = \ln t$): $\int_1^{\eu} \ln t\,\dd t =
\bigl[t\ln t\bigr]_1^{\eu} - \int_1^{\eu} \dd t = \eu - (\eu - 1) =
1$.

By parts ($u' = \sin t$, $v = t$): $\int_0^\pi t\sin t\,\dd t =
\bigl[-t\cos t\bigr]_0^\pi + \int_0^\pi \cos t\,\dd t = \pi + 0 =
\pi$.

**Exercise 15.2 ★.**

Compute $\displaystyle\int_0^{1} \frac{t}{(t^2+1)^2}\,\dd t$ (substitution) and $\displaystyle\int_0^{\pi/2} \cos^3 t\, \dd t$ (write $\cos^3 =
\cos(1 - \sin^2)$).

**Solution of Exercise 15.2.**

Substitution $u = t^2 + 1$, $\dd u = 2t\,\dd t$:

$$
\int_0^1 \frac{t\,\dd t}{(t^2+1)^2}
= \frac12 \int_1^2 \frac{\dd u}{u^2}
= \frac12\Bigl[-\frac1u\Bigr]_1^2 = \frac14 .
$$

With $u = \sin t$: $\int_0^{\pi/2} \cos^3 t\,\dd t = \int_0^{\pi/2}
(1 - \sin^2 t)\cos t\,\dd t = \bigl[\sin t - \frac{\sin^3
t}{3}\bigr]_0^{\pi/2} = 1 - \frac13 = \frac23$.

**Exercise 15.3 ★.**

Find the limits, as [Riemann sums](#thm-b1-integration-riemann):

$$
u_n = \sum_{k=1}^{n} \frac{n}{n^2 + k^2},
\qquad
v_n = \frac{1}{n}\sqrt[n]{\frac{(2n)!}{n!\,n^n}}
\ \emph{(take logarithms)}.
$$

**Solution of Exercise 15.3.**

$u_n = \dfrac1n \sum_{k=1}^{n} \dfrac{1}{1 + (k/n)^2}$: a Riemann sum of $x \mapsto \frac{1}{1+x^2}$ on $\intcc{0}{1}$, so $u_n \to
\int_0^1 \frac{\dd x}{1+x^2} = \arctan 1 = \dfrac\pi4$.

$\ln v_n = \dfrac1n \sum_{k=1}^{n} \ln\dfrac{n+k}{n} = \dfrac 1n
\sum_{k=1}^n \ln\Bigl(1 + \dfrac kn\Bigr) \to \int_0^1 \ln(1+x)\,\dd
x = \bigl[(1+x)\ln(1+x) - x\bigr]_0^1 = 2\ln 2 - 1$. Hence $v_n \to
\eu^{2\ln 2 - 1} = \dfrac 4\eu$. (Check of the identification: $\frac{(2n)!}{n!\,n^n} = \prod_{k=1}^{n} \frac{n+k}{n}$.)

**Exercise 15.4 ★.**

Let $f$ be [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\intcc{0}{1}$. Compute $\lim_{n\to\infty}
\int_0^1 x^n f(x)\,\dd x$. *(Cut $\intcc{0}{1}$ at $1 -
\delta$.)*

**Solution of Exercise 15.4.**

The limit is $0$. Let $M = \sup \abs f$ and $\varepsilon \in
\intoo{0}{1}$. Cut at $1 - \varepsilon$:

$$
\Bigl| \int_0^1 x^n f \Bigr|
\leq \int_0^{1 - \varepsilon} x^n \abs f + \int_{1-\varepsilon}^1
x^n \abs f
\leq M\,(1-\varepsilon)^n + M\varepsilon .
$$

Since $(1 - \varepsilon)^n \to 0$ ([Exercise 11.3](https://one-course.com/books/math/3/en/chapter/11-sequences#exo-b1-seq-3)), the limsup of the left side is $\leq M\varepsilon$ for every $\varepsilon$: the [integral](#thm-b1-integration-def) tends to $0$.

**Exercise 15.5 ★★.**

(Cauchy–Schwarz) For $f, g$ [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\intcc{a}{b}$, prove

$$
\Bigl(\int_a^b fg\Bigr)^{\!2} \leq \int_a^b f^2 \cdot \int_a^b g^2 ,
$$

by expanding $\int_a^b (f + \lambda g)^2 \geq 0$ as a quadratic in $\lambda$. When is it an equality?

**Solution of Exercise 15.5.**

$Q(\lambda) = \int_a^b (f + \lambda g)^2 = \int f^2 + 2\lambda \int
fg + \lambda^2 \int g^2 \geq 0$ for all $\lambda$. If $\int g^2 =
0$, then $g = 0$ (strict positivity, [Theorem 15.7](#thm-b1-integration-props) (4)) and the inequality is $0 \leq
0$. Otherwise $Q$ is a genuine quadratic, everywhere $\geq 0$: its discriminant is $\leq 0$, i.e. $\bigl(\int fg\bigr)^2 \leq \int
f^2 \int g^2$.

Equality iff the discriminant vanishes iff $Q(\lambda_0) = 0$ for some $\lambda_0$, i.e. $\int (f + \lambda_0 g)^2 = 0$, i.e. (strict positivity again) $f = -\lambda_0 g$: equality holds exactly when $f$ and $g$ are proportional.

**Exercise 15.6 ★★.**

Let $f$ be [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\R$, $T$-periodic. Prove that $\int_a^{a+T}
f$ does not depend on $a$, and that $\frac1x \int_0^x f(t)\,\dd t
\to \frac 1T \int_0^T f$ as $x \to +\infty$.

**Solution of Exercise 15.6.**

Let $\Phi(a) = \int_a^{a+T} f$. By the fundamental theorem ([Theorem 15.9](#thm-b1-integration-ftc)), $\Phi$ is [differentiable](https://one-course.com/books/math/3/en/chapter/14-differentiation#def-b1-derivative-def) with $\Phi'(a) = f(a + T) - f(a) = 0$: constant.

For $x > 0$, write $x = nT + r$, $0 \leq r < T$ ($n = \lfloor x/T
\rfloor$). Chasles:

$$
\int_0^x f = n \int_0^T f + \int_{nT}^{nT + r} f,
\qquad
\Bigl| \int_{nT}^{nT+r} f \Bigr| \leq T \sup_{\intcc{0}{T}} \abs f
= C .
$$

Then $\frac 1x \int_0^x f = \frac{nT}{x}\cdot\frac 1T \int_0^T f +
O\bigl(\frac 1x\bigr)$, and $\frac{nT}{x} \to 1$: the limit is $\frac1T \int_0^T f$.

**Exercise 15.7 ★★.**

For $f$ [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\intcc{0}{1}$ with $\int_0^1 f = \frac12$, prove that $f$ has a fixed point in $\intcc{0}{1}$. *(Integrate $f(x) - x$ and use strict positivity, [Theorem 15.7](#thm-b1-integration-props) (4), through its contrapositive combined with the intermediate value theorem.)*

**Solution of Exercise 15.7.**

Let $g(x) = f(x) - x$: [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous), with

$$
\int_0^1 g = \int_0^1 f - \frac12 = 0 .
$$

If $g$ never vanished, the intermediate value theorem would force a constant sign (a [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) function on an [interval](https://one-course.com/books/math/3/en/chapter/10-real-numbers#prop-b1-reals-intervals) taking both signs vanishes); say $g > 0$. Then, by strict positivity ([Theorem 15.7](#thm-b1-integration-props) (4) applied to $g > 0$, giving $\int g > 0$): contradiction with $\int g = 0$. So $g(c) = 0$ for some $c$: $f(c) = c$.

**Exercise 15.8 ★★★.**

(Wallis [integrals](#thm-b1-integration-def)) Let $W_n = \int_0^{\pi/2} \sin^n t\,\dd t$.

1. Prove the recurrence $n W_n = (n-1) W_{n-2}$ ( $n \geq 2$ ) by parts, and compute $W_0, W_1$ , then $W_{2p}$ and $W_{2p+1}$ in closed form.
2. Prove that $(W_n)$ is decreasing with $\frac{W_{n+1}}{W_n}  \to 1$ ; prove that the quantity $(n+1)\,W_{n+1} W_n$ is constant, equal to $\frac\pi2$ ; and deduce the equivalent $W_n \sim \sqrt{\dfrac{\pi}{2n}}$ .

**Solution of Exercise 15.8.**

1. By parts with $u' = \sin t$, $v = \sin^{n-1} t$: $$W_n = \bigl[-\cos t\sin^{n-1}t\bigr]_0^{\pi/2}  + (n-1)\int_0^{\pi/2} \cos^2 t\,\sin^{n-2} t\,\dd t  = (n-1)(W_{n-2} - W_n),$$ so $nW_n = (n-1)W_{n-2}$. From $W_0 = \frac\pi2$, $W_1 = 1$: $$W_{2p} = \frac{(2p-1)(2p-3)\cdots 1}{(2p)(2p-2)\cdots 2}\,  \frac{\pi}{2} = \frac{(2p)!}{4^p (p!)^2}\,\frac\pi2,  \qquad  W_{2p+1} = \frac{(2p)(2p-2)\cdots 2}{(2p+1)(2p-1)\cdots 3}  = \frac{4^p (p!)^2}{(2p+1)!} .$$
2. On $\intoo{0}{\frac\pi2}$, $0 < \sin t < 1$, so $\sin^{n+1} <  \sin^n$ and $(W_n)$ is (strictly) decreasing, positive. Sandwiching with the recurrence: $$\frac{n}{n+1} = \frac{W_{n+1}}{W_{n-1}}  \leq \frac{W_{n+1}}{W_n} \leq 1  \quad\implies\quad \frac{W_{n+1}}{W_n} \to 1 .$$ Invariant: $a_n = (n+1)W_{n+1}W_n$ satisfies $a_n = a_{n-1}$ by the recurrence $(n+1)W_{n+1} = nW_{n-1}$, so $a_n = a_0 =  1 \cdot W_1 W_0 = \frac\pi2$. Then $$n W_n^2 \sim (n+1) W_{n+1} W_n = \frac\pi2  \quad\implies\quad  W_n \sim \sqrt{\frac{\pi}{2n}} .$$

**Exercise 15.9 ★★★.**

(Niven: $\pi$ is irrational) Suppose $\pi = \frac ab$ with $a, b \in
\N^*$, and [set](https://one-course.com/books/math/3/en/chapter/1-logic-sets-and-maps#def-b1-logic-sets), for $n$ to be chosen,

$$
P(x) = \frac{x^n (a - bx)^n}{n!},
\qquad
I_n = \int_0^{\pi} P(x)\sin x\, \dd x .
$$

1. Prove that $0 < I_n \leq \pi\,\frac{(\pi a)^n}{n!}$ , which is $< 1$ for $n$ large.
2. Prove that $P$ and all its [derivatives](https://one-course.com/books/math/3/en/chapter/14-differentiation#def-b1-derivative-def) take *integer* values at $0$ and at $\pi = \frac ab$ . *(Binomial expansion: the coefficients of $P$ times $k!$ are integers for $k \geq n$; and $P(\pi - x) = P(x)$.)*
3. Set $Q = P - P'' + P^{(4)} - \dots$ (a finite sum). Check that $\bigl(Q'\sin x - Q\cos x\bigr)' = P \sin x$ , and deduce that $I_n = Q(\pi) + Q(0)$ is an integer.
4. Conclude.

**Solution of Exercise 15.9.**

1. On $\intoo{0}{\pi}$ : $x > 0$ , $a - bx = b(\frac ab - x) =  b(\pi - x) > 0$ and $\sin x > 0$ , so the integrand is $> 0$ and $I_n > 0$ (strict positivity). Bound: on $\intcc{0}{\pi}$ , $x \leq \pi$ and $a - bx \leq a$ , so $P  \leq \frac{\pi^n a^n}{n!}$ and $I_n \leq  \pi\,\frac{(\pi a)^n}{n!}$ , which tends to $0$ (the factorial beats the geometric term: it is the general term of the convergent exponential series, cf. [Example 11.12](https://one-course.com/books/math/3/en/chapter/11-sequences#ex-b1-seq-e) ); in particular $I_n < 1$ for large $n$ .
2. Expand $x^n(a - bx)^n = \sum_{j=0}^{n} \binom nj a^{n-j}  (-b)^j x^{n+j}$ : so $P = \frac{1}{n!}\sum_j c_j x^{n+j}$ with integer $c_j$ . Then $P^{(k)}(0) = 0$ for $k < n$ (valuation) and, for $n \leq k \leq 2n$ , $P^{(k)}(0) =  \frac{k!}{n!} c_{k-n}$ , an integer since $n! \mid k!$ . Moreover $P(\pi - x) = P(x)$ (substitute: $\pi - x$ swaps the factors, using $a - b(\pi - x) = bx$ ), so $P^{(k)}(\pi)  = \pm P^{(k)}(0)$ : integers as well.
3. With $Q = P - P'' + P^{(4)} - \dots$ (finite: $P$ has degree $2n$): $Q + Q'' = P$, and $$\bigl(Q'\sin x - Q\cos x\bigr)' = (Q + Q'')\sin x = P\sin x .$$ Hence $I_n = \bigl[Q'\sin x - Q\cos x\bigr]_0^{\pi} = Q(\pi)  + Q(0)$, a sum of values $P^{(2k)}$ at $0$ and $\pi$: an integer by (2).
4. For $n$ large, $I_n$ is an integer with $0 < I_n < 1$ : impossible. The assumption $\pi = \frac ab$ fails: $\pi$ is irrational.

**Exercise 15.10 ★★★.**

Let $f$ be $C^1$ on $\intcc{a}{b}$. Prove the Riemann–Lebesgue-type limit

$$
\int_a^b f(t)\sin(\lambda t)\,\dd t \xrightarrow[\lambda \to
+\infty]{} 0
$$

by integrating by parts. Then prove it again for $f$ merely [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous), by uniform approximation with [step functions](#def-b1-integration-step) ([Theorem 15.3](#thm-b1-integration-approx)).

**Solution of Exercise 15.10.**

$C^1$ case: by parts,

$$
\int_a^b f(t)\sin\lambda t\,\dd t
= \Bigl[-f(t)\frac{\cos\lambda t}{\lambda}\Bigr]_a^b
+ \frac{1}{\lambda}\int_a^b f'(t)\cos\lambda t\,\dd t,
$$

bounded in absolute value by $\frac{2\sup\abs f + (b - a)\sup\abs{f'}}
{\lambda} \to 0$.

[Continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) case: let $\varepsilon > 0$ and pick a [step function](#def-b1-integration-step) $\varphi$ with $\abs{f - \varphi} \leq \varepsilon$ ([Theorem 15.3](#thm-b1-integration-approx) provides $\varphi \leq f \leq
\psi$ with gap $\leq\varepsilon$; take $\varphi$). Then

$$
\Bigl|\int_a^b f\sin\lambda t\Bigr|
\leq \int_a^b \abs{f - \varphi}
+ \Bigl|\int_a^b \varphi \sin\lambda t\Bigr|
\leq (b-a)\varepsilon
+ \sum_i \abs{c_i}\,\Bigl|\int_{x_{i-1}}^{x_i} \sin\lambda t\,\dd
t\Bigr| ,
$$

and each $\bigl|\int \sin \lambda t\bigr| = \bigl|\frac{\cos\lambda
x_{i-1} - \cos\lambda x_i}{\lambda}\bigr| \leq \frac{2}{\lambda}$: the second term tends to $0$. Hence the limsup is $\leq
(b-a)\varepsilon$ for every $\varepsilon$: the limit is $0$.

**Exercise 15.11 ★★.**

(Mean value theorem for [integrals](#thm-b1-integration-def)) Let $f, g$ be [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\intcc{a}{b}$ with $g \geq 0$. Prove that there exists $c \in
\intcc{a}{b}$ with

$$
\int_a^b f(t)\,g(t)\,\dd t = f(c)\int_a^b g(t)\,\dd t ,
$$

and show by an example that the hypothesis $g \geq 0$ cannot be dropped.

**Solution of Exercise 15.11.**

Let $m = \min f$ and $M = \max f$, attained by the extreme value theorem. Since $g \geq 0$: $m\,g \leq fg \leq M\,g$, so by monotonicity

$$
m \int_a^b g \;\leq\; \int_a^b fg \;\leq\; M \int_a^b g .
$$

If $\int_a^b g = 0$: strict positivity ([Theorem 15.7](#thm-b1-integration-props) (4)) forces $g \equiv 0$, both sides vanish, and any $c$ works. Otherwise $t = \frac{\int
fg}{\int g}$ lies in $\intcc{m}{M} = f(\intcc{a}{b})$ (Theorems [13.13](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#thm-b1-continuity-evt) and [13.10](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#thm-b1-continuity-ivt)), so $t =
f(c)$ for some $c$.

Sign matters: on $\intcc{-1}{1}$ with $f(t) = g(t) = t$: $\int
fg = \int_{-1}^1 t^2 = \frac23$, while $f(c)\int_{-1}^1 t\,\dd t
= 0$ for every $c$.

**Exercise 15.12 ★★★.**

(Moments force zeros) Let $f$ be [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) on $\intcc{a}{b}$ with

$$
\int_a^b f(t)\,t^k\,\dd t = 0 \qquad \text{for } k = 0, 1,
\dots, n .
$$

Prove that $f$ vanishes at $n + 1$ distinct points of $\intoo{a}{b}$. *(If $f$ changes sign only at $z_1 < \dots
< z_m$ with $m \leq n$, integrate $f$ against $P(t) = (t - z_1)
\cdots (t - z_m)$ and use strict positivity.)*

**Solution of Exercise 15.12.**

If $f \equiv 0$ the claim is vacuous (every point is a zero). So assume $f \not\equiv 0$ and suppose it has at most $n$ distinct zeros in $\intoo{a}{b}$; let $z_1 < \dots < z_m$ ($m \leq n$) be those zeros where $f$ *changes sign* (possibly none). Set $P(t) = \prod_{i=1}^{m}(t - z_i)$ (empty product $= 1$), of degree $m \leq n$. On each subinterval cut by the $z_i$, both $f$ and $P$ have constant sign, and both flip sign when crossing some $z_i$: the product $fP$ has one constant sign on all of $\intoo{a}{b}$. Being [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous), not identically zero, of constant sign, it has $\bigl|\int_a^b fP\bigr| > 0$ (strict positivity applied to $\abs{fP}$). But $\int f P$ is a linear combination of the moments $\int f\,t^k$, $k \leq n$, all zero: contradiction. Hence $f$ has at least $n + 1$ distinct zeros in $\intoo{a}{b}$.

**Remark 15.24 (Perspectives inside this volume).**

Three chapters ahead lean directly on this one. [Chapter 16](https://one-course.com/books/math/3/en/chapter/16-taylor-formulas-and-asymptotic-expansions#ch-b1-taylor) carries the [integral](#thm-b1-integration-def) remainder — the sharpest of the three Taylor formulas is an [integration by parts](#thm-b1-integration-parts) iterated $n$ times. [Chapter 17](https://one-course.com/books/math/3/en/chapter/17-numerical-series#ch-b1-series) converts the framing of sums by [integrals](#thm-b1-integration-def) into the decisive test for $\sum n^{-\alpha}$, and its weekend problem refines that framing into Euler’s constant. [Chapter 24](https://one-course.com/books/math/3/en/chapter/24-plane-curves#ch-b1-curves) makes the [integral](#thm-b1-integration-def) geometric: the length of a parametrized arc is $\int \sqrt{x'(t)^2 +
y'(t)^2}\,\dd t$, an [integral](#thm-b1-integration-def) of a [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) function on a segment — precisely the object built here, no improper theory needed. The single most reused fact will be the humblest: $\bigl|\int f\bigr| \leq (b - a)\sup\abs{f}$, the inequality that turns every pointwise estimate into an [integral](#thm-b1-integration-def) estimate.

## 15.6 Problem: The integral irrationality machine

**Problem 15.1.**

Weekend problem — $\eu$ and $\pi^2$ are irrational, $\eu$ to six decimals, and $\frac{22}{7} > \pi$ with proof

One mechanism powers this whole problem: *an expression that must be a positive integer, yet is provably smaller than $1$, cannot exist*. [Exercise 15.9](#exo-b1-integration-9) (Niven) ran it once to prove $\pi \notin \Q$; here we industrialize it. The machine needs three parts: an *integrality* input (endpoint values of well-chosen [polynomials](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def)), a *smallness* input (a factor $\frac{1}{n!}$ crushing the [integral](#thm-b1-integration-def)), and a *bridge* ([integration by parts](#thm-b1-integration-parts)) connecting them. We prove that $\eu$ is irrational and compute it with certified error, prove Legendre’s sharper theorem that $\pi^2$ is irrational, and end with the most charming [integral](#thm-b1-integration-def) in analysis: $\int_0^1 \frac{x^4(1 -
x)^4}{1 + x^2}\dd x = \frac{22}{7} - \pi$, which brackets $\pi$ by hand.

**Part I — Fuel.**

1. Prove that $\dfrac{c^{\,n}}{n!} \to 0$ for every fixed $c  > 0$ *(beyond $n \geq 2c$, each step at least halves the term)* .
2. (Beta [integrals](#thm-b1-integration-def)) Prove, by induction on $m$ with [integration by parts](#thm-b1-integration-parts): $$\int_0^1 x^{\,k}\,(1 - x)^{\,m}\,\dd x =  \frac{k!\,m!}{(k + m + 1)!}  \qquad (k, m \in \N).$$
3. Deduce $\displaystyle\int_0^1 \bigl(x(1-x)\bigr)^n \dd x  = \frac{1}{(2n+1)\binom{2n}{n}}$ , and — comparing with the bound $x(1 - x) \leq \frac14$ — the estimate $\binom{2n}{n} \geq \dfrac{4^n}{2n+1}$ , matching $\binom{2n}{n}^{1/n} \to 4$ from [Problem 11.1](https://one-course.com/books/math/3/en/chapter/11-sequences#pb-b1-seq-1) .
4. Prove the smallness lemma used twice below: for every [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous) $g > 0$ on $\intoo{0}{1}$, $$0 < \int_0^1 \bigl(x(1-x)\bigr)^n g(x)\,\dd x  \leq \frac{\sup_{\intcc{0}{1}}\abs g}{4^{\,n}} .$$

**Part II — $\eu$: irrationality, then six decimals.** Set $A_n = \displaystyle\int_0^1 x^n \eu^x \dd x$.

5. Compute $A_0$ and $A_1$ , prove the recurrence $A_n = \eu  - n A_{n-1}$ , and the bounds $0 < A_n \leq  \dfrac{\eu}{n+1}$ .
6. Show by induction that $A_n = \alpha_n + \beta_n \eu$ with $\alpha_n, \beta_n \in \Z$ .
7. Deduce that $\eu$ is irrational *(if $\eu = \frac  pq$, then $q A_n$ is an integer trapped in $\intoo{0}{1}$ for $n$ large)* . Compare with the proof of [Exercise 11.9](https://one-course.com/books/math/3/en/chapter/11-sequences#exo-b1-seq-9) : same punchline, different fuel.
8. Prove, by induction and [integration by parts](#thm-b1-integration-parts), the exact remainder formula $$\eu = \sum_{k=0}^{n} \frac{1}{k!} + R_n,  \qquad  R_n = \frac{1}{n!}\int_0^1 (1 - t)^n\,\eu^{\,t}\,\dd t,  \qquad  \frac{1}{(n+1)!} \leq R_n \leq \frac{\eu}{(n+1)!} .$$
9. Take $n = 9$ : bound $R_9$ using $\eu < 2.75$ (from $b_2 = 2.75$ in [Example 11.12](https://one-course.com/books/math/3/en/chapter/11-sequences#ex-b1-seq-e) ), evaluate the sum, and conclude the certified bracketing $2.7182818 \leq  \eu \leq 2.7182823$ — six decimals, $\eu \approx  2.718282$ , with proof.

**Part III — Legendre’s theorem: $\pi^2$ is irrational.** Let $f(x) = \dfrac{x^n (1 - x)^n}{n!}$, and suppose $\pi^2 = \frac ab$ with $a, b \in \N^*$.

10. Show $f(1 - x) = f(x)$ and $0 < f \leq  \dfrac{1}{4^n\,n!}$ on $\intoo{0}{1}$ .
11. Show that $f^{(k)}(0)$ and $f^{(k)}(1)$ are integers for every $k \geq 0$ *(expand $x^n(1-x)^n$ with integer coefficients; $\frac{k!}{n!} \in \Z$ for $k \geq n$; then use the symmetry)* .
12. Define $$G = b^{\,n} \sum_{k=0}^{n} (-1)^k\,  \pi^{2n - 2k} f^{(2k)} .$$ Show that $G(0)$ and $G(1)$ are integers *(each $b^n \pi^{2n-2k} = a^{\,n-k}\,b^{\,k}$)*.
13. Verify the telescoping $G'' + \pi^2 G = b^n \pi^{2n+2} f  = \pi^2 a^n f$, then $$\frac{\dd}{\dd x}\Bigl(G'(x)\sin \pi x - \pi\,G(x)\cos  \pi x\Bigr) = \pi^2 a^n f(x)\sin \pi x .$$
14. Integrate over $\intcc{0}{1}$ and conclude $$\pi\,a^n \int_0^1 f(x)\sin(\pi x)\,\dd x = G(0) + G(1)  \in \Z ,$$ a *positive* integer bounded by $\dfrac{\pi  a^n}{4^n\,n!}$.
15. Conclude with question 1 that $\pi^2$ is irrational (Legendre, 1794), and that this strengthens [Exercise 15.9](#exo-b1-integration-9) : why does the irrationality of $\pi^2$ imply that of $\pi$ , and not conversely?

**Part IV — Understanding the machine.**

16. Locate the two opposing forces (integrality of endpoint data; analytic smallness of the [integral](#thm-b1-integration-def) ) and the bridge, in Parts II and III. Then explain why the factor $\frac{1}{n!}$ in $f$ is the crux: if it is removed, integrality survives, but which inequality dies, and for which claimed fractions $\frac ab$ does the proof then fail?
17. Effectivity: suppose someone claims $\pi^2 = \frac ab$ with $a \leq 10$ . Show that the contradiction already lands at $n = 7$ : compute $\pi\,(10/4)^7/7! \approx  0.38 < 1$ . The machine does not merely refute; it refutes by a fixed, computable stage.
18. Sanity check the bridge unconditionally: prove by two integrations by parts that $$\int_0^1 x(1 - x)\sin(\pi x)\,\dd x = \frac{4}{\pi^3},$$ and reconcile with question 14 at $n = 1$ (keep $\pi^2$ symbolic: the telescoped identity reads $\pi^3  \int_0^1 f_1 \sin \pi x = -(f_1''(0) + f_1''(1)) = 4$).
19. What makes $\eu^x$ and $\sin \pi x$ eligible as the machine’s kernels? Identify the property (each satisfies a linear differential equation with constant coefficients, so repeated [integration by parts](#thm-b1-integration-parts) cycles back to the start), and name the frontier: the same machine, refined by Hermite and Lindemann, proves $\eu$ and $\pi$ *transcendental* — beyond this volume.

**Part V — $\frac{22}{7}$ versus $\pi$, and the moral.**

20. Establish the [polynomial](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def) division $$\frac{x^4(1-x)^4}{1 + x^2}  = x^6 - 4x^5 + 5x^4 - 4x^2 + 4 - \frac{4}{1 + x^2},$$ and deduce the celebrated identity $$\int_0^1 \frac{x^4 (1-x)^4}{1 + x^2}\,\dd x  = \frac{22}{7} - \pi .$$
21. The integrand is positive: conclude $\pi <  \frac{22}{7}$. Then, bounding $\frac{1}{1+x^2}$ between $\frac12$ and $1$ and using $\int_0^1 (x(1-x))^4 =  \frac{1}{630}$ (question 3), prove $$\frac{22}{7} - \frac{1}{630} \;\leq\; \pi \;\leq\;  \frac{22}{7} - \frac{1}{1260} ,$$ i.e. $3.14126 \leq \pi \leq 3.14207$: two correct decimals, by hand.
22. Generalize: dividing $x^{4m}(1-x)^{4m}$ by $1 + x^2$, show the remainder is the constant $(-4)^m$ *(work modulo $x^2 + 1$: $(1-x)^2 \equiv -2x$)*, deduce rationals $r_m$ with $$\abs{\pi - r_m} \leq 4^{\,1 - 5m} ,$$ and check that $m = 1$ reproduces question 20–21.
23. Confront these rationals with the approximation theory of [Problem 14.1](https://one-course.com/books/math/3/en/chapter/14-differentiation#pb-b1-derivative-1) : compute $\abs{\pi -  \frac{22}{7}} \approx 1.26\cdot10^{-3}$ against the Dirichlet guarantee $\frac{1}{49}$ , and quote $\abs{\pi - \frac{355}{113}} \approx 2.7\cdot10^{-7}$ against $\frac{1}{113^2} \approx 7.8\cdot10^{-5}$ : exceptionally good rational approximations exist for $\pi$ — consistent, since $\pi$ is not known to be badly approximable.
24. (The integer trap, abstracted) Prove the lemma that unifies everything: *if $x \in \R$ and there exist integers $a_n, b_n$ with $0 < \abs{a_n + b_n x} \to 0$, then $x$ is irrational.* List its instances in this problem, in [Exercise 15.9](#exo-b1-integration-9) , in [Exercise 11.9](https://one-course.com/books/math/3/en/chapter/11-sequences#exo-b1-seq-9) , and in [Problem 14.1](https://one-course.com/books/math/3/en/chapter/14-differentiation#pb-b1-derivative-1) .
25. Synthesis, one sentence each: (i) the machine’s three parts and where each lives in the toolbox of this chapter; (ii) what the [integral](#thm-b1-integration-def) contributes that the mean value theorem of [Problem 14.1](https://one-course.com/books/math/3/en/chapter/14-differentiation#pb-b1-derivative-1) could not; (iii) the inventory of results extracted (two irrationalities, one six-decimal constant, one bracketing of $\pi$ , one binomial bound); (iv) the frontier (Hermite, Lindemann; and the same trap, run on $\zeta(2)$ and $\zeta(3)$ , in twentieth-century arithmetic).

**Solution of Problem 15.1.**

**1.** Let $N = \lceil 2c \rceil$. For $n \geq N$: $\frac{c^{n+1}/(n+1)!}{c^n/n!} = \frac{c}{n+1} \leq \frac12$, so $0 < \frac{c^n}{n!} \leq \frac{c^N}{N!}\,2^{-(n - N)} \to 0$: squeeze.

**2.** Fix $k$; induction on $m$. For $m = 0$: $\int_0^1
x^k = \frac{1}{k+1} = \frac{k!\,0!}{(k+1)!}$. Step, by parts ($u = (1-x)^m$, $v' = x^k$):

$$
\int_0^1 x^k (1-x)^m \dd x
= \Bigl[\frac{x^{k+1}}{k+1}(1-x)^m\Bigr]_0^1
+ \frac{m}{k+1}\int_0^1 x^{k+1}(1-x)^{m-1}\dd x
= \frac{m}{k+1}\cdot\frac{(k+1)!\,(m-1)!}{(k+m+1)!} ,
$$

which is $\frac{k!\,m!}{(k+m+1)!}$.

**3.** $k = m = n$: $\int_0^1 (x(1-x))^n =
\frac{(n!)^2}{(2n+1)!} = \frac{1}{(2n+1)\binom{2n}{n}}$. Since $x(1-x) \leq \frac14$ on $\intcc{0}{1}$, the [integral](#thm-b1-integration-def) is $\leq
4^{-n}$, whence $\binom{2n}{n} \geq \frac{4^n}{2n+1}$ — consistent with $\binom{2n}{n}^{1/n} \to 4$ ([Problem 11.1](https://one-course.com/books/math/3/en/chapter/11-sequences#pb-b1-seq-1)).

**4.** The integrand is [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous), $\geq 0$, and positive on $\intoo{0}{1}$, hence not identically zero: its [integral](#thm-b1-integration-def) is $> 0$ ([Theorem 15.7](#thm-b1-integration-props) (4)). [Upper bound](https://one-course.com/books/math/3/en/chapter/10-real-numbers#def-b1-reals-bounds): $(x(1-x))^n \leq 4^{-n}$ and $g \leq \sup\abs g$, then monotonicity.

**5.** $A_0 = \eu - 1$; $A_1 = [x\eu^x]_0^1 - \int_0^1
\eu^x = \eu - (\eu - 1) = 1$. By parts: $A_n = [x^n \eu^x]_0^1 -
n\int_0^1 x^{n-1}\eu^x = \eu - n A_{n-1}$. Bounds: the integrand is positive, so $A_n > 0$; and $\eu^x \leq \eu$ gives $A_n \leq
\eu\int_0^1 x^n = \frac{\eu}{n+1}$.

**6.** $A_0 = -1 + 1\cdot\eu$. If $A_{n-1} = \alpha_{n-1} +
\beta_{n-1}\eu$ with integer entries, then

$$
A_n = \eu - n\alpha_{n-1} - n\beta_{n-1}\eu
= \underbrace{(-n\,\alpha_{n-1})}_{\alpha_n}
+ \underbrace{(1 - n\,\beta_{n-1})}_{\beta_n}\,\eu ,
$$

both integers.

**7.** If $\eu = \frac pq$: $q A_n = q\alpha_n + p\beta_n
\in \Z$, and $0 < qA_n \leq \frac{q\eu}{n+1} < 1$ for $n$ large: an integer strictly between $0$ and $1$ — impossible. So $\eu
\notin \Q$. In [Exercise 11.9](https://one-course.com/books/math/3/en/chapter/11-sequences#exo-b1-seq-9) the trapped integer was $q!\,\frac pq - q!\,a_q$; here it is $qA_n$: same trap, [integral](#thm-b1-integration-def) fuel.

**8.** $n = 0$: $R_0 = \int_0^1 \eu^t = \eu - 1$, so $\eu =
1 + R_0$. By parts ($u = \eu^t$, $v = -\frac{(1-t)^{n+1}}{n+1}$):

$$
R_n = \frac{1}{n!}\Bigl(\Bigl[-\frac{(1-t)^{n+1}}{n+1}
\eu^t\Bigr]_0^1 + \frac{1}{n+1}\int_0^1 (1-t)^{n+1}\eu^t\Bigr)
= \frac{1}{(n+1)!} + R_{n+1} ,
$$

so the formula propagates from $n$ to $n + 1$. Bounds: $1 \leq
\eu^t \leq \eu$ on $\intcc{0}{1}$ and $\int_0^1 (1-t)^n =
\frac{1}{n+1}$ give $\frac{1}{(n+1)!} \leq R_n \leq
\frac{\eu}{(n+1)!}$.

**9.** $\sum_{k=0}^{9} \frac{1}{k!} = \frac{986410}{362880}
= 2.71828152\dots$, and

$$
\frac{1}{10!} = 2.76\cdot10^{-7} \leq R_9 \leq
\frac{2.75}{10!} = 7.58\cdot10^{-7} ,
$$

so $2.7182818 \leq \eu \leq 2.7182823$: with proof, $\eu =
2.718282$ to six decimals (true value $2.7182818\dots$).

**10.** $f(1 - x) = \frac{(1-x)^n x^n}{n!} = f(x)$. On $\intoo{0}{1}$: $0 < x(1-x) \leq \frac14$, so $0 < f \leq
\frac{1}{4^n\,n!}$.

**11.** $x^n(1-x)^n = \sum_{j=0}^{n} (-1)^j\binom
nj\,x^{n+j}$, so $f = \frac{1}{n!}\sum_j c_j\,x^{n+j}$ with $c_j \in \Z$. Hence $f^{(k)}(0) = 0$ for $k < n$ or $k > 2n$, and for $n \leq k \leq 2n$: $f^{(k)}(0) = \frac{k!}{n!}\,
c_{k-n}$, an integer because $n! \mid k!$. The symmetry gives $f^{(k)}(1) = (-1)^k f^{(k)}(0) \in \Z$.

**12.** $b^n \pi^{2n-2k} = b^n\bigl(\frac
ab\bigr)^{\,n-k} = a^{\,n-k}\,b^{\,k} \in \Z$, so $G(0) =
\sum_k (-1)^k a^{n-k} b^k f^{(2k)}(0)$ and likewise $G(1)$ are integers by question 11.

**13.** In $\pi^2 G + G''$, the term $k$ of $\pi^2 G$ carries $\pi^{2n-2k+2}f^{(2k)}$ and the term $j = k - 1$ of $G''$ carries $(-1)^{k-1}\pi^{2n-2k+2}f^{(2k)}$: everything cancels except $k = 0$ in the first sum and $j = n$ in the second, i.e.

$$
G'' + \pi^2 G = b^n\bigl(\pi^{2n+2} f + (-1)^n f^{(2n+2)}\bigr)
= b^n \pi^{2n+2} f = \pi^2 a^n f
$$

($f$ has degree $2n$, so $f^{(2n+2)} = 0$; and $b^n\pi^{2n} =
a^n$). Then

$$
\bigl(G'\sin\pi x - \pi G\cos\pi x\bigr)'
= (G'' + \pi^2 G)\sin \pi x = \pi^2 a^n f\sin\pi x .
$$

**14.** Integrating over $\intcc{0}{1}$:

$$
\pi^2 a^n \int_0^1 f\sin(\pi x)\,\dd x
= \bigl[G'\sin\pi x - \pi G\cos\pi x\bigr]_0^1
= \pi\bigl(G(1) + G(0)\bigr) ,
$$

so $\pi a^n \int_0^1 f\sin\pi x = G(0) + G(1) \in \Z$. On $\intoo{0}{1}$, $f > 0$ and $\sin\pi x > 0$: the left side is positive, so $G(0) + G(1) \geq 1$; and $\sin \leq 1$ with question 10 bounds it by $\frac{\pi a^n}{4^n\,n!}$.

**15.** By question 1 (with $c = \frac a4$), $\frac{\pi a^n}{4^n n!} \to 0$: for large $n$ it is $< 1$, contradicting $G(0) + G(1) \geq 1$. So no fraction $\frac ab$ equals $\pi^2$: Legendre’s theorem. If $\pi$ were rational, $\pi^2$ would be too: so $\pi \notin \Q$ — and the implication only runs this way ($\sqrt2$ is irrational with rational square), which is why $\pi^2 \notin \Q$ is strictly stronger than [Exercise 15.9](#exo-b1-integration-9).

**16.** Integrality: questions 11–12 (endpoint [derivatives](https://one-course.com/books/math/3/en/chapter/14-differentiation#def-b1-derivative-def)); smallness: questions 10 and 1; bridge: questions 13–14 (the telescoped double [integration by parts](#thm-b1-integration-parts)). Without $\frac{1}{n!}$, the endpoint data remain integers (even more easily), but the bound becomes $\frac{\pi a^n}{4^n}$, which tends to $0$ only when $a < 4$ — and every candidate has $a =
b\,\pi^2 > 9$. The factorial is exactly what outruns the geometric growth $a^n$: no factorial, no theorem.

**17.** For $a \leq 10$, the integer $G(0) + G(1)$ is positive and at most $\pi\,(10/4)^n/n!$. At $n = 7$: $2.5^7 = 610.35\dots$, so the bound is $\frac{\pi \times
610.35}{5040} \approx 0.38 < 1$ (at $n = 6$ it is still $1.07$): the contradiction lands at the seventh stage, explicitly.

**18.** Two integrations by parts:

$$
\int_0^1 x(1-x)\sin\pi x\,\dd x
= \frac1\pi\int_0^1 (1 - 2x)\cos\pi x\,\dd x
= \frac{2}{\pi^2}\int_0^1 \sin\pi x\,\dd x
= \frac{2}{\pi^2}\cdot\frac{2}{\pi} = \frac{4}{\pi^3}
$$

(the bracket terms vanish: $x(1-x)$ at $0, 1$, and $\sin\pi x$ at $0, 1$). Symbolically, the $n = 1$ telescope (no assumption on $\pi$) reads $\pi^3\int_0^1 f_1\sin\pi x = -(f_1''(0) +
f_1''(1))$ with $f_1 = x(1 - x)$, $f_1'' = -2$: right side $4$ — the two computations agree.

**19.** $\eu^x$ solves $y' = y$ and $\sin\pi x$ solves $y'' = -\pi^2 y$: linear equations with constant coefficients, so [integration by parts](#thm-b1-integration-parts) cycles the kernel back to itself and keeps all [boundary](https://one-course.com/books/math/3/en/chapter/12-topology-of-the-real-line#def-b1-topology-closure) data inside $\Z + \Z\eu$ (resp. integer [polynomials](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def) in $\pi^2$). That [closure](https://one-course.com/books/math/3/en/chapter/12-topology-of-the-real-line#def-b1-topology-closure) property is what the machine needs. Refined with kernels adapted to several points at once, the same mechanism yields Hermite’s theorem ($\eu$ transcendental, 1873) and Lindemann’s ($\pi$ transcendental, 1882) — beyond this volume.

**20.** [Polynomial](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def) division (or multiply back and check):

$$
x^4(1-x)^4 = (x^6 - 4x^5 + 5x^4 - 4x^2 + 4)(1 + x^2) - 4 .
$$

Integrating the displayed identity divided by $1 + x^2$:

$$
\int_0^1 \frac{x^4(1-x)^4}{1+x^2}\dd x
= \Bigl(\frac17 - \frac46 + 1 - \frac43 + 4\Bigr)
- 4\arctan 1
= \frac{22}{7} - \pi ,
$$

using $\frac17 - \frac23 + 1 - \frac43 + 4 = 3 + \frac17$ and $\arctan 1 = \frac\pi4$.

**21.** The integrand is [continuous](https://one-course.com/books/math/3/en/chapter/13-limits-and-continuity#def-b1-continuity-continuous), positive on $\intoo{0}{1}$: the [integral](#thm-b1-integration-def) is $> 0$, so $\pi < \frac{22}{7}$. Moreover $\frac12 \leq \frac{1}{1+x^2} \leq 1$ on $\intcc{0}{1}$ and $\int_0^1 (x(1-x))^4 = \frac{(4!)^2}{9!} =
\frac{1}{630}$ (question 3):

$$
\frac{1}{1260} \leq \frac{22}{7} - \pi \leq \frac{1}{630}
\quad\Longrightarrow\quad
3.14126 < \frac{22}{7} - \frac{1}{630} \leq \pi \leq
\frac{22}{7} - \frac{1}{1260} < 3.14207 .
$$

**22.** Modulo $x^2 + 1$: $x^2 \equiv -1$, so $x^{4m} =
(x^2)^{2m} \equiv 1$ and $(1 - x)^2 = 1 - 2x + x^2 \equiv -2x$, hence $(1-x)^{4m} \equiv (-2x)^{2m} = 4^m (x^2)^m \equiv
(-4)^m$: the remainder is the constant $(-4)^m$, and the quotient $Q_m$ has integer coefficients (division by a [monic](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def) integer [polynomial](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def)). Dividing the identity by $1 + x^2$ and integrating:

$$
J_m := \int_0^1 \frac{(x(1-x))^{4m}}{1+x^2}\dd x
= s_m + (-4)^m\,\frac{\pi}{4},
\qquad s_m = \int_0^1 Q_m \in \Q .
$$

Solving for $\pi$: with $r_m = (-1)^{m+1}\,4^{\,1-m} s_m \in
\Q$, $\;\abs{\pi - r_m} = 4^{\,1-m} J_m \leq
4^{\,1-m}\cdot4^{-4m} = 4^{\,1-5m}$. For $m = 1$: $s_1 =
\frac{22}{7}$, $r_1 = \frac{22}{7}$, bound $4^{-4} =
\frac{1}{256}$ — questions 20–21 again.

**23.** $\bigl|\pi - \frac{22}{7}\bigr| = \frac{22}{7} -
\pi \approx 1.26\cdot10^{-3}$, sixteen times better than the order-$2$ benchmark $\frac{1}{7^2} \approx 2.0\cdot10^{-2}$ guaranteed by Dirichlet ([Problem 14.1](https://one-course.com/books/math/3/en/chapter/14-differentiation#pb-b1-derivative-1), question 4); and $\bigl|\pi - \frac{355}{113}\bigr| \approx 2.7\cdot10^{-7}$ beats $\frac{1}{113^2} \approx 7.8\cdot10^{-5}$ by a factor $\approx 300$. No contradiction with anything proved: Liouville inequalities *lower-bound* approximation errors only for [algebraic numbers](https://one-course.com/books/math/3/en/chapter/1-logic-sets-and-maps#pb-b1-logic-1), and no such bound for $\pi$ is available at this level — $\pi$ is free to be approximated spectacularly well.

**24.** Lemma: suppose $x = \frac pq$ and $0 < \abs{a_n +
b_n x} \to 0$. Then $\abs{a_n + b_n x} = \frac{\abs{q a_n + p
b_n}}{q}$, with $q a_n + p b_n$ a nonzero integer (nonzero because the absolute value is $> 0$): so $\abs{a_n + b_n x}
\geq \frac1q$ for every $n$, contradicting the convergence to $0$. Instances: question 7 ($x = \eu$, $a_n = \alpha_n$, $b_n =
\beta_n$); [Exercise 11.9](https://one-course.com/books/math/3/en/chapter/11-sequences#exo-b1-seq-9) ($x = \eu$ again, with $a_q =
-q!\sum_{k \leq q}\frac{1}{k!}$, $b_q = q!$); and [Problem 14.1](https://one-course.com/books/math/3/en/chapter/14-differentiation#pb-b1-derivative-1), question 1, is its geometric form. In Part III and in [Exercise 15.9](#exo-b1-integration-9) the trap runs *inside* the contradiction: assuming rationality converts an expression into an integer, which the analysis then squeezes into $\intoo{0}{1}$ — the same principle, transposed.

**25.** (i) Integrality lives in the endpoint calculus of [polynomials](https://one-course.com/books/math/3/en/chapter/8-polynomials#def-b1-poly-def) (questions 6, 11–12), smallness in the bounds $\sup$-monotonicity gives (questions 4, 10), the bridge in [integration by parts](#thm-b1-integration-parts) (questions 8, 13–14) — all three are theorems of this chapter. (ii) The [integral](#thm-b1-integration-def) supplies what the mean value theorem could not: an *exact* identity between the analytic object and the arithmetic data (equality, not just an inequality with an unknown $c$), which is why the machine reaches $\pi^2$ while [Problem 14.1](https://one-course.com/books/math/3/en/chapter/14-differentiation#pb-b1-derivative-1) reached only approximation exponents. (iii) Extracted: $\eu \notin \Q$, $\pi^2 \notin \Q$ (hence $\pi \notin \Q$), $\eu = 2.718282$ certified, $\frac{22}{7} - \frac{1}{630} \leq \pi \leq
\frac{22}{7} - \frac{1}{1260}$, and $\binom{2n}{n} \geq
\frac{4^n}{2n+1}$. (iv) Frontier: Hermite and Lindemann push the same machine to transcendence; and Apéry (1979) ran the integer trap on $\zeta(3)$ — the machine is still producing twentieth-century mathematics.
