Honors Calculus Notes for [5 Integration]
Definition
Def. 5.1 Riemann integral (黎曼积分)
Let \([a, b]\) be a given interval, with \(a<b\). Let \(P\) be a partition (割分) of \([a, b]\):
Suppose \(f\) is a bounded real-valued function defined on \([a,b]\), so we assume that there exists \(m\) and \(M\) such that \(m\leq f(x)\leq M\) for \(x\in[a, b]\). On each subinterval \([x_{i-1}, x_i]\), put
Write \(\Delta x_i:=x_i-x_{i-1}, 1\leq i\leq n\). Form the lower sum (下和) and the upper sum (上和)
respectively. For each fixed partition \(P\),
so that the numbers \(\lbrace L(P, f)\rbrace\) and \(\lbrace U(P, f)\rbrace\) form bounded sets.
Denote the lower integral (下积分) and the upper integral (上积分), respectively:
When two values are equal, we represent the common value using the notation
which is referred to as the Riemann integral or the definite integral (定积分) of \(f\) over the interval \([a, b]\). The function \(f\) is referred to as the integrand (被积函数).
If the integral exists, we say that \(f\) is Riemann integrable (黎曼可积) on \([a, b]\), and write \(f\in \mathscr{R}[a, b]\).
Def. 5.2 Refinement (细化)
The partition \(Q\) is a refinement (细化) of \(P\) if every point of \(P\) is a point of \(Q\), that is, \(Q\supset P\).
Given two partitions, \(P_1\) and \(P_2\), we say that \(P_1\cup P_2\) is their common refinement (共同细化).
Suppose \(Q\) is any refinement of partition \(P\) of \([a,b]\). Then
Def. 5.3 Riemann Sum (黎曼和)
The Riemann integral was defined originally by Riemann similarly to the concept in Condition 2,
expressed as the limit
where \(x_i^*\in[x_{i-1}, x_i]\) is an arbitrary point in the subintervals. Here, the summation \(\sum_{i=1}^nf(x_i^*)\Delta x_i\) is called the Riemann sum (黎曼和), and \(||P||=\max_{1\leq i\leq n}\Delta x_i\) denotes the mesh (细度) of the partition \(P\).
Riemann v.s. Darboux
It can be shown that both Riemann's and Darboux's definitions ultimately describe the same concept of integration for functions that satisfy specific criteria; however, they differ in their methods and applications.
Darboux's definition is considered a more foundational approach that emphasizes bounding functions, whereas Riemann's definition concentrates on evaluating function values at particular points.
Def. 5.4 Uniformly Continuous (一致连续)
For a function \(f:=I\rightarrow \mathbb R\), where \(I\) is a interval and \(I\subset \mathbb R\). If for any \(\epsilon >0\), there exists \(\delta>0\) s.t. for any \(x_1, x_2\in I\), \(|x_1-x_2|<\delta\), \(|f(x_1)-f(x_2)|<\epsilon\), we call \(f\) is uniformly continuous (一致连续) on \(I\).
(comment: consider \(f(x)=\frac{1}{x}, x\in(0, 1)\))
- \(f\) is continuous on a closed interval \(I\) \(\Leftrightarrow\) \(f\) is uniformly continuous a closed interval on \(I\).
Proof
- Part 1 (\(\Leftarrow\))
If the uniformly continuous holds, we have for any \(\epsilon>0\), there exists \(\delta>0\) s.t. for any \(x_1, x_2\in I\), \(|x_1-x_2|<\delta\), \(|f(x_1)-f(x_2)|<\epsilon\).
Then for a fixed \(x_0\), for any \(\epsilon >0\), there exists \(\delta>0\) s.t. for any \(|x-x_0|<\delta, x\in I\), \(|f(x)-f(x_0)|<\epsilon\), which implies that \(f\) is continuous on \(x_0\).
We apply this analysis on every point in \(I\), then we can obtain that \(f\) is continuous on \(I\).
- Part 2 (\(\Rightarrow\))
If the continuous holds, we have for any \(x_0\in I\), \(\forall \epsilon >0\), \(\exists \delta>0\) s.t. \(\forall |x-x_0|<\delta, x\in I, |f(x)-f(x_0)|<\epsilon\).
If there exists \(\epsilon >0\) s.t. \(\forall \delta_n>0\) , \(\exists x_{1, n}, x_{2, n}\in I, |x_{1, n}-x_{2, n}|<\delta_n, |f(x_{1, n})-f(x_{2, n})|\geq \epsilon\)
Assuming that \(\forall n\in \mathbb N, \delta_n>\delta_{n+1}\), then we form two sequence \(\{x_{1, n}\}\) and \(\{x_{2, n}\}\) from above, and assuming that \(x_{1, n}>x_{2, n}\) holds for all \(n\in\mathbb N\).
\(\because \lim_{n\rightarrow \infty}\delta_n=0\),
\(\therefore \lim_{n\rightarrow \infty} (x_{1, n}-x_{2, n})=0\).
According to Bolzano-Weusetrass Theorem, we can select a subsequence \(\{x_{1, n_k}\}\) from \(\{x_{1, n}\}\) that converges. Let \(\lim_{k\rightarrow\infty} x_{1, n_k}=x^*\).
\(\because \lim_{n\rightarrow \infty} (x_{1, n}-x_{2, n})=0\)
\(\therefore \lim_{k\rightarrow \infty} (x_{1, n_k}-x_{2, n_k})=0\) (we consider \(\{x_{1, n}-x_{2, n}\}\) as a sequence that converges).
\(\therefore \{x_{2, n_k}\}\) also converges and \(\lim_{k\rightarrow\infty} x_{2, n_k}=x^*\in I\).
That implies when \(\delta\rightarrow 0\), \(|\lim_{x\rightarrow x^{*+}}f(x)-\lim_{x\rightarrow x^{*-}}f(x)|\geq\epsilon>0\), which means \(\lim_{x\rightarrow x^{*+}} f(x)\neq \lim_{x\rightarrow x^{*-}}f(x)\).
Thus \(f\) is not continuous on \(x^*\), which conflicts with \(f\) is continuous on \(I\).
Thus \(f\) is uniformly continuous on \(I\).
[知乎] 数学分析中的反例(2)——连续和一致连续 - Ra1n F0rest
[知乎] 一致连续性(1):(非)一致连续性的判定 - 铁球
Def. 5.5 Indefinite Integral (不定积分)
Given a function \(f:I\rightarrow \mathbb R\) defined on an open interval \(I\). If \(f\) is an antiderivative of \(f\) on \(I\), then the expression \(F(x)+C\), where \(C\) is an arbitrary constant, is called the indefinite integral (不定积分) of \(f(x)\) with respect to \(x\) and is denoted by
The function \(f(x)\) is called the integrand (被积函数), \(C\) is the constant of integration (积分常数)
Def. 5.6 Improper Integral (反常积分)
Improper Integral of Type 1 (第一类反常积分)
- Suppose \(f\) is a function defined on an interval \([a, \infty)\) such that \(f\) is integrable over \([a, t]\) for any \(t>a\). The improper integral (反常积分) is defined as a limit of a definite integral as follows:
-
When the limit exists, we say the improper integral is convergent (收敛); otherwise, it is divergent (发散).
-
Suppose \(f\) is a function defined on an interval \((-\infty, a]\) such that \(f\) is integrable over \([t, a]\) for any \(t<a\). The improper integral is defined as a limit of a definite integral as follows:
- Suppose \(f\) is a function defined on \((-\infty, \infty)\) such that \(f\) is integrable on any bounded closed interval. We define the improper integral:
- where \(a\) is any fixed real number.
Improper Integral of Type 2 (第二类反常积分)
- Suppose \(f\) is a function defined on an interval \([a, b)\) such that \(f\) is integrable over \([a, t]\) for any \(t\in (a, b)\), and suppose \(f\) is unbounded in \([t, b)\). We define the improper integral as a limit of a definite integral as follows:
-
When the limit exists, we say the improper integral is convergent; otherwise, it is divergent.
-
Suppose \(f\) is a function defined on an interval \((b, a]\) such that \(f\) is integrable over \([t, a]\) for any \(t\in (b, a)\), and suppose \(f\) is unbounded in \((b, t]\). We define the improper integral as a limit of a definite integral as follows:
- Suppose \(f\) is a function defined on an interval \([a, c]\), possibly not at \(b\) where \(b\in(a, c)\). If \(f\) is unbounded near \(b\), and if \(\int_{a}^{b}f(x)\text{d}x\) and \(\int_{b}^{c}f(x)\text{d}x\) are convergent, then we define
Example
-
Show \(\int_{0}^{\infty}e^{-x}\text{d}x\) converges and find its value.
-
\(\int_{0}^{t}e^{-x}\text{d}x=1-e^{-t}\)
-
\(\int_{0}^{\infty}e^{-x}\text{d}x=\lim_{t\rightarrow \infty}\int_{0}^{t}e^{-x}\text{d}x=\lim_{t\rightarrow \infty}(1-e^{-t})=1\)
-
-
Determine whether \(\int_{-\infty}^{0}\cos x\text{d}x\) converges.
-
\(\int_{t}^{0}\cos x\text{d}x=(\sin x)|_{x=t}^{0}=-\sin t\)
-
\(\lim_{n\rightarrow \infty}\sin(-2n\pi)=0\neq 1=\lim_{n\rightarrow \infty}\sin(-2n\pi+\frac{\pi}{2})\)
-
Hence, the given improper integral diverges.
-
-
Determine whether \(\int_{0}^{1}\ln x\text{d}x\) converges, and if it does, find its value.
-
\(\int_{t}^{1}\ln x\text{d}x=(x\ln x)|_{x=t}^{1}-\int_{t}^{1}x\cdot\frac{1}{x}\text{d}x=-t\ln t-(1-t)=-t\ln t-1+t\)
-
\(\int_{0}^{1}\ln x\text{d}x=\lim_{t\rightarrow 0^{+}}\int_{t}^{1}\ln x\text{d}x=\lim_{t\rightarrow 0^{+}}(-t\ln t-1+t)=-1\)
-
-
Consider \(\int_{0}^{1}x^p\text{d}x \text{ } (p<0, p\neq -1)\). Find the values of \(p\) for which the improper integral converges.
-
\(\int_{t}^{1}x^p\text{d}x=\frac{x^{p+1}}{p+1}|_{x=t}^{1}=\frac{1-t^{p+1}}{p+1}\)
-
\(\lim_{t\rightarrow 0^{+}}\frac{1-t^{p+1}}{p+1}=\infty\) for \(p<-1\)
-
\(\lim_{t\rightarrow 0^{+}}\frac{1-t^{p+1}}{p+1}=\frac{1}{p+1}\) for \(-1<p<0\)
-
Proposition & Theorem
Theo. 5.1 the Integrability criterion (可积性判据)
A function \(f\in\mathscr{R}[a,b]\) if and only if the integrability criterion (可积性判据) holds:
Here \(\omega_{[x_{i-1}, x_i]}(f):=M_i-m_i\) is called the oscillation (振荡) of \(f\) on \([x_{i-1}, x_i]\), with
Proof Theo 5.1
Part 1 (\(\Rightarrow\))
Suppose \(f\in \mathscr{R}[a,b]\). For \(\epsilon>0\), by the definition of the upper and lower integrals, there exists partitions \(P_1\) and \(P_2\) such that
and
Let \(P\) be the common refinement of \(P_1\) and \(P_2\). Since \(\underline\int_{a}^bf\text{d}x=\overline\int_{a}^bf\text{d}x=\int_{a}^bf\text{d}x\), we have
so that
Part 2 (\(\Leftarrow\))
Suppose the integrability criterion holds. For every \(\epsilon >0\), there exists a partition \(P\) such that \(U(P, f)-L(P, f)<\epsilon\). Since
we obtain
Because \(\epsilon\) is arbitrary, we have
so that \(f\in \mathscr{R}[a,b]\)
Necessary and Sufficient Conditions for Integrability (可积性的充分必要条件)
Condition 1
- \(\forall \epsilon>0, \exists P\text{ of }[a,b]\) such that
for any \(s_i, t_i\in [x_{i-1}, x_i], i=1, 2,\cdots,n\).
Proof Condition 1
Part 1 (\(\Rightarrow\))
Suppose \(f\in \mathscr{R}[a,b]\). By the integrability criterion, there exists a partition \(P\) of \([a, b]\), such that \(U(P, f)-L(P, f)<\epsilon\). For any \(s_i, t_i\in[x_{i-1}, x_i], i=1, 2, \cdots, n\), since
we have
That is, for the same partition \(P\), Condition 1 for integrability holds.
Part 2 (\(\Leftarrow\))
Suppose that Condition 1 for integrability holds. Thus, for every \(\epsilon >0\) there exists a partition \(P:a=x_0\leq x_1\leq \cdots \leq x_n\leq b\), such that
for any choice of \(s_i, t_i\in[x_{i-1}, x_i], i=1, 2, \cdots, n\). For each \(i\), choose \(s_i^*, t_i^*\in[x_{i-1}, x_i]\), such that
\((c \text{ is a constant and } c>0)\)
Thus,
Hence, the integrability criterion holds, so that \(f\in \mathscr{R}[a, b]\)
Condition 2
- \(\forall \epsilon>0, \exists P\text{ of }[a,b]\) such that, for some real number \(I\),
for any \(x_i^*\in[x_{i-1},x_i], i=1, 2,\cdots,n\).
(This implies that \(I=\int_a^bf\text{d}x\).)
Proof Condition 2
Part 1 (\(\Rightarrow\))
Suppose \(f\in \mathscr{R}[a, b]\). By the integrability criterion, there exists a partition \(P\) of \([a, b]\), such that \(U(P, f)-L(P, f)<\epsilon\). By the definition of the Riemann integral, we know
For any choice of \(t_i\in[x_{i-1}, x_i], i=1, 2, \cdots, n\), since \(m_i\leq f(t_i)\leq M_i\), we have
Thus, we know that both \(\sum_{i=1}^n f(t_i)\Delta x_i\) and \(\int_a^b f\text{d}x\) lie in the interval \([L(P, f), U(P, f)]\). It follows that if taking \(I=\int_a^bf\text{d}x\), then
So, for the same partition \(P\), Condition 2 for integrability holds.
Part 2 (\(\Leftarrow\))
Suppose that Condition 2 for integrability holds. Thus, for every \(\epsilon >0\) there exists a partition \(P:a=x_0\leq x_1 \leq \cdots\leq x_n=b\), such that
for some \(I\in \mathbb R\) and any choice of \(t_i\in[x_{i-1}, x_i], i=1, 2, \cdots, n\). For each \(i\), choose \(s_i^{*}, t_{i}^{*}\in[x_{i-1}, x_i]\) , such that
\((c \text{ is a constant and } c>0)\)
Thus,
Hence, the integrability criterion holds, so that \(f\in \mathscr{R}[a, b]\)
Pro. 5.2 Riemann integrable functions
- If \(f\) is continuous on \([a,b]\), then \(f\in \mathscr{R}[a, b]\).
Proof Pro. 5.2.1
Since \(f\) is continuous on \([a, b]\), \(f\) is uniformly continuous on \([a, b]\).
i.e. for any \(\epsilon>0\), there exists \(\delta>0\) such that for \(s, t\in[a, b]\) with \(|s-t|<\delta\),
\((c \text{ is a constant and } c>0)\).
Let \(P\) be any partition of \([a, b]\) s.t. \(\Delta x_i<\delta\). Then the above inequality implies
Hence,
By the integrability criterion, we conclude that \(f\in \mathscr{R}[a, b]\)
- If \(f\) is bounded on \([a,b]\) and has only finitely many discontinuities, then \(f\in\mathscr{R}[a, b]\).
Proof Pro. 5.2.2

- If \(f\) is monotonic on \([a, b]\), then \(f\in \mathscr{R}[a,b]\).
Proof Pro. 5.2.3
Without loss of generality, we assume that \(f\) is monotone increasing on \([a, b]\).
For any \(\epsilon >0\), we can always choose a positive interger \(n\) s.t.
Consider a equal-spaced (等间距) partition
s.t., for \(i=0, 1, \cdots, n\)
Since \(f\) is monotone increasing on \([a, b]\), we know
Hence,
Hence, \(f\in\mathscr{R}[a, b]\).
- If \(f\in\mathscr{R}[a, b]\), then \(f\) is bounded on \([a, b]\).
Proof Pro. 5.2.4
Suppose \(f\) is unbounded on \([a, b]\).
For any \(\epsilon >0\), for any partition \(P:a=x_0<x_1<\cdots<x_{n-1}<x_n=b\), there must exists \(p\in\{1, 2, \cdots, n\}\) s.t. \(f\) is unbouned on \([x_{p-1}, x_p]\).
Thus for any chosen \(s_p\in[x_{p-1}, x_p]\), there exists \(t_p\in[x_{p-1}, x_p]\) s.t.
This gives
so that Condition 1 for integrability fails.
Pro. 5.3 Riemann integrability of composition
Suppose \(f\in \mathscr{R}[a, b]\), \(m\leq f\leq M\), \(\phi\) is continuous on \([m, M]\), and \(h(x)=\phi(f(x))\) on \([a, b]\). Then \(h\in\mathscr{R}[a, b]\).
Proof Pro. 5.3
Since \(\phi\) is uniformly continuous on \([m, M]\), for any given positive number \(\epsilon^*\), there exists \(\delta>0\) s.t. \(\delta<\epsilon^*\) and \(|\phi(s)-\phi(t)|<\epsilon^*\) if \(s, t\in[m, M]\), with \(|s-t|<\delta\).
Since \(f\in\mathscr{R}[a, b]\), there is a partition \(P=\{x_0, \cdots, x_n\}\) of \([a, b]\) s.t.
Let \(M_i, m_i\) be the supremum and infimum of \(f\) on \([x_{i-1}, x_i]\), respectively, while \(M_i^*, m_i^*\) be the analogous numbers for \(h\). Divide the set \(\{1, 2, \cdots, n\}\) into two sets \(A\) and \(B\): \(i\in A\) if \(M_i-m_i<\delta\), \(i\in B\) if \(M_i-m_i\geq \delta\).
For \(i\in A\), the choice of \(\delta\) shows that \(M_i^*-m_i^*\leq \epsilon^*\).
For \(i\in B\), \(M_i^*-m_i^*\leq 2K\), where \(K=\sup_{m\leq t\leq M}|\phi(t)|\).
From
we have
Thus
If we take \(\epsilon^*<\frac{\epsilon}{b-a+2K}\), then we see that integrability criterion holds for the partition \(P\).
Consequently, we know that \(h\in\mathscr{R}[a, b]\).
Pro. 5.4 Properties of the Riemann Integral
- Linearity (线性): If \(f, g\in \mathscr{R}[a, b]\) and \(\alpha, \beta\) are real numbers, then \(\alpha f+\beta g\in \mathscr{R}[a, b]\) and
- Additivity (可加性): If \(f\in \mathscr{R}[a, b]\) and if \(a<c<b\), then \(f\in\mathscr{R}[a, c]\) and \(f\in\mathscr{R}[c, b]\), and
- Monotonicity (单调性): If \(f, g\in\mathscr{R}[a, b]\), and \(f(x)\leq g(x)\), then
Corollary 5.4.3.1
If \(f\in\mathscr{R}[a, b]\), then \(|f|\in\mathscr{R}[a, b]\) and
where \(|f(x)|\leq M\) on \([a, b]\).
Pro. 5.5 Mean Value Theorem for integrals (积分中值定理)
If \(f\) is continuous on \([a, b]\), then there exists a number \(c\) in \([a, b]\) such that
- The fomula \(\frac{1}{b-a}\int_{a}^b f(x)\text{d}x\) gives the average value (均值) of \(f\) on \([a, b]\), and denote it as \(f_{ave}\).
Proof Pro. 5.5
According to Lagrange's Extreme Value Theorem (EVT), \(f\) must have a global maximum and global minimum.
Define \(m\triangleq\min_{x\in[a, b]}f(x), M\triangleq\max_{x\in[a, b]}f(x)\), and there exist \(x_1, x_2\) s.t. \(f(x_1)=m, f(x_2)=M\)
According to the Pro. 5.4.3, we have
Thus we have
Define \(S:=\{x|f(x)\leq \frac{\int_{a}^{b}f(x)}{b-a}, x\in[x_1, x_2]\}\).
According to the Completeness Axiom, \(\sup S\) exists, denote \(c\triangleq\sup S\).
Because \(S\subseteq [x_1, x_2], c\leq \max\{x_1, x_2\}\).
If \(f(c)< \frac{\int_{a}^{b}f(x)}{b-a}\), because of the continuity, for \(\epsilon=\frac{\int_{a}^{b}f(x)}{b-a}-f(c)>0\), exists \(\delta>0\), s.t. \(\forall x\in[x_1, x_2]\text{ and } |x-c|<\delta, |f(x)-f(c)|<\epsilon\). This implies \(\forall x\in(c-\delta, c+\delta)\cap[x_1, x_2], f(x)<\frac{\int_{a}^{b}f(x)}{b-a}\). This shows \(c+\delta\) is also the supermum of \(S\), which is in contradictory with \(c=\sup S\).
Similarly, we can prove that \(f(c)>\frac{\int_{a}^{b}f(x)}{b-a}\) does not hold.
(comment: Intermediate Value Theorem).
Thus, there exists \(c\in[x_1, x_2]\subseteq[a, b]\), s.t. \(f(c)=\frac{\int_{a}^{b}f(x)}{b-a}\).
Theo. 5.6 Fundamental Theorem of Calculus (微积分基本定理)
Part 1
Suppose \(f\in\mathscr{R}[a, b]\). For \(a\leq x\leq b\), put
Then \(F\) is continuous on \([a, b]\). Furthermore, if \(f\) is continuous at a point \(x_0\in[a, b]\), then \(F\) is differentiable at \(x_0\), and \(F^\prime(x_0)=f(x_0)\).
Proof Pro. 5.6 Part 1
Since \(f\in\mathscr{R}[a, b]\), \(f\) is bounded on \([a, b]\). Suppose \(|f(x)|\leq M, \forall x\in[a, b]\), we have
This shows that \(f\) is uniformly continuous on \([a, b]\), thus \(f\) is continuous on \([a, b]\).
If \(f\) is continuous at \(x_0\), then for any \(\epsilon>0\), there exists \(\delta>0\) s.t.
Hence, if \(x_0-\delta<s\leq x_0\) and \(a\leq s\), we have
Thus \(F^{\prime}_{-}(x_0)=\lim_{h\rightarrow 0^-}\frac{F(x_0+h)-F(x_0)}{h}=f(x_0)\)
Similarly, we can obtain \(F^{\prime}_{+}(x_0)=\lim_{h\rightarrow 0^+}\frac{F(x_0+h)-F(x_0)}{h}=f(x_0)\)
Thus \(F^\prime(x_0)=f(x_0)\)
Part 2
If \(f\) is continuous on \([a, b]\), and if there is a differentiable function \(F\) on \([a, b]\) such that \(F^\prime=f\), then the Newton-Leibniz formula (牛顿-莱布尼茨公式) holds:
- A differentaible function \(F\) is called an antiderivative (反导数) of \(f\) if \(F^\prime(x)=f(x)\).
Proof Pro. 5.6 Part 2
For each given \(\epsilon>0\), there exists a partition \(P=\{x_0, \cdots, x_n\}\) of \([a, b]\), such that
For each \(i, i\in\{1, \cdots, n\}\), by the Mean Value Theorem, there is \(t_i\in[x_{i-1}, x_i]\) such that
Thus
According to Theo. 5.3, if the integrability criterion holds for the partition \(P\), then the same partition \(P\) is valid for Condition 2. Thus
That is,
Since \(\epsilon\) is arbitrary, we can obtain \(\int_{a}^bf(x)\text{d}x=F(b)-F(a)\)
Theo. 5.7 Integration by parts and by substitution (分部积分与积分代换)
Integration by parts
Suppose \(F\) and \(G\) are differentaible functions on \([a, b]\), $F^\prime =f $ is continuous on \([a, b]\), and \(G^\prime =g\) is continuous on \([a, b]\). Then
Proof Pro. 5.7 Part 1
\((F(x)G(x))^\prime=F^\prime(x)G(x)+F(x)G^\prime(x)\)
\([F(x)G(x)]|_{x=a}^b=\int_{a}^b[F^\prime(x)G(x)+F(x)G^\prime(x)]\text{d}x\)
Sample 5.7 Part 1 (1)
- Calculate \(\int_{0}^{\frac{\pi}{2}}e^x\sin x\text{d}x\) and \(\int_{0}^{\frac{\pi}{2}}e^x\cos x\text{d}x\)
Let \(I=\int_{0}^{\frac{\pi}{2}}e^x\sin x\text{d}x, J=\int_{0}^{\frac{\pi}{2}}e^x\cos x\text{d}x\)
Denote \(u=\sin x, \text{d}v=e^{x}\text{d}x\), then \(\text{d}x=\cos x, v=e^{x}\)
Thus
Thus \(I=e^{\frac{\pi}{2}}-J\).
Similarly, we can obtain
Thus \(J=-1+I\)
Thus we can conclude
Integration by substitution
Suppose \(\phi :[a, b]\subset\mathbb R\rightarrow \mathbb R\) is differentiable and its derivative \(\phi^\prime\) is continuous on \([a, b]\). For any real continuous function \(f\) on \(\phi([a, b])\), the substitution formula holds:
(comment: In the context of definite integrals, the substitution function is typically required to be monotonic.)
Proof Pro. 5.7 Part 2
Since \(f\) is continuous, by Part 1 of the Fundamental Theorem of Calculus, we can define
and have \(F^\prime(x)=f(x)\). By the hypothesis, the function \(\phi\) is differentiable, so that, by the chain rule, we have
Since \(f\) and \(\phi\) are continuous, the composition \(f(\phi(x))\) is continuous and therefore integrable. It follows from the Newton-Leibniz formula that
Pro. 5.8 The indefinite integrals of basic functions

Pro. 5.9 Linearity of the indefinite integral
For any two numbers \(\alpha\) and \(\beta\), the indefinite integral satisfies the linear equality
Theo. 5.10 Integration by parts and by substitution for the indefinite integral
Integration by parts
If \(f\) and \(g\) are differentiable functions, then
Integration by substitution
If \(f\) is continuous and \(\phi\) is differentiable, then
Theo. 5.11 Comparison Test for improper integrals (比较审敛法)
Suppose that \(f, g\in\mathscr{R}[a, t]\) for all \(t>a\) and that they satisfy \(0\leq f(x)\leq g(x)\) on \([a, \infty)\).
-
If \(\int_{a}^{\infty}g(x)\text{d}x\) converges, then \(\int_{a}^{\infty}f(x)\text{d}x\) converges.
-
If \(\int_{a}^{\infty}f(x)\text{d}x\) diverges, then \(\int_{a}^{\infty}g(x)\text{d}x\) diverges.
Coro. 5.11.1
Suppose \(f\in\mathscr{R}[a, t]\) for all \(t>a\).
-
If \(f\) satisfies \(0\leq f(x)\leq\frac{1}{x^p}\) on \([a, \infty)\) for some \(p>1\), then \(\int_{a}^{\infty} f(x)\text{d}x\) converges.
-
If \(f\) satisfies \(f(x)\geq\frac{1}{x^p}\) on \([a, \infty)\) for some \(0<p\leq 1\), then \(\int_{a}^{\infty} f(x)\text{d}x\) diverges.
Coro. 5.11.2 Limit Comparison Test for improper integrals
Suppose that \(f, g\in\mathscr{R}[a, t]\) for all \(t>a\), and that they are both non-negative on \([a, \infty)\) and satisfy
-
If \(L=0\), then \(\int_{a}^{\infty}f(x)\text{d}x\) converges if \(\int_{a}^{\infty}g(x)\text{d}x\) converges.
-
If \(0<L\) and \(L\) exists, then \(\int_{a}^{\infty}f(x)\text{d}x\) converges if and only if \(\int_{a}^{\infty}g(x)\text{d}x\) converges.
-
If \(L=\infty\), then \(\int_{a}^{\infty}f(x)\text{d}x\) diverges if and only if \(\int_{a}^{\infty}g(x)\text{d}x\) diverges.
Theo. 5.12 Absolute convergence of improper integrals (反常积分的绝对收敛性)
If \(\int_{a}^{\infty} |f(x)|\text{d}x\) converges, then \(\int_{a}^{\infty} f(x)\text{d}x\) also converges.
However, the converse does NOT hold.
Proof Pro. 5.12
If \(\int_{a}^{\infty}|f(x)|\text{d}x\) converges, then, by the Cauchy criterion, for every \(\epsilon>0\), there exists \(N\) s.t. for any \(t_1, t_2\geq N\),
Thus, for \(t_1, t_2\geq N\) (assuming \(t_1<t_2\)), we have
This means that the Cauchy criterion holds for the limit \(\lim_{t\rightarrow\infty}\int_{a}^{t}f(x)\text{d}x\).
Coro. 5.12.1
Suppose \(f, h:[a, \infty]\rightarrow \mathbb R\).
-
\(h\geq 0\), monotone decreasing, \(\lim_{x\rightarrow \infty}h(x)=0\)
-
\(|\int_{a}^{t}f(x)\text{d}x|\leq M, \forall t\in[a, +\infty)\)
Then,
Proof Coro. 5.12.1
Denote \(F(x)=\int_{a}^{x}f(u)\text{d}u\)
Since \(|F(x)|\leq M\), \(h^\prime(x)\leq 0\)
Thus for any \(\epsilon>0\), \(\exists N>0\) s.t. \(\forall t>N\), \(\left|\int_{a}^{t}|F(x)h^\prime(x)|\text{d}x-Mh(a)\right|\leq Mh(t)<\epsilon\).
Thus \(\int_{a}^{t}|F(x)h^\prime(x)|\text{d}x\) converges. Then from Theo. 5.12, \(\int_{a}^{t}F(x)h^\prime(x)\text{d}x\) also converges.
Since \(h(t)\) and \(F(t)\) also converges when \(t\rightarrow \infty\), we can obtain \(\int_{a}^{+\infty}f(x)h(x)\text{d}x\) converges.
Method
Indefinite Integral







Numerical Approximations (数值近似)
Trapezoidal rule (梯形法) & Midpoint rule (中点法)

Proof: error bound of the midpoint rule
\(g(h)\triangleq \int_{0}^hf\text{d}x-\frac{h(f(0)+f(h))}{2}\)
\(g^\prime(h)=f(h)-\frac{f^\prime(h)\cdot h}{2}-\frac{f(0)+f(h)}{2}=\frac{f(0)-f(h)}{2}-\frac{f^\prime(h)\cdot h}{2}\)
\(g^{\prime\prime}(h)=-\frac{f^{\prime\prime}(h)\cdot h}{2}\)
\(g^\prime(r)=g^\prime(0)+\int_{0}^r g^{\prime\prime}(t)\text{d}t=\int_{0}^r g^{\prime\prime}(t)\text{d}t\)
Proof: error bound of the trapezoidal rule
Take \(c=\frac{h}{2}\)
By Taylor expansion
for some \(\theta_x\in[0, x]\).
Thus,
Properties of the error bounds:
-
trade-off between cost & accuracy
-
round off error, not accounted
-
neat, i.e. explicit constant & non-asymptotic
-
If only \(f^\prime\) is continuous, all these rules has accuracy \(\sim O(\frac{1}{n})\)
-
curse of dimensionality
-
Monte-Carlo tackles curse of dimensionality
[csdn] 蒙特卡罗(Monte Carlo)方法简介 - wuguangbin1230
(Week) Law of Large Number
\(Z_1, \cdots, Z_M \stackrel{i.i.d.}{\sim} \text{distr.}\)
\(\bar{Z}=\frac{1}{M}\sum_{i=1}^{M}Z_i\)
\(\mathbb {E}[\bar{Z}]=\frac{\mathbb{E}[Z_1]}{M}\)
\(\text{VAR}[\bar{Z}]=\frac{\text{VAR}[Z_1]}{M}\)
\(\left|\frac{\sum_{1}^iZ_i}{M}-\mathbb{E}[Z_1]\right|\sim O(\frac{1}{\sqrt M})\) with high probability.
\(U\sim \text{Uni} f[0,1]^d, Z\triangleq f(U)\)
Simpson's rule for the numerical approximation of integrals (辛普森法)
Let \(f\) be an integrable function over \([a, b]\). For an even integer \(n\), divide the interval \([a, b]\) into \(n\) subintervals of equal length:
Simpson's rule is the approximation to \(\int_{a}^{b}f\text{d}x\):
Error bound of Simpson's rule:
Others
Irrationality of \(\pi\) (Ivan Niven 1947)
Suppose \(\pi=\frac{p}{q}\), for som \(p, q\in \mathbb {N}\).
\(f(x)\triangleq\frac{x^n(p-qx)^n}{n!}\)
\(I\triangleq \int_{0}^{\pi} f(x)\sin x\text{d}x\)
note that \(\max f(x)\) is attained at \(x^{*}=\frac{\left(\frac{p}{2}\right)^{2n}}{n!}\)
Thus \(0<I\leq f(x^{*})=\frac{\left(\frac{p}{2}\right)^{2n}}{n!}\stackrel{n \text{ is large enough}}{<} 1\), which conflicts with \(I\in N_{0}\)
Taylor expansion of \(\pi\)
\(\arctan(x)=\sum_{k=0}^{\infty}\frac{(-1)^kx^{2k+1}}{2k+1}\)
\(\arctan(1)=\frac{\pi}{4}\)
Approximate \(\pi\) with Monte-Carlo
\(\pi\approx \frac{22}{7}\)
Thus
Taylor expansion
Assuming \(f\in \mathscr{D}^{n+1} (I), a\in I\).
-
Cauthy Form
- by MVT, \(I_n=(x-a)(x-\theta)^nf^{(n+1)}(\theta)\) for some \(\theta\in[a, x]\)
-
Lagrange Form
- EMVT: \(f:I\rightarrow\mathbb{R}\), cont. on \(I\), \(\phi:I\rightarrow\mathbb{R}, \phi\geq 0\), integrable on \(I\) \(\Rightarrow\) \(\int_{a}^{b}f(t)\phi(t)\text{d}t=f(\theta)\int_{a}^{b}\phi(t)\text{d}t\) for some \(\theta\in I\).
- by EMVT, \(I_n=f^{(n+1)}(\theta)\int_{a}^{x}(x-t)^n\text{d}t=f^{(n+1)}(\theta)\cdot\frac{(x-a)^{n+1}}{n+1}\) for some \(\theta\in [a, x]\)
Cauthy Distribution
PDF:
Since \(\int_{0}^{\infty}\frac{x}{\pi(1+x^2)}=\frac{\lim_{t\rightarrow \infty} \ln t}{\pi}\) diverges, \(E[X]\) does not exist.
Euler's Formular
Proof
According to Taylor expansion:
Thus
Sample 1
-
\(\sin(x+y)=\sin x\cos y+\cos x\sin y\)
-
\(\cos(x+y)=\cos x\cos y-\sin x\sin y\)
Sample 2
Find \(\sum_{k=1}^n \sin(kx)\)
Solution
Integration in machine learning
Goal: Want to learn PDF \(p_{0}(\xi)\) from samples \((X_1, X_2, \cdots, X_m)\) with a parameter model \(p_{\theta}(\xi)\).
Assumption:
-
\(\lim_{\xi\rightarrow \pm\infty}p_{0}(\xi)=0\).
-
\(\psi_{0}, \psi_{\theta}, \psi_{\theta}^{\prime}\) are bounded for any \(\theta\).
-
\(\text{support } \psi_{\theta}\subseteq\text{support } p_{0}\)
-
\(\text{support } p_{\theta}\subseteq\text{support } p_{0}\)
- \(\text{support } h\triangleq \lbrace x\in\mathbb{R}|h(x)\neq 0\rbrace\)
Define objective function (目标函数) \(J(\theta)\):
where \(\psi_{0}(\xi)\triangleq\frac{\text{d}}{\text{d}\xi}\ln p_{0}(\xi), \psi_{\theta}(\xi)\triangleq\frac{\text{d}}{\text{d}\xi}\ln p_{\theta}(\xi)\)
-
Lemma 1:
-
If \(J(\theta^{*})=0\) for some \(\theta^{*}\), then \(\psi_{\theta^{*}}(\xi)=\psi_{0}(\xi)\) for any \(\xi \in \text{support } p_0\)
-
Proof:
-
By assumption, \(\log p_{\theta^{*}}(\xi)=\log p_{0}(\xi)+C\)
-
\(\because 1=\int_{-\infty}^{\infty}p_{\theta^{*}}(\xi)\text{d}\xi=e^C\cdot \int_{-\infty}^{\infty}p_{0}(\xi)\text{d}\xi=e^C\)
-
\(\therefore C=0\)
-
-
\(\psi_{\theta}(\xi)\) is known, and \(p_{0}(\xi)\) can be obtained by Monte-Carlo.
Since it is hard to obtain \(\psi_{0}(\xi)\), we should try to avoid calculating \(\psi_{0}(\xi)\).
Since for any \(\theta\), \(J(\theta)\) always contains \(\int_{-\infty}^{+\infty}p_{0}(\xi)\psi_{0}(\xi)^2\text{d}\xi\), we don't need to consider this one.
Thus we only need to consider \(\int_{-\infty}^{+\infty}p_{0}(\xi)\psi_{\theta}(\xi)\psi_{0}(\xi)\text{d}\xi\).
Thus
Dirichlet test
Given \(f, g: \mathbb{R}\rightarrow \mathbb{R}\).
-
\(g\geq 0\), monotone decreasing, \(\lim_{x\rightarrow \infty}g(x)=0\)
-
\(\exists M>0\), s.t. \(|\int_{0}^{t}f(x)\text{d}x|\leq M\) for any \(t>0\)
Then
Proof
- Firstly assume \(g^\prime\) converges.
Since \(|g(x)F(x)|\leq |g(x)||F(x)|\leq |g(x)|M\stackrel{x\rightarrow \infty}{\longrightarrow} 0\)
Thus \(g(x)F(x)|_{x=0}^{t}\) converges.
Using Cauchy critetion.
Since \(\forall \epsilon>0, \exists N>0\) s.t. for any \(t_1, t_2>N\), \(|g(t_1)-g(t_2)|<\frac{\epsilon}{M}\).
Thus \(\forall \epsilon>0, \exists N>0\) s.t. for any \(t_1, t_2>N\), \(\int_{t_1}^{t_2}F(x)g^\prime(x)\text{d}x\leq M|g(t_2)-g(t_1)|<\epsilon\)
Thus \(\int_{0}^{\infty}F(x)g^\prime(x)\text{d}x\) also converges.
Thus \(\int_{0}^{t}f(x)g(x)\text{d}x\) converges.
- Then assuming \(g\) may not be differentiable on \(\mathbb{R}\)
Using convolution to approximate.
use \(\phi_n\) s.t. \(\phi_n^\prime\) continuous, \(\text{support} \phi_n, \phi_n^{\prime}\subseteq [-\frac{1}{n}, \frac{1}{n}]\)
Suppose \(\int_{-\infty}^{\infty}\phi_{n}=1\) and \(\phi_{n}\) is non-negative.
Observation:
is monotone decreasing and has contiuous derivative.
By the previous part, we can obtain \(\int_{0}^{\infty}\phi_n*g \cdot f\) converges.
As
We can approximately obtain \(\lim_{n\rightarrow \infty}\phi_{n}(x)\times g=g\) (need more work here to rigorously prove this equation).
Thus we can obtain \(\int_{0}^{\infty}g \cdot f\) converges.
eg: \(\int_{1}^{\infty}\frac{\cos x}{x}\text{d}x\)
Abel test
-
\(\int_{0}^{\infty} f(x)\text{d}x\) converges.
-
h is bounded and monotone
Then \(\int_{0}^{\infty} f(x)h(x)\text{d}x\) converges.
Calculation for \(\int \sqrt{t-x^2}\text{d}x\)
\(u=\arcsin(\frac{x}{\sqrt t}), \text{d}x=\sqrt{t}\cos u\text{d}u\)
\(y=2\arcsin(\frac{x}{\sqrt t}), \sin (\frac{y}{2})=\frac{x}{\sqrt t}, \cos (\frac{y}{2})=\frac{\sqrt{t-x^2}}{\sqrt t}\)
\(\sin y=2\sin(\frac{y}{2})\cos(\frac{y}{2})=2\cdot \frac{x}{\sqrt t}\cdot \frac{\sqrt{t-x^2}}{\sqrt t}=\frac{2x\sqrt{t-x^2}}{t}\)
Calculation for \(\int \sqrt{t+x^2}\text{d}x\)
\(u=\arctan(\frac{x}{\sqrt t}), \text{d}x=\frac{\sqrt{t}}{\cos^2 u}\text{d}u\)
Since
(take \(p=\sec^{n-2}x\), \(q=\tan x\) and apply integration by parts.)
we can obtain
\(w=\sec u+\tan u, \frac{\text{d}w}{\text{d}u}=\sec u\tan u+\sec^2\)

浙公网安备 33010602011771号