Skip to content
Date: Oct 2, 2026
Builds on Chapter 3 and Chapter 6.

In a calculus course the integral of \(f\) from \(a\) to \(b\) is computed as \(F(b)-F(a)\) , where \(F\) is an antiderivative of \(f\) . As a method this is excellent. As a definition it fails on three counts. It says nothing when no antiderivative is known, or when none exists. It does not explain why the number obtained should be the area under the graph. And it makes the Fundamental Theorem of Calculus true by decree, when it ought to be a theorem connecting two independently defined things.

So the integral has to be defined without mentioning derivatives. The idea is as old as Archimedes: trap the area between sums of rectangles that overestimate it and sums that underestimate it, and call the function integrable if the two kinds of estimate can be forced together. Then one must ask which functions are integrable. Some bounded functions are not. Continuous functions are, and the reason is uniform continuity. With the integral in hand, the Fundamental Theorem becomes a statement with hypotheses and a proof, and its hypotheses turn out to matter.

7.1 Upper and lower sums

Throughout, \(f\) is a bounded real function on a closed bounded interval \([a,b]\) with \(a<b\) . Boundedness is needed for the definitions to make sense.

Definition 7.1 (partition, upper and lower sums). A partition of \([a,b]\) is a finite set \(P=\{x_0,x_1,\dots,x_n\}\) with \(a=x_0<x_1<\dots<x_n=b\) . Write \(\Delta x_i=x_i-x_{i-1}\) and

\[ m_i=\inf\{f(x):x_{i-1}\le x\le x_i\},\qquad M_i=\sup\{f(x):x_{i-1}\le x\le x_i\}. \]

The lower sum and upper sum of \(f\) for \(P\) are

\[ L(f,P)=\sum_{i=1}^nm_i\,\Delta x_i,\qquad U(f,P)=\sum_{i=1}^nM_i\,\Delta x_i . \]

Clearly \(L(f,P)\le U(f,P)\) . The lower sum is the total area of rectangles lying under the graph and the upper sum of rectangles containing it, at least when \(f\ge 0\) . A partition \(Q\) is a refinement of \(P\) if \(P\subseteq Q\) .

Lemma 7.2 (refining a partition). If \(Q\) is a refinement of \(P\) , then

\[ L(f,P)\le L(f,Q)\le U(f,Q)\le U(f,P). \]

Proof. It suffices to treat the case where \(Q\) has one more point than \(P\) , say \(x^*\) with \(x_{i-1}<x^*<x_i\) ; the general case follows by adding points one at a time. Let \(m'\) and \(m''\) be the infima of \(f\) over \([x_{i-1},x^*]\) and \([x^*,x_i]\) . Both are infima over subsets of \([x_{i-1},x_i]\) , so \(m'\ge m_i\) and \(m''\ge m_i\) . Hence

\[ m'(x^*-x_{i-1})+m''(x_i-x^*)\ge m_i(x^*-x_{i-1})+m_i(x_i-x^*)=m_i\,\Delta x_i . \]

All other terms of the lower sum are unchanged, so \(L(f,Q)\ge L(f,P)\) . The argument for upper sums is the same with suprema, which can only decrease.

Lemma 7.3 (lower sums lie below upper sums). For any two partitions \(P\) and \(Q\) of \([a,b]\) , \(L(f,P)\le U(f,Q)\) .

Proof. The partition \(P\cup Q\) refines both. By Lemma 7.2, \(L(f,P)\le L(f,P\cup Q)\le U(f,P\cup Q)\le U(f,Q)\) .

So every lower sum is a lower bound for the set of all upper sums, whatever partitions are used. This is exactly the situation of Proposition 1.15(d).

Definition 7.4 (Riemann integral). The lower integral and upper integral of \(f\) on \([a,b]\) are

\[ L(f)=\sup\{L(f,P):P\text{ a partition}\},\qquad U(f)=\inf\{U(f,P):P\text{ a partition}\}. \]

By Lemma 7.3, \(L(f)\le U(f)\) . The function \(f\) is Riemann integrable on \([a,b]\) if \(L(f)=U(f)\) ; the common value is the integral of \(f\) , written

\[ \int_a^bf\qquad\text{or}\qquad\int_a^bf(x)\,dx . \]

The set of Riemann integrable functions on \([a,b]\) is denoted \(\mathcal R[a,b]\) .

This formulation by upper and lower sums is due to Darboux. Riemann’s original definition used sums \(\sum f(t_i)\Delta x_i\) with arbitrary sample points; Section 7.4 shows the two agree.

Example 7.1: The integral of the squaring function from the definition

Let \(f(x)=x^2\) on \([0,1]\) and let \(P_n\) be the partition into \(n\) equal pieces, \(x_i=i/n\) . Since \(f\) is increasing, \(m_i=f(x_{i-1})\) and \(M_i=f(x_i)\) . Using \(\sum_{k=1}^nk^2=n(n+1)(2n+1)/6\) ,

\[ U(f,P_n)=\frac1n\sum_{i=1}^n\frac{i^2}{n^2}=\frac{(n+1)(2n+1)}{6n^2},\qquad L(f,P_n)=\frac1n\sum_{i=1}^{n}\frac{(i-1)^2}{n^2}=\frac{(n-1)(2n-1)}{6n^2}. \]

For \(n=4\) these are \(U=15/32=0.46875\) and \(L=7/32=0.21875\) . In general \(U(f,P_n)-L(f,P_n)=1/n\) , and both sums tend to \(1/3\) .

Now the definition does the rest. For every \(n\) ,

\[ L(f,P_n)\le L(f)\le U(f)\le U(f,P_n). \]

The outer terms converge to \(1/3\) , so \(L(f)=U(f)=1/3\) . Hence \(f\) is integrable and \(\int_0^1x^2\,dx=1/3\) , with no antiderivative in sight.

Two panels showing the parabola y equals x squared on the interval from 0 to 1 with lower rectangles under the curve and upper rectangles above it, for four and for sixteen equal subintervals; the strips between lower and upper rectangles are highlighted and labelled with the gap one quarter and one sixteenth.
Figure 7.1. Upper and lower sums for the squaring function. The highlighted gap between them, slid sideways, stacks into a single column of height f(1) minus f(0) and width 1/n, so it equals 1/n and can be made as small as desired. The same picture proves that every monotone function is integrable.

Example 7.2: A bounded function with no integral

Let \(D\) be Dirichlet’s function on \([0,1]\) : \(D(x)=1\) for rational \(x\) and \(0\) for irrational \(x\) . Every interval \([x_{i-1},x_i]\) of positive length contains a rational and an irrational number, so \(m_i=0\) and \(M_i=1\) for every partition. Hence \(L(D,P)=0\) and \(U(D,P)=1\) for all \(P\) , so \(L(D)=0<1=U(D)\) . The function is bounded and not Riemann integrable. No refinement of the partition helps, because the function oscillates fully on every interval, however short.

7.2 Which functions are integrable

To prove integrability one rarely computes \(L(f)\) and \(U(f)\) . One shows that upper and lower sums for the same partition can be made close.

Theorem 7.5 (Riemann’s criterion). A bounded function \(f\) on \([a,b]\) is integrable if and only if for every \(\varepsilon>0\) there is a partition \(P\) with

\[ U(f,P)-L(f,P)<\varepsilon . \]

Proof. If the condition holds, then \(0\le U(f)-L(f)\le U(f,P)-L(f,P)<\varepsilon\) for every \(\varepsilon>0\) , so \(U(f)=L(f)\) . Conversely, let \(f\) be integrable with integral \(A\) and let \(\varepsilon>0\) . By the definitions of supremum and infimum there are partitions \(P_1\) and \(P_2\) with \(L(f,P_1)>A-\varepsilon/2\) and \(U(f,P_2)<A+\varepsilon/2\) . For \(P=P_1\cup P_2\) , Lemma 7.2 gives \(U(f,P)-L(f,P)\le U(f,P_2)-L(f,P_1)<\varepsilon\) .

The difference has a useful form:

\[ U(f,P)-L(f,P)=\sum_{i=1}^n(M_i-m_i)\,\Delta x_i , \]

where \(M_i-m_i\) is the oscillation of \(f\) on the \(i\) th subinterval. The criterion asks for the oscillation to be small on most of the interval, measured by length. Moreover, as in Example 7.1, if \((P_n)\) is a sequence of partitions with \(U(f,P_n)-L(f,P_n)\to 0\) , then \(f\) is integrable and both \(U(f,P_n)\) and \(L(f,P_n)\) converge to \(\int_a^bf\) .

Theorem 7.6 (continuous functions are integrable). Every continuous function on \([a,b]\) is Riemann integrable.

Proof. Let \(f\) be continuous on \([a,b]\) . It is bounded by the Extreme Value Theorem and uniformly continuous by the Heine–Cantor theorem. Let \(\varepsilon>0\) and choose \(\delta>0\) such that \(\lvert f(x)-f(y)\rvert<\varepsilon/(b-a)\) whenever \(\lvert x-y\rvert<\delta\) . Let \(P\) be any partition with every \(\Delta x_i<\delta\) . On the compact interval \([x_{i-1},x_i]\) the function attains its supremum \(M_i\) and its infimum \(m_i\) , at two points less than \(\delta\) apart; so \(M_i-m_i<\varepsilon/(b-a)\) . Therefore

\[ U(f,P)-L(f,P)=\sum_{i=1}^n(M_i-m_i)\,\Delta x_i<\frac{\varepsilon}{b-a}\sum_{i=1}^n\Delta x_i=\varepsilon , \]

and \(f\) is integrable by Theorem 7.5.

Uniform continuity is exactly what the proof needs: one \(\delta\) that controls the oscillation on all the subintervals at once. With pointwise continuity alone, each subinterval would demand its own fineness and there would be no way to choose the partition.

Theorem 7.7 (monotone functions are integrable). Every monotone function on \([a,b]\) is Riemann integrable.

Proof. Let \(f\) be increasing; it is bounded, by \(f(a)\) and \(f(b)\) . For the partition into \(n\) equal pieces, \(m_i=f(x_{i-1})\) and \(M_i=f(x_i)\) , so the sum telescopes:

\[ U(f,P_n)-L(f,P_n)=\frac{b-a}{n}\sum_{i=1}^n\bigl(f(x_i)-f(x_{i-1})\bigr)=\frac{(b-a)\,(f(b)-f(a))}{n}. \]

This is less than \(\varepsilon\) for large \(n\) . For decreasing \(f\) consider \(-f\) , using Theorem 7.9 below, or repeat the argument.

A monotone function can have infinitely many discontinuities, though at most countably many (Exercise 5.21): the function on \([0,1]\) equal to \(0\) at \(0\) and to \(1/n\) on each interval \((1/(n+1),1/n]\) is increasing and jumps at every point \(1/n\) with \(n\ge 2\) . So integrability does not require continuity. How much discontinuity can be tolerated?

Theorem 7.8 (finitely many discontinuities). A bounded function on \([a,b]\) that is continuous except at finitely many points is Riemann integrable.

Proof. Let \(\lvert f\rvert\le M\) with \(M>0\) , let \(c_1<\dots<c_k\) be the points of discontinuity, and let \(\varepsilon>0\) . Enclose each \(c_j\) in an interval \(I_j=[c_j-\eta,c_j+\eta]\cap[a,b]\) , with \(\eta>0\) so small that the \(I_j\) are disjoint and \(2\eta k<\varepsilon/(4M)\) . Removing the interiors of the \(I_j\) (relative to \([a,b]\) ) from \([a,b]\) leaves finitely many closed intervals \(J_1,\dots,J_r\) , with \(r\le k+1\) , on each of which \(f\) is continuous. By Theorems 7.6 and 7.5 each \(J_s\) has a partition \(Q_s\) with \(U(f,Q_s)-L(f,Q_s)<\varepsilon/(2r)\) . Let \(P\) consist of all points of all the \(Q_s\) together with the endpoints of the \(I_j\) . In \(U(f,P)-L(f,P)\) , the subintervals inside the \(J_s\) contribute less than \(r\cdot\varepsilon/(2r)=\varepsilon/2\) , and each \(I_j\) contributes at most its oscillation, at most \(2M\) , times its length, at most \(2\eta\) ; together at most \(2M\cdot 2\eta k<\varepsilon/2\) . So \(U(f,P)-L(f,P)<\varepsilon\) .

The proof isolates the bad points in intervals of small total length, where the oscillation may be large but the length is negligible, and controls the oscillation everywhere else. The same strategy handles a function with infinitely many discontinuities, provided they can be confined in this way.

Example 7.3: Thomae’s function is integrable

Recall the function \(T\) of Example 5.2: \(T(p/q)=1/q\) in lowest terms, \(T(x)=0\) for irrational \(x\) . It is discontinuous at every rational point. We show that \(T\) is integrable on \([0,1]\) with integral \(0\) .

Every interval contains irrationals, so every lower sum is \(0\) . For the upper sums let \(\varepsilon>0\) . The set \(E\) of points of \([0,1]\) where \(T(x)\ge\varepsilon/2\) consists of the fractions with denominator at most \(2/\varepsilon\) , so it is finite; say it has \(N\) points. Choose a partition \(P\) in which each point of \(E\) lies in a subinterval of length less than \(\varepsilon/(2N)\) , no point of \(E\) other than \(0\) and \(1\) is a partition point, and no subinterval contains two points of \(E\) . Then exactly \(N\) subintervals meet \(E\) ; their total length is less than \(\varepsilon/2\) , and on them \(M_i\le 1\) . On every other subinterval \(M_i\le\varepsilon/2\) , and their total length is at most \(1\) . So

\[ U(T,P)<1\cdot\frac\varepsilon2+\frac\varepsilon2\cdot 1=\varepsilon . \]

Hence \(U(T)=0=L(T)\) and \(\int_0^1T=0\) .

With numbers: for \(\varepsilon=0.2\) the set \(E\) is the set of fractions in \([0,1]\) with denominator at most \(10\) . There are \(33\) of them. Putting each in a subinterval of length less than \(0.1/33\) gives an upper sum below \(0.2\) .

So a function can be discontinuous on a dense set and still be integrable, while Dirichlet’s function, discontinuous everywhere, is not. The precise boundary is known. Say that a set \(E\subseteq\mathbb R\) has measure zero if for every \(\varepsilon>0\) it can be covered by countably many open intervals whose lengths have sum less than \(\varepsilon\) . Finite sets, countable sets such as \(\mathbb Q\) , and the Cantor set have measure zero. Lebesgue’s criterion states that a bounded function on \([a,b]\) is Riemann integrable if and only if its set of discontinuities has measure zero. We do not prove it; it belongs with the theory of measure developed in Measure Theory, which also replaces the Riemann integral by one that can integrate Dirichlet’s function. Theorems 7.6 to 7.8 and Example 7.3 are special cases, and they are all this book uses.

Common mistake. Assuming that every bounded function on \([a,b]\) has an integral, or conversely that only continuous functions do. Dirichlet’s function refutes the first belief and Thomae’s the second. Before writing \(\int_a^bf\) for a function that is not continuous or monotone, check integrability with Theorem 7.5.

7.3 Properties of the integral

Theorem 7.9 (linearity and order). Let \(f,g\in\mathcal R[a,b]\) and \(c\in\mathbb R\) . Then \(f+g\) and \(cf\) are integrable, with

\[ \int_a^b(f+g)=\int_a^bf+\int_a^bg,\qquad\int_a^bcf=c\int_a^bf . \]

If \(f(x)\le g(x)\) for all \(x\) , then \(\int_a^bf\le\int_a^bg\) .

Proof. Sum. On any subinterval, the infimum of \(f\) plus the infimum of \(g\) is a lower bound for the values of \(f+g\) , and similarly for suprema (compare Example 1.5). Hence for every partition \(P\) ,

\[ L(f,P)+L(g,P)\le L(f+g,P)\le U(f+g,P)\le U(f,P)+U(g,P). \]

Let \(\varepsilon>0\) . By Theorem 7.5 and Lemma 7.2 there is a single partition \(P\) with \(U(f,P)-L(f,P)<\varepsilon/2\) and \(U(g,P)-L(g,P)<\varepsilon/2\) . Then \(U(f+g,P)-L(f+g,P)<\varepsilon\) , so \(f+g\) is integrable. Moreover \(\int(f+g)\le U(f+g,P)\le U(f,P)+U(g,P)<\int f+\int g+\varepsilon\) , and symmetrically \(\int(f+g)>\int f+\int g-\varepsilon\) . As \(\varepsilon\) is arbitrary, equality follows.

Multiple. If \(c\ge 0\) , then \(U(cf,P)=cU(f,P)\) and \(L(cf,P)=cL(f,P)\) by Proposition 1.15(c). If \(c<0\) , then \(U(cf,P)=cL(f,P)\) and \(L(cf,P)=cU(f,P)\) , since multiplying by a negative number exchanges suprema and infima (Exercise 1.6). In both cases \(U(cf,P)-L(cf,P)=\lvert c\rvert(U(f,P)-L(f,P))\) , and taking infima and suprema over \(P\) gives the formula.

Order. If \(f\le g\) , then \(L(f,P)\le L(g,P)\) for every \(P\) , and taking suprema gives the inequality.

Theorem 7.10 (additivity over intervals). Let \(a<c<b\) . A bounded function \(f\) is integrable on \([a,b]\) if and only if it is integrable on \([a,c]\) and on \([c,b]\) , and then

\[ \int_a^bf=\int_a^cf+\int_c^bf . \]

Proof. A partition \(P\) of \([a,b]\) that contains \(c\) splits into partitions \(P'\) of \([a,c]\) and \(P''\) of \([c,b]\) , with \(U(f,P)=U(f,P')+U(f,P'')\) and likewise for lower sums; conversely any \(P'\) and \(P''\) combine into such a \(P\) . If \(f\in\mathcal R[a,b]\) and \(\varepsilon>0\) , take \(P\) with \(U(f,P)-L(f,P)<\varepsilon\) ; adding the point \(c\) keeps this true, and then each of \(U(f,P')-L(f,P')\) and \(U(f,P'')-L(f,P'')\) is less than \(\varepsilon\) . If \(f\) is integrable on both pieces, choose \(P'\) and \(P''\) with differences below \(\varepsilon/2\) and combine. For the formula, both \(\int_a^bf\) and \(\int_a^cf+\int_c^bf\) lie between \(L(f,P')+L(f,P'')\) and \(U(f,P')+U(f,P'')\) , numbers that differ by less than \(\varepsilon\) .

It is convenient to set \(\int_a^af=0\) and \(\int_b^af=-\int_a^bf\) . With these conventions the additivity formula holds for any three points \(a,b,c\) of an interval on which \(f\) is integrable, in any order.

Theorem 7.11 (compositions, absolute values, products). Let \(f\in\mathcal R[a,b]\) with values in \([m,M]\) , and let \(\varphi:[m,M]\to\mathbb R\) be Lipschitz. Then \(\varphi\circ f\in\mathcal R[a,b]\) . In particular, \(\lvert f\rvert\) and \(f^2\) are integrable, the product of two integrable functions is integrable, and

\[ \Bigl\lvert\int_a^bf\Bigr\rvert\le\int_a^b\lvert f\rvert\le(b-a)\,\sup_{[a,b]}\lvert f\rvert . \]

Proof. For a bounded function \(h\) on a set \(S\) , the oscillation \(\sup_Sh-\inf_Sh\) equals \(\sup\{\lvert h(x)-h(y)\rvert:x,y\in S\}\) : each difference \(h(x)-h(y)\) is at most \(\sup_Sh-\inf_Sh\) , and by Lemma 1.6 differences come within any \(\varepsilon\) of it. Let \(K\) be a Lipschitz constant for \(\varphi\) . For \(x,y\) in a subinterval of a partition \(P\) , \(\lvert\varphi(f(x))-\varphi(f(y))\rvert\le K\lvert f(x)-f(y)\rvert\le K(M_i-m_i)\) . So the oscillation of \(\varphi\circ f\) on each subinterval is at most \(K\) times that of \(f\) , and

\[ U(\varphi\circ f,P)-L(\varphi\circ f,P)\le K\bigl(U(f,P)-L(f,P)\bigr). \]

Theorem 7.5 now gives the integrability of \(\varphi\circ f\) . Take \(\varphi(t)=\lvert t\rvert\) , with \(K=1\) , and \(\varphi(t)=t^2\) , which is Lipschitz on a bounded interval. For products use \(fg=\tfrac14\bigl((f+g)^2-(f-g)^2\bigr)\) and Theorem 7.9. Finally \(-\lvert f\rvert\le f\le\lvert f\rvert\) gives \(-\int\lvert f\rvert\le\int f\le\int\lvert f\rvert\) by the order property, and \(\lvert f\rvert\le\sup\lvert f\rvert\) gives the last inequality.

The converse of the statement about \(\lvert f\rvert\) is false: the function equal to \(1\) on the rationals and \(-1\) on the irrationals is not integrable, while its absolute value is constant.

7.4 Riemann sums

Definition 7.12 (tagged partition, Riemann sum, mesh). A tagged partition is a partition \(P=\{x_0,\dots,x_n\}\) together with points \(t_i\in[x_{i-1},x_i]\) . Its Riemann sum for \(f\) is \(S(f,P,t)=\sum_{i=1}^nf(t_i)\,\Delta x_i\) . The mesh of \(P\) is \(\lVert P\rVert=\max_i\Delta x_i\) .

Since \(m_i\le f(t_i)\le M_i\) , every Riemann sum satisfies \(L(f,P)\le S(f,P,t)\le U(f,P)\) .

Theorem 7.13 (Riemann sums converge to the integral). Let \(f\in\mathcal R[a,b]\) . For every \(\varepsilon>0\) there is a \(\delta>0\) such that for every tagged partition with \(\lVert P\rVert<\delta\) ,

\[ \Bigl\lvert S(f,P,t)-\int_a^bf\Bigr\rvert<\varepsilon . \]

Proof. Both \(S(f,P,t)\) and \(\int_a^bf\) lie between \(L(f,P)\) and \(U(f,P)\) , so it suffices to find \(\delta\) such that \(\lVert P\rVert<\delta\) implies \(U(f,P)-L(f,P)<\varepsilon\) . Let \(\lvert f\rvert\le M\) with \(M>0\) . By Theorem 7.5 fix a partition \(P_0\) , with \(k+1\) points, such that \(U(f,P_0)-L(f,P_0)<\varepsilon/2\) , and put \(\delta=\varepsilon/(8kM)\) .

Let \(P\) be a partition with \(\lVert P\rVert<\delta\) and let \(Q=P\cup P_0\) . Then \(Q\) refines \(P_0\) , so \(U(f,Q)-L(f,Q)<\varepsilon/2\) . On the other hand \(Q\) is obtained from \(P\) by inserting at most \(k\) points. Inserting one point into a subinterval of \(P\) changes the upper sum only in that subinterval, replacing a term \(M_i\Delta x_i\) by a sum of two terms that differs from it by at most \(2M\Delta x_i<2M\delta\) ; the same holds for lower sums. Hence

\[ 0\le U(f,P)-U(f,Q)\le 2Mk\delta,\qquad 0\le L(f,Q)-L(f,P)\le 2Mk\delta . \]

Adding, \(U(f,P)-L(f,P)\le U(f,Q)-L(f,Q)+4Mk\delta<\varepsilon/2+\varepsilon/2\) .

Consequently, for an integrable function, \(\int_a^bf\) is the limit of the Riemann sums for any sequence of tagged partitions whose mesh tends to \(0\) , for instance equal subdivisions with left endpoints, right endpoints, or midpoints as tags. Many limits of sums can be recognised as integrals in this way; Example 7.6 is one.

7.5 The Fundamental Theorem of Calculus

There are two theorems, one for each order in which differentiation and integration can be performed.

Theorem 7.14 (differentiating an integral). Let \(f\in\mathcal R[a,b]\) and define \(F(x)=\int_a^xf\) for \(x\in[a,b]\) . Then \(F\) is Lipschitz, hence continuous, on \([a,b]\) . If \(f\) is continuous at a point \(c\in[a,b]\) , then \(F\) is differentiable at \(c\) and \(F'(c)=f(c)\) .

Proof. Let \(\lvert f\rvert\le M\) . For \(x<y\) in \([a,b]\) , Theorems 7.10 and 7.11 give \(\lvert F(y)-F(x)\rvert=\bigl\lvert\int_x^yf\bigr\rvert\le M(y-x)\) . So \(F\) is Lipschitz.

Let \(f\) be continuous at \(c\) and \(\varepsilon>0\) . Choose \(\delta>0\) with \(\lvert f(t)-f(c)\rvert<\varepsilon\) for \(t\in[a,b]\) , \(\lvert t-c\rvert<\delta\) . For \(x\in[a,b]\) with \(0<\lvert x-c\rvert<\delta\) , since \(\int_c^xf(c)\,dt=f(c)(x-c)\) ,

\[ \frac{F(x)-F(c)}{x-c}-f(c)=\frac{1}{x-c}\int_c^x\bigl(f(t)-f(c)\bigr)\,dt . \]

The integrand has absolute value at most \(\varepsilon\) between \(c\) and \(x\) , so the right side has absolute value at most \(\varepsilon\) . Hence the difference quotient tends to \(f(c)\) .

Theorem 7.15 (integrating a derivative). Let \(F\) be continuous on \([a,b]\) and differentiable on \((a,b)\) , and let \(f\in\mathcal R[a,b]\) satisfy \(F'(x)=f(x)\) for all \(x\in(a,b)\) . Then

\[ \int_a^bf=F(b)-F(a). \]

Proof. Let \(P=\{x_0,\dots,x_n\}\) be any partition. By the Mean Value Theorem on each \([x_{i-1},x_i]\) there are points \(t_i\in(x_{i-1},x_i)\) with \(F(x_i)-F(x_{i-1})=f(t_i)\,\Delta x_i\) . Summing, the left side telescopes:

\[ F(b)-F(a)=\sum_{i=1}^nf(t_i)\,\Delta x_i , \]

a Riemann sum for \(P\) . Therefore \(L(f,P)\le F(b)-F(a)\le U(f,P)\) for every partition \(P\) . Taking the supremum on the left and the infimum on the right, \(L(f)\le F(b)-F(a)\le U(f)\) , and since \(f\) is integrable both ends equal \(\int_a^bf\) .

Combining the two: a continuous function \(f\) on \([a,b]\) has an antiderivative, namely \(F(x)=\int_a^xf\) ; any other antiderivative differs from it by a constant, by Corollary 6.8(a); and the integral is the change in any antiderivative. This is the bridge that Calculus uses computationally (math.calculus.fundamental-theorem-bridge). Here the hypotheses are visible. Theorem 7.14 needs continuity of \(f\) at the point. Theorem 7.15 needs \(f\) to be integrable, which does not follow from its being a derivative. The next example shows both hypotheses failing.

Example 7.4: Where the two theorems stop

An integrable function with no antiderivative. On \([0,2]\) let \(f(x)=0\) for \(x<1\) and \(f(x)=1\) for \(x\ge 1\) . It has one discontinuity, so it is integrable, and \(F(x)=\int_0^xf\) equals \(0\) for \(x\le 1\) and \(x-1\) for \(x\ge 1\) . This \(F\) is continuous, as Theorem 7.14 promises, and differentiable with \(F'=f\) at every point except \(1\) , where \(f\) is discontinuous and the graph of \(F\) has a corner: the one-sided difference quotients are \(0\) and \(1\) . No function at all has derivative \(f\) on \([0,2]\) , because \(f\) skips the values between \(0\) and \(1\) , which Darboux’s theorem forbids for a derivative.

A derivative that is not integrable. Let \(G(x)=x^2\sin(1/x^2)\) for \(x\ne 0\) and \(G(0)=0\) . As in Example 6.2, \(G\) is differentiable everywhere, with \(G'(0)=0\) and

\[ G'(x)=2x\sin(1/x^2)-\frac2x\cos(1/x^2)\qquad(x\ne 0). \]

At \(x_n=1/\sqrt{2\pi n}\) this equals \(-2\sqrt{2\pi n}\) , which is about \(-50.13\) for \(n=100\) and unbounded as \(n\to\infty\) . So \(G'\) is unbounded on \([0,1]\) and therefore not Riemann integrable there, and \(\int_0^1G'\) has no meaning in this theory, although \(G(1)-G(0)=\sin 1\) is a perfectly good number.

Theorem 7.16 (integration by parts and substitution). (a) Let \(F\) and \(G\) be differentiable on \([a,b]\) with \(F'=f\) and \(G'=g\) both in \(\mathcal R[a,b]\) . Then

\[ \int_a^bF\,g=F(b)G(b)-F(a)G(a)-\int_a^bf\,G . \]

(b) Let \(\varphi:[\alpha,\beta]\to\mathbb R\) have a continuous derivative, and let \(f\) be continuous on an interval containing \(\varphi([\alpha,\beta])\) . Then

\[ \int_\alpha^\beta f(\varphi(t))\,\varphi'(t)\,dt=\int_{\varphi(\alpha)}^{\varphi(\beta)}f(x)\,dx . \]

Proof. (a) \(F\) and \(G\) are continuous, hence integrable, so \(Fg\) and \(fG\) are integrable by Theorem 7.11, and \((FG)'=fG+Fg\) by the product rule. Apply Theorem 7.15 to \(FG\) and use linearity. (b) Let \(\Phi(x)=\int_{\varphi(\alpha)}^xf\) on the interval where \(f\) is continuous; by Theorem 7.14, \(\Phi'=f\) there. By the chain rule \((\Phi\circ\varphi)'(t)=f(\varphi(t))\varphi'(t)\) , a continuous and hence integrable function of \(t\) . Theorem 7.15 gives the left side as \(\Phi(\varphi(\beta))-\Phi(\varphi(\alpha))=\int_{\varphi(\alpha)}^{\varphi(\beta)}f\) .

The first use we make of the Fundamental Theorem is to construct two functions that the book has so far borrowed from calculus.

Definition 7.17 (logarithm). For \(x>0\) , the natural logarithm of \(x\) is

\[ \log x=\int_1^x\frac{dt}{t}. \]

Proposition 7.18 (properties of the logarithm and the exponential). (a) \(\log\) is differentiable on \((0,\infty)\) with derivative \(1/x\) ; it is strictly increasing, and \(\log 1=0\) . (b) \(\log(xy)=\log x+\log y\) for all \(x,y>0\) . (c) \(\log\) maps \((0,\infty)\) onto \(\mathbb R\) . (d) Its inverse \(\exp:\mathbb R\to(0,\infty)\) is differentiable with \(\exp'=\exp\) , and \(\exp(u+v)=\exp(u)\exp(v)\) .

Proof. (a) The integrand \(1/t\) is continuous on \((0,\infty)\) , so Theorem 7.14 applies on every closed bounded subinterval; a positive derivative gives strict monotonicity by Corollary 6.8(b). (b) Fix \(y>0\) and let \(h(x)=\log(xy)-\log x\) . By the chain rule \(h'(x)=y/(xy)-1/x=0\) , so \(h\) is constant on the interval \((0,\infty)\) , equal to \(h(1)=\log y\) . (c) The lower sum of \(1/t\) on \([1,2]\) for the trivial partition is \(\tfrac12\) , so \(\log 2\ge\tfrac12>0\) . By (b), \(\log(2^n)=n\log 2\) and \(\log(2^{-n})=-n\log 2\) , so \(\log\) takes arbitrarily large and arbitrarily negative values; being continuous on an interval, it takes every real value by Corollary 5.8. (d) By Theorems 5.10 and 6.14 the inverse is differentiable with \(\exp'(u)=1/\log'(\exp u)=\exp u\) . If \(x=\exp u\) and \(y=\exp v\) , then \(\log(xy)=u+v\) by (b), that is, \(xy=\exp(u+v)\) .

We write \(e=\exp(1)\) , and for \(a>0\) and real \(r\) we define \(a^r=\exp(r\log a)\) ; by (b) this agrees with the earlier meaning of \(a^r\) when \(r\) is rational, and with it Corollary 3.10 and its proof extend to all real exponents. From here on the logarithm and the exponential are no longer borrowed.

Example 7.5: Trapping a logarithm between sums

By definition \(\log 2=\int_1^2dt/t\) , and the integrand is decreasing, so on each subinterval the supremum is at the left end and the infimum at the right end. For the partition \(\{1,\tfrac32,2\}\) ,

\[ L=\tfrac12\cdot\tfrac23+\tfrac12\cdot\tfrac12=\tfrac7{12}\approx 0.5833,\qquad U=\tfrac12\cdot 1+\tfrac12\cdot\tfrac23=\tfrac56\approx 0.8333 . \]

So \(0.5833<\log 2<0.8333\) . With \(n\) equal pieces the gap is \((1-\tfrac12)/n\) by the formula in Theorem 7.7; to bring the gap down to \(0.001\) in this way takes \(n=500\) pieces. The actual value is \(0.693147\) to six places.

Example 7.6: The sum of the alternating harmonic series

Chapter 3 left open the value of \(s=1-\tfrac12+\tfrac13-\tfrac14+\cdots\) . Recall from Example 3.7 that the partial sums of even order are \(s_{2n}=H_{2n}-H_n\) , that is,

\[ s_{2n}=\frac1{n+1}+\frac1{n+2}+\cdots+\frac1{2n}=\frac1n\sum_{k=1}^n\frac{1}{1+k/n}. \]

The right side is the Riemann sum of the continuous function \(1/(1+x)\) on \([0,1]\) for the partition into \(n\) equal pieces with right endpoints as tags. By Theorem 7.13 it converges to \(\int_0^1dx/(1+x)\) , and by the substitution \(t=1+x\) that integral is \(\int_1^2dt/t=\log 2\) . Since \((s_N)\) converges, its limit is the limit of the subsequence \((s_{2n})\) :

\[ 1-\frac12+\frac13-\frac14+\cdots=\log 2 . \]

Numerically \(s_{20}\approx 0.668771\) , \(s_{200}\approx 0.690653\) , and \(s_{2000}\approx 0.692897\) , approaching \(0.693147\) with an error close to \(1/(4n)\) .

7.6 Improper integrals and the integral test

The Riemann integral is defined for bounded functions on bounded intervals. Other cases are handled by limits. If \(f\) is integrable on \([a,b]\) for every \(b>a\) , the improper integral \(\int_a^\infty f\) is defined as \(\lim_{b\to\infty}\int_a^bf\) when that limit exists, and is then said to converge. For example, by Theorem 7.15, \(\int_1^bx^{-2}\,dx=1-1/b\to 1\) , so \(\int_1^\infty x^{-2}\,dx=1\) , while \(\int_1^bx^{-1}\,dx=\log b\) is unbounded, so \(\int_1^\infty x^{-1}\,dx\) diverges.

Theorem 7.19 (integral test). Let \(f:[1,\infty)\to[0,\infty)\) be decreasing. Then the series \(\sum_{n=1}^\infty f(n)\) converges if and only if the improper integral \(\int_1^\infty f\) converges. Moreover, for every \(N\ge 1\) ,

\[ \sum_{n=2}^{N}f(n)\le\int_1^Nf\le\sum_{n=1}^{N-1}f(n). \]

Proof. A monotone function is integrable on each \([n,n+1]\) , and there \(f(n+1)\le f(x)\le f(n)\) . By the order property \(f(n+1)\le\int_n^{n+1}f\le f(n)\) . Summing over \(n=1,\dots,N-1\) and using additivity gives the displayed inequalities. Both the partial sums and the function \(b\mapsto\int_1^bf\) are increasing, so each converges exactly when it is bounded, and the inequalities show that one is bounded if and only if the other is.

Example 7.7: The size of a tail

For \(f(x)=1/x^2\) the same comparison applied from \(N\) onward gives

\[ \sum_{n=N+1}^\infty\frac1{n^2}\le\int_N^\infty\frac{dx}{x^2}=\frac1N\qquad\text{and}\qquad\sum_{n=N+1}^\infty\frac1{n^2}\ge\int_{N+1}^\infty\frac{dx}{x^2}=\frac{1}{N+1}. \]

So the tail after \(1000\) terms lies between \(1/1001\approx 0.000999\) and \(1/1000=0.001\) , in agreement with the value \(0.0009995\) found in Example 3.2. The integral test reproduces the tail bound obtained there by telescoping and adds a matching lower bound.

Applied to \(f(x)=x^{-p}\) , the test gives a second proof of Corollary 3.10, since \(\int_1^bx^{-p}\,dx=(b^{1-p}-1)/(1-p)\) for \(p\ne 1\) is bounded exactly when \(p>1\) .

Integration and differentiation are now on a firm footing for a single function. The last chapter asks what happens to both when the function is itself a limit: when can the integral or the derivative of a limit of functions be computed by taking the limit of the integrals or derivatives?

Exercises

  1. For \(f(x)=1/x\) on \([1,2]\) and the partition \(P=\{1,\tfrac43,\tfrac53,2\}\) , compute \(L(f,P)\) and \(U(f,P)\) as exact fractions, and state the bounds on \(\log 2\) that result.

    Answer

    Each piece has length \(\tfrac13\) , and \(1/x\) is decreasing, so suprema are at left endpoints and infima at right endpoints. \(U(f,P)=\tfrac13\bigl(1+\tfrac34+\tfrac35\bigr)=\tfrac{47}{60}\approx 0.7833\) and \(L(f,P)=\tfrac13\bigl(\tfrac34+\tfrac35+\tfrac12\bigr)=\tfrac{37}{60}\approx 0.6167\) . Hence \(\tfrac{37}{60}\le\log 2\le\tfrac{47}{60}\) .

  2. For \(f(x)=x\) on \([0,1]\) and the partition \(P_n\) into \(n\) equal pieces, compute \(U(f,P_n)\) and \(L(f,P_n)\) , and prove from Definition 7.4 that \(f\) is integrable with \(\int_0^1x\,dx=\tfrac12\) .

    Solution

    With \(x_i=i/n\) and \(f\) increasing, \(M_i=i/n\) and \(m_i=(i-1)/n\) . Using \(1+2+\cdots+n=n(n+1)/2\) ,

    \[ U(f,P_n)=\frac1n\sum_{i=1}^n\frac in=\frac{n+1}{2n},\qquad L(f,P_n)=\frac1n\sum_{i=1}^n\frac{i-1}{n}=\frac{n-1}{2n}. \]

    By the definitions of the lower and upper integrals as a supremum and an infimum, and by Lemma 7.3, for every \(n\)

    \[ \frac{n-1}{2n}=L(f,P_n)\le L(f)\le U(f)\le U(f,P_n)=\frac{n+1}{2n}. \]

    Both outer terms converge to \(\tfrac12\) as \(n\to\infty\) . The numbers \(L(f)\) and \(U(f)\) do not depend on \(n\) , so by the order theorem for limits \(\tfrac12\le L(f)\le U(f)\le\tfrac12\) . Hence \(L(f)=U(f)=\tfrac12\) : the function is integrable and \(\int_0^1x\,dx=\tfrac12\) .

    The difference \(U(f,P_n)-L(f,P_n)=1/n\) is the area of the \(n\) small squares of side \(1/n\) along the diagonal.

  3. Let \(f(x)=1\) at \(x=\tfrac12\) and \(f(x)=0\) at every other point of \([0,1]\) . Prove directly from Theorem 7.5 that \(f\) is integrable, and find its integral.

    Solution

    Lower sums. \(f\ge 0\) , and every subinterval of positive length contains points other than \(\tfrac12\) , where \(f=0\) . So \(m_i=0\) for every subinterval and \(L(f,P)=0\) for every partition.

    Upper sums. Let \(0<\varepsilon<1\) and take \(P=\{0,\ \tfrac12-\tfrac\varepsilon4,\ \tfrac12+\tfrac\varepsilon4,\ 1\}\) . On the middle subinterval, of length \(\varepsilon/2\) , the supremum of \(f\) is \(1\) ; on the other two it is \(0\) . So \(U(f,P)=\varepsilon/2\) .

    Hence \(U(f,P)-L(f,P)=\varepsilon/2<\varepsilon\) , and \(f\) is integrable by Theorem 7.5. Its integral equals the lower integral, which is \(0\) because all lower sums are \(0\) .

    A single point, however tall the spike above it, carries no area: it can be enclosed in an interval as short as we please. The same argument handles any finite number of exceptional points, which is Exercise 4.

  4. Let \(f\in\mathcal R[a,b]\) and let \(g\) be a function on \([a,b]\) that differs from \(f\) at only finitely many points. Prove that \(g\) is integrable and \(\int_a^bg=\int_a^bf\) .

    Hint

    Let \(h=g-f\) , which vanishes except at finitely many points \(c_1,\dots,c_k\) and is bounded by some \(H\) . As in Exercise 3, enclose each \(c_j\) in a subinterval of length less than \(\varepsilon/(2kH)\) to get \(-\varepsilon<L(h,P)\le U(h,P)<\varepsilon\) . So \(h\) is integrable with integral \(0\) , and \(g=f+h\) is integrable with the same integral as \(f\) by Theorem 7.9.

  5. Let \(f(x)=x\) for rational \(x\) and \(f(x)=0\) for irrational \(x\) , on \([0,1]\) . Compute the upper integral \(U(f)\) and the lower integral \(L(f)\) , and conclude that \(f\) is not integrable.

    Solution

    Lower integral. \(f\ge 0\) , and every subinterval of positive length contains an irrational number, where \(f=0\) . So \(m_i=0\) for every subinterval of every partition, all lower sums are \(0\) , and \(L(f)=0\) .

    Upper integral. On \([x_{i-1},x_i]\) the values of \(f\) are \(0\) and the rational numbers of the interval, all at most \(x_i\) ; and rationals of the interval come arbitrarily close to \(x_i\) by density. So \(M_i=x_i\) . Therefore

    \[ U(f,P)=\sum_{i=1}^nx_i\,\Delta x_i , \]

    which is exactly the upper sum \(U(g,P)\) of the function \(g(x)=x\) for the same partition. The two functions have the same upper sums for every partition, hence the same upper integral, and by Exercise 2, \(U(g)=\int_0^1x\,dx=\tfrac12\) . So \(U(f)=\tfrac12\) .

    Since \(L(f)=0<\tfrac12=U(f)\) , the function is not Riemann integrable. It is continuous only at \(0\) ; elsewhere the oscillation on any interval around a point \(x\) is at least \(x\) .

  6. Let \(f\) be increasing on \([a,b]\) . Using the formula in the proof of Theorem 7.7, find the smallest number \(n\) of equal pieces that guarantees \(U(f,P_n)-L(f,P_n)<0.01\) for \(f(x)=e^x\) on \([0,1]\) .

    Answer

    \(U-L=(1-0)(e-1)/n\) . This is below \(0.01\) exactly when \(n>100(e-1)\approx 171.83\) . The smallest such \(n\) is \(172\) .

  7. Let \(f\) be continuous on \([a,b]\) with \(f(x)\ge 0\) for all \(x\) and \(\int_a^bf=0\) . Prove that \(f(x)=0\) for every \(x\) . Show by example that the conclusion fails if continuity is dropped.

    Solution

    Suppose \(f(c)>0\) for some \(c\in[a,b]\) . By continuity at \(c\) (Exercise 5.3) there is \(\delta>0\) such that \(f(x)>f(c)/2\) for all \(x\in[a,b]\) with \(\lvert x-c\rvert<\delta\) . The set of such \(x\) contains a closed interval \(J=[u,v]\) with \(u<v\) (if \(c\) is an endpoint of \([a,b]\) , take \(J\) on one side of \(c\) ).

    By additivity (Theorem 7.10), \(\int_a^bf=\int_a^uf+\int_u^vf+\int_v^bf\) . The first and third integrals are nonnegative by the order property, because \(f\ge 0\) . On \(J\) we have \(f\ge f(c)/2\) , so \(\int_u^vf\ge(v-u)f(c)/2>0\) . Hence \(\int_a^bf>0\) , contradicting the hypothesis. Therefore \(f(x)=0\) for all \(x\) .

    Without continuity the conclusion fails: the function of Exercise 3 is nonnegative, has integral \(0\) , and is not identically zero. Continuity is what spreads positivity at one point to a whole interval, and only intervals have positive length.

  8. Prove the mean value theorem for integrals: if \(f\) is continuous on \([a,b]\) , there is a point \(c\in[a,b]\) with \(\int_a^bf=f(c)\,(b-a)\) .

    Solution

    By the Extreme Value Theorem \(f\) attains a minimum \(m=f(x_{\min})\) and a maximum \(M=f(x_{\max})\) on \([a,b]\) . Since \(m\le f(x)\le M\) for all \(x\) , the order property gives

    \[ m\,(b-a)\le\int_a^bf\le M\,(b-a). \]

    So the number \(\mu=\dfrac{1}{b-a}\displaystyle\int_a^bf\) satisfies \(m\le\mu\le M\) . By Corollary 5.8 the image \(f([a,b])\) is the whole interval \([m,M]\) , so there is \(c\in[a,b]\) with \(f(c)=\mu\) . That is, \(\int_a^bf=f(c)(b-a)\) .

    The number \(\mu\) is the average value of \(f\) , and the theorem says that a continuous function takes its average value. For a discontinuous function it need not: the step function of Example 7.4 has average \(\tfrac12\) on \([0,2]\) and takes only the values \(0\) and \(1\) .

  9. Give an example of a function \(f\) on \([0,1]\) such that \(\lvert f\rvert\) is integrable and \(f\) is not, and explain which step of the proof of Theorem 7.11 cannot be reversed.

    Hint

    Take \(f=1\) on the rationals and \(f=-1\) on the irrationals, so \(\lvert f\rvert=1\) . The proof of Theorem 7.11 bounds the oscillation of \(\varphi\circ f\) by a multiple of the oscillation of \(f\) ; there is no inequality in the other direction, and here the oscillation of \(\lvert f\rvert\) is \(0\) on every interval while that of \(f\) is \(2\) .

  10. Prove the Cauchy–Schwarz inequality for integrals: for \(f,g\in\mathcal R[a,b]\) , \(\bigl(\int_a^bfg\bigr)^2\le\int_a^bf^2\cdot\int_a^bg^2\) . (Imitate the proof of Lemma 4.2.)

    Hint

    All the functions involved are integrable by Theorem 7.11. For real \(t\) , \(0\le\int_a^b(f-tg)^2=A-2tC+t^2B\) with \(A=\int f^2\) , \(B=\int g^2\) , \(C=\int fg\) . If \(B>0\) take \(t=C/B\) . If \(B=0\) , the inequality \(A-2tC\ge 0\) for all real \(t\) forces \(C=0\) .

  11. Find the error: “By the Fundamental Theorem, \(\int_{-1}^{1}x^{-2}\,dx=\bigl[-1/x\bigr]_{-1}^{1}=-1-1=-2\) .” Explain how one can see at once that the answer must be wrong.

    Answer

    The integrand is positive wherever it is defined, so a negative integral is impossible. The function \(x^{-2}\) is unbounded near \(0\) and undefined at \(0\) , so it is not Riemann integrable on \([-1,1]\) ; and \(-1/x\) is not continuous on \([-1,1]\) , so it is not an antiderivative in the sense required by Theorem 7.15.

  12. On \([0,2]\) let \(f(t)=t\) for \(0\le t\le 1\) and \(f(t)=2\) for \(1<t\le 2\) . Find \(F(x)=\int_0^xf\) explicitly, determine where \(F\) is differentiable, and compare with what Theorem 7.14 guarantees.

    Solution

    On \([0,1]\) . Here \(f(t)=t\) , which is continuous with antiderivative \(t^2/2\) , so by Theorem 7.15, \(F(x)=x^2/2\) for \(0\le x\le 1\) . In particular \(F(1)=\tfrac12\) .

    On \((1,2]\) . By additivity \(F(x)=F(1)+\int_1^xf\) . On \([1,x]\) the function \(f\) equals the constant \(2\) except at the single point \(1\) , and changing a function at one point does not change its integral (Exercise 4). So \(\int_1^xf=2(x-1)\) and

    \[ F(x)=\tfrac12+2(x-1)=2x-\tfrac32\qquad(1\le x\le 2). \]

    For instance \(F(2)=\tfrac52\) .

    Differentiability. For \(x<1\) , \(F'(x)=x=f(x)\) ; for \(x>1\) , \(F'(x)=2=f(x)\) . At \(x=1\) the left difference quotient is \((x^2/2-\tfrac12)/(x-1)=(x+1)/2\to 1\) and the right difference quotient is \(2\) . They differ, so \(F\) is not differentiable at \(1\) .

    Comparison. Theorem 7.14 guarantees that \(F\) is continuous everywhere, which it is (\(F(1)=\tfrac12\) from both formulas), and differentiable with \(F'=f\) wherever \(f\) is continuous, that is, at every point except \(1\) . At the jump of \(f\) the theorem promises nothing, and \(F\) has a corner there whose two slopes are the two one-sided limits of \(f\) .

  13. Let \(f\) be continuous on \([0,\infty)\) . Find the derivative of \(G(x)=\int_0^{x^2}f(t)\,dt\) , justifying each step, and evaluate it for \(f(t)=\sqrt{1+t^3}\) .

    Answer

    Write \(G=\Phi\circ\varphi\) with \(\Phi(u)=\int_0^uf\) and \(\varphi(x)=x^2\) . Since \(f\) is continuous, \(\Phi'=f\) by Theorem 7.14, and the chain rule gives \(G'(x)=f(x^2)\cdot 2x\) . For \(f(t)=\sqrt{1+t^3}\) : \(G'(x)=2x\sqrt{1+x^6}\) .

  14. Recognise each limit as an integral and evaluate it: (a) \(\lim_{n\to\infty}\dfrac1n\sum_{k=1}^n\sqrt{k/n}\) ; (b) \(\lim_{n\to\infty}\sum_{k=1}^n\dfrac{k}{n^2+k^2}\) .

    Answer

    (a) The sum is a Riemann sum of \(\sqrt x\) on \([0,1]\) with right endpoints, so the limit is \(\int_0^1\sqrt x\,dx=\tfrac23\) . (b) Write the term as \(\dfrac1n\cdot\dfrac{k/n}{1+(k/n)^2}\) ; the limit is \(\int_0^1\dfrac{x}{1+x^2}\,dx=\tfrac12\log 2\approx 0.3466\) .

  15. Prove directly from Definition 7.17, by bounding the integrand, that \(1-\dfrac1x\le\log x\le x-1\) for every \(x>0\) .

    Solution

    For \(x\ge 1\) . On \([1,x]\) the integrand satisfies \(\dfrac1x\le\dfrac1t\le 1\) . By the order property of the integral,

    \[ \frac{x-1}{x}=\int_1^x\frac{dt}{x}\le\int_1^x\frac{dt}{t}\le\int_1^x1\,dt=x-1 , \]

    that is, \(1-\dfrac1x\le\log x\le x-1\) .

    For \(0<x<1\) . By the convention on reversed limits, \(\log x=-\int_x^1dt/t\) . On \([x,1]\) we have \(1\le\dfrac1t\le\dfrac1x\) , so

    \[ 1-x\le\int_x^1\frac{dt}{t}\le\frac{1-x}{x}. \]

    Multiplying by \(-1\) reverses the inequalities: \(-\dfrac{1-x}{x}\le\log x\le-(1-x)\) , which is again \(1-\dfrac1x\le\log x\le x-1\) .

    So the inequality holds for all \(x>0\) , with equality only at \(x=1\) . For example at \(x=2\) it reads \(0.5\le\log 2\le 1\) , and at \(x=\tfrac12\) it reads \(-1\le\log\tfrac12\le-0.5\) . Replacing \(x\) by \(1+x\) recovers Exercise 6.7, this time without the Mean Value Theorem.

  16. Prove that \(\log\) is uniformly continuous on \([1,\infty)\) and is not uniformly continuous on \((0,1]\) .

    Hint

    On \([1,\infty)\) the derivative \(1/x\) is bounded by \(1\) , so \(\log\) is Lipschitz there by Corollary 6.8(c). On \((0,1]\) it is unbounded, since \(\log(2^{-n})=-n\log 2\) , whereas a uniformly continuous function on a bounded set is bounded (Exercise 5.18).

  17. Let \(\gamma_n=1+\tfrac12+\cdots+\tfrac1n-\log n\) . Use the inequalities in the proof of Theorem 7.19 to show that \((\gamma_n)\) is decreasing and bounded below by \(0\) , so that it converges. (Its limit is Euler’s constant.)

    Solution

    Apply the inequality \(f(n+1)\le\int_n^{n+1}f\le f(n)\) from the proof of Theorem 7.19 to the decreasing function \(f(x)=1/x\) ; by Definition 7.17 and additivity, \(\int_n^{n+1}dt/t=\log(n+1)-\log n\) .

    Decreasing. From the definition of \(\gamma_n\) ,

    \[ \gamma_n-\gamma_{n+1}=\log(n+1)-\log n-\frac{1}{n+1}=\int_n^{n+1}\frac{dt}{t}-\frac{1}{n+1}\ge 0 . \]

    Bounded below. Summing \(\int_k^{k+1}dt/t\le 1/k\) over \(k=1,\dots,n-1\) gives \(\log n\le 1+\tfrac12+\cdots+\tfrac1{n-1}\) . Hence

    \[ \gamma_n=\Bigl(1+\tfrac12+\cdots+\tfrac1{n-1}-\log n\Bigr)+\frac1n\ge\frac1n>0 . \]

    A decreasing sequence that is bounded below converges, by the monotone convergence theorem. So \(\gamma=\lim\gamma_n\) exists and \(0\le\gamma\le\gamma_1=1\) .

    Numerically \(\gamma_1=1\) , \(\gamma_{10}\approx 0.6264\) , \(\gamma_{100}\approx 0.5822\) , \(\gamma_{10000}\approx 0.57727\) ; the limit is \(0.5772\) to four places. The harmonic series diverges, but it does so exactly like \(\log n\) , up to a constant.

  18. Let \(T\) be Thomae’s function and \(F(x)=\int_0^xT\) . Find \(F\) , and use it to show that the function \(F\) of Theorem 7.14 can be differentiable at a point \(c\) where \(f\) is discontinuous, with \(F'(c)\ne f(c)\) .

    Answer

    The argument of Example 7.3 applies on every interval \([0,x]\) , so \(F(x)=0\) for all \(x\in[0,1]\) . Thus \(F'(c)=0\) at every point. At a rational \(c=p/q\) the function \(T\) is discontinuous and \(T(c)=1/q\ne 0=F'(c)\) . Continuity of \(f\) at \(c\) is sufficient for \(F'(c)=f(c)\) , and without it \(F'(c)\) may exist and differ from \(f(c)\) .

  19. Let \(f\) be a bounded function on \([a,b]\) and suppose there is a number \(A\) such that for every \(\varepsilon>0\) there is \(\delta>0\) with \(\lvert S(f,P,t)-A\rvert<\varepsilon\) for all tagged partitions of mesh less than \(\delta\) . Prove that \(f\in\mathcal R[a,b]\) and \(\int_a^bf=A\) .

    Hint

    Given \(\varepsilon\) , take \(\delta\) as in the hypothesis and fix one partition \(P\) of mesh less than \(\delta\) . Choosing tags with \(f(t_i)>M_i-\varepsilon/(b-a)\) produces a Riemann sum exceeding \(U(f,P)-\varepsilon\) , so \(U(f,P)<A+2\varepsilon\) ; similarly \(L(f,P)>A-2\varepsilon\) . Conclude with Theorem 7.5 and the fact that the integral lies between \(L(f,P)\) and \(U(f,P)\) .

  20. Let \(f\) be a bounded function on \([0,1]\) that is continuous at every point not in the Cantor set \(C\) of Example 4.3. Prove that \(f\) is Riemann integrable.

    Solution

    Let \(\lvert f\rvert\le M\) with \(M>0\) and let \(\varepsilon>0\) . We imitate the proof of Theorem 7.8, with the Cantor set playing the role of the finite set of discontinuities.

    Covering the bad set. By Example 4.3, \(C\subseteq C_n\) , where \(C_n\) is a union of \(2^n\) closed intervals of total length \((2/3)^n\) . Choose \(n\) with \((2/3)^n<\varepsilon/(8M)\) , and enlarge each of the \(2^n\) intervals \([u,v]\) to an open interval \((u-\eta,v+\eta)\) , with \(\eta>0\) so small that \(2^{n+1}\eta<\varepsilon/(8M)\) . We obtain open intervals \(V_1,\dots,V_r\) , \(r=2^n\) , that cover \(C\) and have total length less than \(\varepsilon/(4M)\) .

    The good set. The set \([0,1]\setminus(V_1\cup\dots\cup V_r)\) is a union of finitely many closed intervals \(J_1,\dots,J_s\) (possibly degenerate ones, which we discard). No point of any \(J_k\) lies in \(C\) , so \(f\) is continuous at every point of each \(J_k\) , and hence integrable on it by Theorem 7.6. Choose partitions \(Q_k\) of \(J_k\) with \(U(f,Q_k)-L(f,Q_k)<\varepsilon/(2s)\) .

    Assembling. Let \(P\) be the partition of \([0,1]\) formed by all points of the \(Q_k\) together with the endpoints of the intervals \(J_k\) . Its subintervals are of two kinds: those inside some \(J_k\) , which contribute less than \(s\cdot\varepsilon/(2s)=\varepsilon/2\) to \(U(f,P)-L(f,P)\) ; and the gaps between consecutive \(J_k\) , each contained in the closure of a union of sets \(V_j\) , with total length less than \(\varepsilon/(4M)\) and oscillation at most \(2M\) , contributing less than \(\varepsilon/2\) . Hence \(U(f,P)-L(f,P)<\varepsilon\) , and \(f\) is integrable by Theorem 7.5.

    Only two facts about \(C\) were used: it can be covered by finitely many intervals of arbitrarily small total length, and away from it \(f\) is continuous. The indicator function of \(C\) is an example: it is discontinuous at every point of the uncountable set \(C\) and is integrable, with integral \(0\) .

  21. Evaluate, justifying the use of Theorem 7.16: (a) \(\int_0^1xe^x\,dx\) ; (b) \(\int_0^1\dfrac{2x}{1+x^2}\,dx\) .

    Answer

    (a) Parts with \(F(x)=x\) , \(G(x)=e^x\) : \(\int_0^1xe^x\,dx=\bigl[xe^x\bigr]_0^1-\int_0^1e^x\,dx=e-(e-1)=1\) . All four functions are continuous, so Theorem 7.16(a) applies. (b) Substitution with \(\varphi(t)=1+t^2\) , which has a continuous derivative, and \(f(x)=1/x\) , continuous on \([1,2]\) : the integral is \(\int_1^2dx/x=\log 2\) .

  22. For which real \(p\) does \(\int_1^\infty x^{-p}\,dx\) converge? For which \(p\) does the limit \(\lim_{a\to 0^+}\int_a^1x^{-p}\,dx\) exist? Is there a \(p\) for which both hold?

    Answer

    \(\int_1^bx^{-p}\,dx=(b^{1-p}-1)/(1-p)\) for \(p\ne 1\) and \(\log b\) for \(p=1\) ; it has a limit as \(b\to\infty\) exactly when \(p>1\) . Similarly \(\int_a^1x^{-p}\,dx\) has a limit as \(a\to 0^+\) exactly when \(p<1\) . No \(p\) satisfies both: a power of \(x\) is never integrable at both ends of \((0,\infty)\) .

  23. Give bounded functions \(f\) and \(g\) on \([0,1]\) for which the upper integrals satisfy \(U(f+g)<U(f)+U(g)\) , and explain why this does not contradict Theorem 7.9.

    Answer

    Let \(f=D\) be Dirichlet’s function and \(g=1-D\) . Then \(U(f)=U(g)=1\) , while \(f+g=1\) has \(U(f+g)=1<2\) . Theorem 7.9 assumes that \(f\) and \(g\) are integrable, and neither is; for integrable functions the upper integrals are the integrals and add. In general only \(U(f+g)\le U(f)+U(g)\) holds, the integral form of Example 1.5.

Search knowledge base

Explore

On this page

Note