$$ \newcommand{\RR}{\mathbb{R}} \newcommand{\QQ}{\mathbb{Q}} \newcommand{\CC}{\mathbb{C}} \newcommand{\NN}{\mathbb{N}} \newcommand{\ZZ}{\mathbb{Z}} \newcommand{\FF}{\mathbb{F}} % ALTERNATE VERSIONS % \newcommand{\uppersum}[1]{{\textstyle\sum^+_{#1}}} % \newcommand{\lowersum}[1]{{\textstyle\sum^-_{#1}}} % \newcommand{\upperint}[1]{{\textstyle\smallint^+_{#1}}} % \newcommand{\lowerint}[1]{{\textstyle\smallint^-_{#1}}} % \newcommand{\rsum}[1]{{\textstyle\sum_{#1}}} \newcommand{\uppersum}[1]{U_{#1}} \newcommand{\lowersum}[1]{L_{#1}} \newcommand{\upperint}[1]{U_{#1}} \newcommand{\lowerint}[1]{L_{#1}} \newcommand{\rsum}[1]{{\textstyle\sum_{#1}}} \newcommand{\partitions}[1]{\mathcal{P}_{#1}} \newcommand{\sampleset}[1]{\mathcal{S}_{#1}} \newcommand{\erf}{\operatorname{erf}} $$

30  \(\bigstar\) Examples

Highlights of this Chapter: we compute several integrals directly from the definition. The examples of \(x\) and \(x^2\) are perhaps familiar from many sources, but we also compute the integral of an exponential \(E(x)\), and prove that \(\int_{[1,x]}\frac{1}{t}\,dt\) is a logarithm.

This entire section is incredibly superfluous. After all, we already know that if our construction really yields an integral then the fundamental theorem of calculus must hold, and we can compute any of these integrals below by antidifferentiation.

So, as efficient mathematicians, we should not pause to try and compute any integrals by hand, but rather move immediately to try and prove the integration axioms for our construction (we do this right away, at the beginning of the next chapter). Nonetheless, when learning a new definition it is often instructive to use it: and below are several example integrals computed directly from the construction.

30.1 Some Polynomials

Proposition 30.1 (Integrating a Constant) Let \(f(x)=k\) be a constant function. Then \(f\) is integrable on any closed interval of \(\RR\), and \[\int_{[a,b]}k=k(b-a)\]

Proof. Let \(P\) be any partition of \([a,b]\) then since \(f(x)=k\) is constant, on every sub-interval \(P_i\) we have \(m_i=k=M_i\), and so \[L(f,P)=\sum_{i}m_i |P_i|=\sum_i k|P_i|=k(b-a)\] \[U(f,P)=\sum_i M_i|P_i|=\sum_i k|P_i|=k(b-a)\]

Thus for all partitions the upper sum and lower sum are constant - and equal the same value! Taking the supremum over all lower sums and infimum over all upper sums then just yields this same constant, so the upper and lower integrals are equal. Thus

\[\int_{[a,b]}f\,dx = k(b-a)\]

Proposition 30.2 (Integrating \(x\)) Let \([a,b]\) be any closed interval in \(\RR\). Then \(f(x)=x\) is integrable on \([a,b]\) and \[\int_{[a,b]}x=\frac{b^2-a^2}{2}\]

Proof. Start with \([0,b]\), then look at \(0<a<b\) using interval subdivision. To show \(x\) is integrable, we use Theorem 29.2, which assures us it is enough to find a sequence \(P_n\) of shrinking partitions where \(\lim L(f,P_n)=\lim U(f,P_n)\).

For each \(n\), let \(P_n\) be the evenly spaced partition with \(n\) subintervals, of width \(\Delta_n=(b-a)/n\). Since \(f(x)=x\) is monotone increasing, we know on each subinterval \([t_{i-1},t_{i}]\) that \[m_i = t_{i-1}=(i-1)\Delta_n \hspace{1cm} M_i=t_i=i\Delta_n\]

Thus, the upper and lower sums for these partitions are

\[\begin{align*} L(x,P_n)&=\sum_{1\leq i \leq n}m_i\Delta_n=(i-1)\Delta_n\Delta_n\\ &=\Delta_n^2\left(0+1+2+\cdots + (n-1)\right) \end{align*}\]

\[\begin{align*} U(x,P_n)&=\sum_{1\leq i \leq n}M_i\Delta_n=i\Delta_n\Delta_n\\ &=\Delta_n^2\left(1+2+\cdots + n\right) \end{align*}\]

These are nearly identical formulae: the upper sum is just one term longer than the lower sum and so their difference is

\[U(x,P_n)-L(x,P_n)=n\Delta_n^2=n\frac{b^2}{n^2}=\frac{b^2}{n}\]

As \(n\to\infty\) this converges to zero: thus, if either the upper or lower sum converges, then both do, and both converge to the same value by the limit theorems. For example, if we prove \(U(f,P_n)\) converges then

\[\begin{align*} \lim L(x,P_n)&=\lim \left(U(x,P_n)-U(f,P_n)+L(x,P_n)\right)\\ &=\lim U(x,P_n)-\lim (U(x,P_n)-L(x,P_n))\\ &=\lim U(x s,P_n)+0s \end{align*}\]

So, we focus on just proving that \(U(x,P_n)\) converges and finding its value. Because \(U(x,P_n)\) is a multiple of \(1+2+\cdots + n\), we start by finding a closed form using the formula for the sum of the first \(n\) positive integers: \(1+2+\cdots+ n = \frac{n(n+1)}{2}\).

\[U(x,P_n)=\Delta_n^2 \frac{n(n+1)}{2}=\frac{b^2}{n^2}\frac{n(n+1)}{2}=\frac{b^2}{2}\frac{n(n+1)}{n^2}\]

The factor \(b^2/2\) out front is a constant independent of \(n\), and the remainder simplifies directly with some algebra:

\[\frac{n(n+1)}{n^2}=\frac{n+1}{n}=1+\frac{1}{n}\]

Thus \(\lim U(x,P_n)=\frac{b^2}{2}\lim(1+1/n)=\frac{b^2}{2}\). Since this converges our previous work ensures that the lower sum does as well, and to the same value. Thus \(x\) is integrable on \([0,b]\) and

\[\int_{[0,b]}x\,dx = \frac{b^2}{2}\]

Knowing this, we complete the case for a general positive interval \([a,b]\) with \(0< a< b\) by subdivision: \[\int{[a,b]}x\,dx = \int_{[0,a]}x\,dx +\int_{[a,b]}x\,dx\] Since we know the value of all integrals over intervals beginning at \(0\), this simplifies to \[\frac{b^2}{2}=\frac{a^2}{2}+\int_{[a,b]}x\,dx\] And, subtracting to the other side gives our answer

\[\int{[a,b]}x\,dx = \frac{b^2-a^2}{2}\]

Exercise 30.1 Complete the general proof by dealing with the cases where \(a,b\) may be negative.

The same style of argument works to integrate any \(x^n\) for which we know how to sum the \(n^{th}\) powers of the positive integers.

Proposition 30.3 (Integrating \(x^2\)) Let \([a,b]\) be any closed interval in \(\RR\). Then \(f(x)=x^2\) is integrable on \([a,b]\) and \[\int_{[a,b]}x^2\, dx=\frac{b^{3}-a^{3}}{3}\]

Exercise 30.2 Following the same technique as above, show that \(x^2\) is integrable on \([a,b]\):

  • First, restrict yourself to intervals of the form \([0,b]\) for \(b>0\).
  • Use the monotonicity of \(x^2\) on these intervals to explicitly write out upper and lower sums.
  • Use the following identity on sums of squares from elementary number theory to compute their value \[ \sum_{1\leq k\leq N}k^2 = \frac{N(N+1)(2N+1)}{6}\]
  • Explain how to generalize this to intervals of the form \([a,0]\) for \(a<0\), and finally to general intervals \([a,b]\) for any \(a< b\in\RR\) using subdivision.

30.2 Exponentials

Here’s a quite long calculation showing that it’s possible to integrate exponential functions directly from first principles. The length of this calculation alone is a good selling point for the fundamental theorem of calculus!

Proposition 30.4 Let \(E\) be an exponential function, and \([a,b]\) an interval. Then \(E\) is integrable on \([a,b]\) and \[ \int_{[a,b]}E=\frac{E(b)-E(a)}{E^\prime(0)} \]

Proof. We will show the argument for \(E\) an increasing exponential (its base \(E(1)>1\)): an identical argument applies to decreasing exponentials (only switching \(U\) and \(L\) in the computations below).

To show \(E(x)\) is integrable, we use Theorem 29.2, which assures us it is enough to find a sequence \(P_n\) of shrinking partitions where \(\lim L(f,P_n)=\lim U(f,P_n)\). Indeed - for each \(n\), let \(P_n\) denote the evenly spaced partition of \([a,b]\) with widths \(\Delta_n = (b-a)/n\) \[P_n=\{a,a+\Delta_n , a+2\Delta_n,\cdots, a+n\Delta_n=b\}\]

We will begin by computing the lower sum. Because \(E\) is continuous, it achieves a maximum and minimum value on each interval \(P_i=[t_i,t_{i+1}]\). And, since \(E\) is monotone increasing, this value occurs at the leftmost endpoint. Thus,

\[\begin{align*} L(E,P_n)&=\sum_{0\leq i< n} \inf_{P_i}\{E(x)\}|P_i|\\ &= \sum_{0\leq i< n} E(t_i)\Delta_n\\ &= \sum_{0\leq i< n} E(a+i\Delta_n)\Delta_n \end{align*}\]

Using the law of exponents for \(E\) we can simplify this expression somewhat:

\[\begin{align*} E(a+i\Delta_n)&=E(a)E(i\Delta_n)\\ &=E(a)E(\Delta_n+\Delta_n+\cdots+\Delta_n)\\ &= E(a)E(\Delta_n)E(\Delta_n)\cdots E(\Delta_n)\\ &= E(a)E(\Delta_n)^i \end{align*}\]

Plugging this back in and factoring out the constants, we see that the summation is actually a partial sum of a geometric series:

\[\begin{align*} \sum_{0\leq i < n} E(a+i\Delta_n)\Delta_n&= \sum_{0\leq i < n}E(a)E(\Delta_n)^i \Delta_n\\ &= E(a) \Delta_n\sum_{0\leq i < n}E(\Delta_n)^i \end{align*}\]

Having previously derived the formula for the partial sums of a geometric series, we can write this in closed form:

\[\sum_{0\leq i < n}E(\Delta_n)^i=\frac{1-E(\Delta_n)^n}{1-E(\Delta_n)}\]

But, we can simplify even further! Using again the laws of exponents we see that \(E(\Delta_n)^n\) is the same as \(E(n\Delta_n)\), and \(n\Delta_n\) is nothing other than the width of our entire interval, so \(b-a\). Thus the numerator becomes \(1-E(b-a)\), and putting it all together yields a simple expression for \(L(E,P_n)\):

\[L(E,P_n)=E(a)\Delta_n \frac{1-E(b-a)}{1-E(\Delta_n)}\]

Some algebraic re-arrangement is beneficial: first, note that by the laws of exponents we have

\[\begin{align*} E(a)(1-E(b-a))&=E(a)-E(b-a)E(a)\\ &=E(a)-E(b) \end{align*}\]

Thus for every \(n\) we have

\[L(E,P_n)=\left(E(a)-E(b)\right)\frac{\Delta_n}{1-E(\Delta_n)}\]

We are interested in the limit as \(n\to\infty\): by the limit laws we can pull the constant \(E(a)-E(b)\) out front, and only concern ourselves with the fraction involving \(\Delta_n\). There’s one final trick: look at the negative reciprocal of this fraction:

\[\frac{-1}{\frac{\Delta_n}{1-E(\Delta_n)}}=\frac{E(\Delta_n)-1}{\Delta_n}\]

Because we know \(E(0)=1\) for all exponentials, this latter term is none other than the difference quotient defining the derivative for \(E\)! Since we have proven \(E\) to be differentiable, we know that evaluating this along any sequence converging to zero yields the derivative at zero. And as \(\Delta_n\to 0\) this implies

\[\lim \frac{E(\Delta_n)-E(0)}{\Delta_n}= E^\prime(0)\]

Thus, our original limit \(\Delta_n/(1-E(\Delta_n))\) is the negative reciprocal of this, and

\[\begin{align*}\lim L(E,P_n)&=\lim \left(E(a)-E(b)\right)\frac{\Delta_n}{1-E(\Delta_n)}\\ &= \left(E(a)-E(b)\right)\lim \frac{\Delta_n}{1-E(\Delta_n)}\\ &=\left(E(a)-E(b\right)) \frac{-1}{E^\prime(0)}\\ &=\frac{E(b)-E(a)}{E^\prime(0)} \end{align*}\]

Phew! That was a lot of work! Now we have to tackle the upper sum. But luckily this will not be nearly as bad: we can reuse most of what we’ve done! Since \(E\) is monotone increasing, we know that the maximum on any interval occurs at the rightmost endpoint, so

\[\begin{align*} U(E,P_n)&=\sum_{0\leq i< n} \sup_{P_i}\{E(x)\}|P_i|\\ &= \sum_{0\leq i< n} E(t_{i+1})\Delta_n\\ &= \sum_{0\leq i< n} E(a+(i+1)\Delta_n)\Delta_n \end{align*}\]

Comparing this with our previous expression for \(L(E,P_n)\), we see (unsurprisingly) its identical except for a shift of \(i\mapsto i+1\). The law of exponents turns this additive shift into a multiplicative one:

\[\begin{align*} U(E,P_n) &= \sum_{0\leq i< n} E(a+(i+1)\Delta_n)\Delta_n\\ &= \sum_{0\leq i< n} E(\Delta_n)E(a+i\Delta_n)\Delta_n\\ &=E(\Delta_n) \sum_{0\leq i< n}E(a+i\Delta_n)\Delta_n\\ &= E(\Delta_n)L(E,P_n) \end{align*}\]

Thus, \(U(E,P_n)=E(\Delta_n)L(E,P_n)\) for every \(n\). Since \(E\) is continuous, \[\lim E(\Delta_n)=E(\lim \Delta_n)=E(0)=1\]

And, as \(L(E,P_n)\) converges (as we proved above) we can apply the limit theorem for products to get

\[\begin{align*}\lim U(E,P_n) &=\lim (E(\Delta_n)L(E,P_n))\\ &=\left(\lim E(\Delta_n)\right)\left(\lim L(E,P_n)\right)\\ &= \lim L(E,P_n)\\ &= \frac{E(b)-E(a)}{E^\prime(0)} \end{align*}\]

Thus, the limits of our sequence of upper and lower bounds are equal! And, by the argument at the beginning of this proof, that squeezes \(L(E)\) and \(U(E)\) to be equal as well. Thus, \(E\) is integrable on \([a,b]\) and its value is what we have squeezed:

\[\int_{[a,b]}E = \frac{E(b)-E(a)}{E^\prime(0)}\]

Corollary 30.1 On any interval \([a,b]\) the natural exponential is integrable, and \[\int_{[a,b]}\exp\, dx = \exp(b)-\exp(a)\]

30.3 A Logarithm

Proposition 30.5 Let \(a<b\) be positive numbers. Then the function \(f(x)=1/x\) is integrable on the interval \([a,b]\).

Proof. Here we attempt to prove integrability without necessarily computing the value of the function at the same time. So, its enough to use the \(\epsilon\)-integrability criterion, where we show that for any \(\epsilon>0\) there exists some partition \(P\) where \(U(1/x,P)-L(1/x,P)<\epsilon\).

Note that \(1/x\) is monotone decreasing on the positive reals, so for any sub-interval \([t_{i-1},t_i]\) of any partition, we have \[m_i=\frac{1}{t_{i}}\hspace{1cm} M_i=\frac{1}{t_{i-1}}\]

If \(P\) is an evenly spaced partition of \([a,b]\) with \(|P_i|=\Delta\) for some \(\Delta>0\) this lets us express the difference \(U-L\) as a telescoping sum:

\[\begin{align*} U-L&= \sum_{1\leq i\leq N} M_i \Delta -\sum_{1\leq i\leq N} m_i \Delta\\ &= \Delta\sum_{1\leq i\leq N} (M_i-m_i)\\ &=\Delta\sum_{1\leq i\leq N} \frac{1}{t_{i-1}}-\frac{1}{t_i}\\ &=\Delta\left(\left(\frac{1}{t_0}-\frac{1}{t_1}\right)+\left(\frac{1}{t_1}-\frac{1}{t_2}\right)+\cdots +\left(\frac{1}{t_{N-1}}-\frac{1}{t_N}\right)\right)\\ &= \Delta\left(\frac{1}{t_0}-\frac{1}{t_N}\right)\\ &= \Delta\left(\frac{1}{a}-\frac{1}{b}\right) \end{align*}\]

Write \(L=\frac{1}{a}-\frac{1}{b}\) for this constant value. Then to make the difference between upper and lower sums less than \(\epsilon\) all we need is to set \(\Delta<\epsilon/L\).

Proposition 30.6 For any positive \(k\in\RR\), and any interval \([a,b]\subset(0,\infty)\) \[\int_{[a,b]}\frac{1}{x}=\int_{[ka,kb]}\frac{1}{x}\]

Proof (Proof). For any partition \(P\) of \([a,b]\) and number \(k\) let \(kP\) be the partition of \([ka,kb]\) resulting from multiplying all points by \(k\). This assignment determines a bijection between the sets of partitions of \([a,b]\) and the partitions of \([ka,kb]\).

Because we already know \(f(x)=1/x\) to be integrable on both intervals, we may choose to work with just lower sums without loss of generality. We aim to show that for every \(P\in\partitions{[a,b]}\) \[\lowersum{[a,b]}\left(\tfrac{1}{x},P\right)=\lowersum{[ka,kb]}\left(\tfrac{1}{x},kP\right)\]

Assuming we have this, since \(P\mapsto kP\) is a bijection \(\partitions{[a,b]}\cong\partitions{[ka,kb]}\), this implies the sets of all possible lower sums are equal:

\[\left\{\lowersum{[a,b]}\left(\tfrac{1}{x},P\right)\,: P\in\partitions{[a,b]}\right\}=\left\{\lowersum{[ka,kb]}\left(\tfrac{1}{x},P\right)\,: P\in\partitions{[ka,kb]}\right\}\]

Thus as the sets are equal, their suprema are equal, which are by definition the lower integrals \(\lowerint{[a,b]}\frac{1}{x}=\lowerint{[ka,kb]}\frac{1}{x}\). But, as we already know this function is integrable on each of these intervals, these values are just the integrals themselves, so we are done. Thus, it only remains to prove equality of the upper sums for partitions in bijective correspondence.

Exercise 30.3 Let \(P\) be an arbitrary partition of \([a,b]\). Prove that \[\uppersum{[a,b]}\left(\tfrac{1}{x},P\right)=\uppersum{[ka,kb]}\left(\tfrac{1}{x},kP\right)\]

Hint:\(1/x\) is monotone decreasing, so we know its infimum on each interval is the right endpoint

Theorem 30.1 The function \(L(x)=\int_{[1,x]}\frac{1}{t}\) is a logarithm.

Proof (Proof 1). For any \(x,y\in (1,\infty)\) we directly compute using the above lemma. The idea of the proof is immediate in the first case, where we consider \(x,y>1\): \[\begin{align*} L(xy)&=\int_{[1,xy]}\frac{1}{t}\\ &=\int_{[1,x]}\frac{1}{t}+\int_{[x,xy]}\frac{1}{t}\\ &=\int_{[1,x]}\frac{1}{t}+\int_{[1,y]}\frac{1}{t}\\ &= L(x)+L(y) \end{align*}\]

This function extends to all of \((0,\infty)\), if we use the definition of the integral allowing oriented intervals (Remark 28.4), as you can check in the exercise below.

Exercise 30.4 What are the other cases? Prove them by similarly breaking into sub-intervals and rescaling (Proposition 30.6).

30.4 Using the Freedom of Partition

We can use the freedom of choice of partition to our advantage even more, in calculating more difficult integrals, such as below:`

Exercise 30.5 Follow the argument structure of Example 30.1 in the simpler case below to show if \(a,b,c\in\RR\) and \(f\) is an integrable function on the interval \([a+c,b+c]\), then \(f(x+c)\) is integrable on \([a,b]\) and \[\int_{[a+c,b+c]}f(x)=\int_{[a,b]}f(x+c)\]

Exercise 30.6 Let \([a,b]\) be an interval and \(k>0\). Then if \(f(x)\) is integrable on \([ka,kb]\), the function \(f(kx)\) is integrable on \([a,b]\) and \[\int_{[ka, kb]}f(x)=k\int_{[a,b]}f(kx)\]

Example 30.1 Let \(f\) be an integrable function. Then \[\int_{[a^2,b^2]}f(x)=2\int_{[a,b]}xf(x^2)\]

Proof. We begin with some preliminary calculations involving partitions. Let \(P=\{t_i\}\) be a partition of the interval \(I=[a,b]\) and \(S\) the set of midpoint samples \(s_i=(t_i+t_{i-1})/2\) for \(P\). Now consider the squares \(P^2=\{t_i^2\}\) and \(S^2=\{s_i^2\}\) of these.

As squaring is monotone, \(t_i<t_{i+1}\) implies \(t_i^2<t_{i+1}^2\), so \(P^2\) is still a partition, but now of the interval \(I^2\) from \(t_0^2=a^2\) to \(t_n^2=b^2\). Again by the monotonicity of squaring, since \(s_i\in P_i\) for each \(i\), it follows that \(s_i^2\in P_i^2\) so \(S^2\) is a sample set for \(P^2\). The key to our computation is to work out this Riemann sum for \(f\) with the partition \(P^2\):

\[\begin{align*} \rsum{I^2}(f,P^2,S^2)&=\sum_i f(t_i^2)|P_i^2|\\ &=\sum_i f(s_i^2)\left(t_i^2-t_{i-1}^2\right)\\ &=\sum_i f(s_i^2)(t_i+t_{i-1})(t_i-t_{i-1})\\ &=\sum_i f(s_i^2)(t_i+t_{i-1})|P_i|\\ \end{align*}\]

As the samples occur at interval midpoints, by definition \(2s_i=t_i+t_{i-1}\), so the Riemann sum simplifies

\[\begin{align*} \sum_i f(s_i^2)(t_i+t_{i-1})|P_i|&=\sum_i f(s_i^2)2s_i|P_i|\\&=2\sum_i s_if(s_i^2)|P_i| \end{align*}\] But this is precisely the Riemann sum for \(xf(x^2)\) on \(I\), using the partition \(P\)! Thus we’ve shown for any partition \(P\), and midpoint samples \(S\)

\[\rsum{I^2}(f(x),P^2,S^2)=2\rsum{I}(xf(x^2),P,S)\]

Finally, we can begin the computation. Let \(P_n\) be a sequence of shrinking partitions on \([a,b]\) and \(S_n\) the corresponding sequences of midpoints. Then the squares \(P_n^2\) form a sequence of shrinking partitions on the interval \([a^2,b^2]\) which we may use to compute the integrals \(\int_{[a,b]}xf(x^2)\) and \(\int_{[a^2,b^2]}f(x)\) respectively.

\[\begin{align*} \int_{[a^2,b^2]}f(x)&=\lim \rsum{[a^2,b^2]}(f(x),P_n^2,S_n^2)\\ &=2\lim \rsum{[a,b]}(xf(x^2),P_n,S_n)\\ &= 2\int_{[a,b]} xf(x^2) \end{align*}\]

Exercise 30.7 Verify the fact used in the proof: if \(P_n\) is any sequence of partitions of \([a,b]\) with \(\max_W(P_n)\to 0\) then the max-widths of the corresponding sequence \(P_n^2\) on \([a^2,b^2]\) also goes to zero.