30 \(\bigstar\) Examples
30.1 Powers
Proposition 30.1 (Integrating \(f(x)=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 ?thm-compute-integral-sequence, 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 = \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 = \int_{[0,a]}x +\int_{[a,b]}x\] 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 = \frac{b^2-a^2}{2}\]
Exercise 30.1 Complete the general proof by dealing with the cases where \(a,b\) may be negative.
Proposition 30.2 (Integrating \(f(x)=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! There are several facts about exponentials we will need from our previous investigations; listed here for ease of reference.
- Exponentials are always nonzero
- Exponentials are strictly increasing, or strictly decreasing
- Exponentials are differentiable everywhere
Proposition 30.3 (Integrating Exponentials) 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 ?thm-compute-integral-sequence, 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 (Integrating the Natural Exponential) On any interval \([a,b]\) the natural exponential is integrable, and \[\int_{[a,b]}\exp = \exp(b)-\exp(a)\]
30.3 A Logarithm
This next example is much more important (theoretically) than the previous ones: while we long ago proved the existence of logarithm functions, we so far have no formula for actually computing one! Here we produce a first explicit formula for a logarithm as a rather simple integral!
Proposition 30.4 (\(f(x)=1/x\) is Integrable) 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.5 For any positive \(k\in\RR\) and \([a,b]\subset(0,\infty)\), \[\int_{[a,b]}\frac{1}{t}=\int_{[ka,kb]}\frac{1}{t}\]
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. There are various cases depending on where \(x,y\) reside in \((0,\infty)\): we do one here, and leave the remainder as exercises. 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 (?rem-switch-bounds), 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 (?prp-reciprocal-x-scaling).
30.4 Trigonometric Functions
Theorem 30.2 For \(x\in [0,\pi/2]\), the sine function is integrable and \[\int_{[0,x]}\sin = 1-\cos(x)\]
Proof. On the interval \([0,x]\), we use the sequence of evenly spaced shrinking partitions \(P_n\) of width \(\Delta = x/n\), and prove integrability by showing \(\lim L(\sin, P_n)=\lim U(\sin, P_n)\). Because \(\sin\) is monotonically increasing on \([0,\pi/2]\) on any subinterval \(I=[a,b]\) that \(m=\sin a\) and \(M = \sin b\). Thus \[L(\sin, P_n)=\sum_{i=1}^{n}\sin\left((i-1)\Delta\right)\Delta\] \[U(\sin,P_n)=\sum_{i=1}^{n}\sin\left(i\Delta\right)\Delta\]
Using \(\sin(0)=0\) we see the sums agree except for the final term of \(U\), meaning
\[U(\sin,P_n)-L(\sin,P_n)=\sin(n\Delta )\Delta = \sin(x)\frac{x}{n}\]
As \(x\) is a fixed constant this tends to zero as \(n\to\infty\), so \(\sin\) is integrable on \([0,x]\) and we can compute its value as the limit of either the upper or lower sum.
We use the identity for \(\sum_{1\leq k\leq n}\sin kx\) proven in Exercise 21.16: \[U(\sin,P_n)=\sum_{1\leq i\leq n}\sin(i\Delta)\Delta=\frac{\sin\left(\tfrac{n}{2}\Delta\right)\sin\left(\tfrac{n+1}{2}\Delta\right)}{\sin\left(\tfrac{\Delta}{2}\right)}\Delta\]
Substituting back \(\Delta=x/n\) and re-arranging,
\[U(\sin,P_n)=\frac{\sin\left(\frac{x}{2}\right)\sin\left(\frac{n+1}{n}\frac{x}{2}\right)}{\sin\left(\frac{x}{2n}\right)}\frac{x}{n} =\frac{\sin\left(\frac{x}{2}\right)\sin\left(\frac{n+1}{n}\frac{x}{2}\right)}{\frac{\sin\left(x/2n\right)}{x/n}}\]
We evaluate the limit as \(n\to\infty\) using the limit laws. The numerator is immediate \[\sin\left(\frac{x}{2}\right)\sin\left(\frac{n+1}{n}\frac{x}{2}\right)\mapsto \sin\left(\frac{x}{2}\right) \sin\left(\frac{x}{2}\right)\] using that \(\tfrac{n+1}{n}\to 1\) and the continuity of \(\sin\). For the denominator, we use the fact that \(\tfrac{\sin x}{x}\to 1\) (Corollary 27.2) to see
\[\frac{\sin\left(\frac{x}{2n}\right)}{x/n}=\frac{1}{2}\frac{\sin\left(\frac{x}{2n}\right)}{\frac{x}{2n}}\to \frac{1}{2}\]
Thus
\[\lim U(\sin, P_n)=\frac{ \sin\left(\frac{x}{2}\right) \sin\left(\frac{x}{2}\right)}{\frac{1}{2}}=2\sin^2\frac{x}{2}\]
Using the half-angle identity Exercise 21.11, we can rewrite this
\[\lim U(\sin,P_n)=2\frac{1-\cos(x)}{2}=1-\cos x\]
As we’ve already shown \(\sin\) to be integrable, this limit of upper sums over a sequence of shrinking partitions gives the value:
\[\int_{[0,x]}\sin = 1-\cos(x)\]
We can leverage this result and the symmetries of the sine function to calculate the integral over arbitrary intervals:
Exercise 30.5 Prove that \(\sin\) is integrable on the interval \([\pi/2,\pi]\) and for any \(x\in[\pi/2,\pi]\) \[\int_{[\tfrac{\pi}{2},x]}\sin = -\cos(x)\]
Hint: proceed either (1) directly, using the fact that \(\sin\) is decreasing on this interval or (2) using the above, and the symmetry \(\sin(\pi/2+x)=\sin(\pi/2-x)\).
Use this and subdivision to show for any \(x\in[0,\pi]\), \[\int_{[0,x]}\sin = 1-\cos x\]
Corollary 30.2 \[\int_{[0,\pi/2]}\sin = 1\hspace{0.5cm}\textrm{and}\hspace{0.5cm}\int_{[0,\pi]}\sin = 2\]
Exercise 30.6 Use the fact that sine is an odd function and integrable on \([0,\pi]\) to show \(\sin\) is integrable on \([-\pi,0]\) and for any \(x\in[-\pi,0]\) \[\int_{[x,0]}\sin = \cos(x)-1\]
Again by subdivision we can conclude that \(\sin\) is integrable on \([-\pi,\pi]\).
Proposition 30.6 Let \(a,b\in[-\pi,\pi]\). Then \(\sin\) is integrable on \([a,b]\) and \[\int_{[a,b]}\sin = \cos(a)-\cos(b)\]
Proof. We proceed by cases depending on the location of \(a,b\). If both are positive and lie in \([0,\pi/2]\) we evaluate using Exercise 30.5
\[\begin{align*} \int_{[a,b]}\sin &= \int_{[0,b]}\sin - \int_{[0,a]}\sin\\ &=(1-\cos b)-(1-\cos a)\\ &=\cos a-\cos b \end{align*}\]
A similar calculation applies if \(a,b<0\). If \(a<0\) and \(b>0\) we evaluate as
\[\begin{align*} \int_{[a,b]}\sin &= \int_{[a,0]}\sin +\int_{[0,b]}\sin\\ &= (\cos a -1)+(1-\cos b)\\ &= \cos a - \cos b \end{align*}\]
Corollary 30.3 \[\int_{[-\pi,\pi]}\sin = 0\]
Since \(\sin\) is \(2\pi\) periodic this is enough to conclude that \(\sin\) is in fact integrable on any interval
Theorem 30.3 (Integrating sine) Let \(a<b\). Then \(\sin\) is integrable on \([a,b]\) and \[\int_{[a,b]}\sin = \cos(a)-\cos(b)\]
Proof.
This work has immediate payoff for integrating cosine as well, since we know it to be just a shifted version of the sine:
Theorem 30.4 (Integrating cosine) Let \(a<b\). Then \(\cos\) is integrable on \([a,b]\) and \[\int_{[a,b]}\cos = \sin(b)-\sin(a)\]
Exercise 30.7 Prove Theorem 30.4 using that \(\sin(x+\pi/2)=\cos(x)\) and \(\cos(x+\pi/2)=-\sin(x)\) (Exercise 21.14).