Femtobytes
Problem type

Integral from the definition with upper and lower sums

What it solves
Show from the definition that an increasing polynomial is Riemann integrable on an interval, and compute the integral exactly by trapping the area between lower and upper sums over n equal pieces.
Subject
Real Analysis
Topic
The integral, built from nothing
Also called
Riemann sum, upper and lower sums, Darboux, integral from first principles
Your problem

Show from the definition that this integral exists, and compute it with lower and upper sums. The picture is drawn with 6 pieces.

∫02x2 dx\int_{0}^{2} x^{2} \, dx
Invent a new one:
The problem

Show from the definition that this integral exists, and compute it with lower and upper sums. The picture is drawn with 6 pieces.

∫02x2 dx\int_{0}^{2} x^{2} \, dx
The result
∫02x2 dx=83\int_{0}^{2} x^{2} \, dx = \frac{8}{3}

The function is integrable: over nn equal pieces the upper and lower sums differ by exactly 8n\frac{8}{n}, and both converge to 83\frac{8}{3}.

checked 18 lines of this solution were evaluated with exact arithmetic before it was shown to you. A solution with a false line is never served.
Picture 1 of 7Step 1: Say exactly what "integrable" and "the integral" mean
lower rectanglesextra in the upper rectanglesgraph of fa = 0b = 2input x, cut into 6 equal piecesoutput f(x)
The graph over the interval cut into 6 equal pieces. On each piece the lower rectangle reaches up to the least value and the upper rectangle to the greatest value; the strip between them is that piece's share of the gap. With n=6n = 6 the lower sum is 5527\frac{55}{27} and the upper sum is 9127\frac{91}{27}; the integral, 83\frac{8}{3}, lies between them.
1

Say exactly what "integrable" and "the integral" mean

Why this step

"Area under a curve" is a picture, not a definition: a curved region has no formula for its area until we make one. The definition builds that meaning out of the one area everybody agrees on, the rectangle, and everything we do afterwards is forced by it.

Claim: f(x)=x2 is integrable on [0,2] and ∫02x2 dx=83\text{Claim: } f(x) = x^{2} \text{ is integrable on } [0, 2] \text{ and } \int_{0}^{2} x^{2} \, dx = \frac{8}{3}
Two things to prove: the vice closes, and the number it traps is 83\frac{8}{3}.
2

Choose the partitions: n equal pieces

Why this step

The definition asks only that SOME partition works for each ε\varepsilon. We are free to pick the friendliest family there is. Equal pieces make every width the same number, which lets that width come out of the sums as a common factor. Unequal pieces would prove the same thing with far uglier algebra.

Δx=2n\Delta x = \frac{2}{n}
Cut [0,2][0, 2], which has length 2−0=22 - 0 = 2, into nn equal pieces. Each piece has this width. checked
xi=2in(i=0,1,2,…,n)x_i = \frac{2 i}{n} \qquad (i = 0, 1, 2, \ldots, n)
Start at the left end 00 and take ii steps of width Δx\Delta x. Check the two ends: i=0i = 0 gives x0=0x_0 = 0 and i=ni = n gives xn=0+2=2x_n = 0 + 2 = 2.

Call this partition PnP_n. There is one for every natural number nn; larger nn means thinner pieces.

3

Find the least and greatest value on each piece

Why this step

A lower sum needs the least value mim_i on every piece and an upper sum the greatest value MiM_i. Hunting for those on nn separate pieces sounds hopeless. It becomes trivial the moment we know the function only ever goes up: then the least value is at the left end of a piece and the greatest at the right end. So the real task is to prove the function goes up.

Take any two inputs with 0≤s<t≤20 \le s < t \le 2. Every term of ff is a number that is not negative times a power of xx, and for inputs that are not negative a bigger input gives a bigger (or equal) power: s<ts < t gives s2<t2s^2 < t^2 and s3<t3s^3 < t^3, because multiplying an inequality between non-negative numbers by non-negative numbers keeps its direction. Adding the terms keeps it too:

s2≤t2s^{2} \le t^{2}
So f(s)≤f(t)f(s) \le f(t) whenever s<ts < t in the interval: the function is increasing there. checked
mi=f(xi−1),Mi=f(xi)m_i = f(x_{i-1}), \qquad M_i = f(x_i)
On the piece [xi−1,xi][x_{i-1}, x_i] the least value is taken at the left end and the greatest at the right end.
4

Measure the gap between the upper and lower sums

Why this step

Integrable means the gap U−LU - L can be pushed under any ε\varepsilon. So before computing either sum we compute their DIFFERENCE, and something remarkable happens: almost everything cancels, and the gap turns out not to depend on the details of ff at all, only on its two end values.

Subtract the sums piece by piece. Both use the same width Δx\Delta x, so on piece ii the difference is (Mi−mi)Δx=(f(xi)−f(xi−1))Δx\left( M_i - m_i \right) \Delta x = \left( f(x_i) - f(x_{i-1}) \right) \Delta x.

U(Pn,f)−L(Pn,f)\displaystyle U(P_n, f) - L(P_n, f)==∑i=1n(f(xi)−f(xi−1))Δx\displaystyle \sum_{i=1}^{n} \left( f(x_i) - f(x_{i-1}) \right) \Delta x
Subtract piece by piece, using Mi=f(xi)M_i = f(x_i) and mi=f(xi−1)m_i = f(x_{i-1}) from the previous step. checked
==2n(4−0)\displaystyle \frac{2}{n} \left( 4 - 0 \right)
Δx\Delta x is the same in every term, so it comes out as a common factor. What remains telescopes to f(2)−f(0)=4−0f(2) - f(0) = 4 - 0. checked
==8n\displaystyle \frac{8}{n}
4−0=44 - 0 = 4, and 2⋅4=82 \cdot 4 = 8. checked

So U(Pn,f)−L(Pn,f)=8nU(P_n, f) - L(P_n, f) = \frac{8}{n}. Picture it: slide all the little gap rectangles sideways into one column. They stack to height f(2)−f(0)f(2) - f(0) and the column is one piece wide.

8n<ε\frac{8}{n} < \varepsilon
What integrability demands.
8<εn8 < \varepsilon n
Multiply both sides by nn, which is positive, so the sign stays. checked
n>8εn > \frac{8}{\varepsilon}
Divide both sides by ε\varepsilon, which is positive, and read from right to left. checked
5

Compute the upper sum exactly

Why this step

We know a single number is trapped. To name it we need a formula for U(Pn,f)U(P_n, f) in which nn appears so plainly that we can watch what happens as nn grows. The sum has nn terms, so it changes length as nn changes; our job is to replace that moving target with a fixed expression.

Put xi=2inx_i = \frac{2 i}{n} into ff, multiply out, and multiply by the width Δx=2n\Delta x = \frac{2}{n}. Then reorganise the sum:

U(Pn,f)\displaystyle U(P_n, f)==∑i=1nf(xi) Δx\displaystyle \sum_{i=1}^{n} f(x_i) \, \Delta x
The definition of the upper sum, with Mi=f(xi)M_i = f(x_i) and every width equal to Δx\Delta x. checked
==∑i=1n(2in)2⋅2n\displaystyle \sum_{i = 1}^{n} \left( \frac{2 i}{n} \right)^{2} \cdot \frac{2}{n}
Write f(xi)f(x_i) and Δx\Delta x out in full. checked
==∑i=1n(4i2n2)⋅2n\displaystyle \sum_{i = 1}^{n} \left( \frac{4 i^{2}}{n^{2}} \right) \cdot \frac{2}{n}
Multiply out f(xi)f(x_i) and collect powers of ii. The letter ii is the only thing that changes from term to term; nn is fixed while we add. checked
==8n3(∑i=1ni2)\displaystyle \frac{8}{n^{3}} \left( \sum_{i = 1}^{n} i^{2} \right)
A finite sum can be added in any order, so add all the constant parts together, all the ii parts together, and so on. Anything that does not contain ii is a common factor and comes out in front of its ∑\sum. checked
==8n3⋅n(n+1)(2n+1)6\displaystyle \frac{8}{n^{3}} \cdot \frac{n \left( n + 1 \right) \left( 2 n + 1 \right)}{6}
Replace each sum of powers by its closed formula. checked

Now simplify each piece on its own, so that no step hides anything:

8n3⋅n(n+1)(2n+1)6\displaystyle \frac{8}{n^{3}} \cdot \frac{n \left( n + 1 \right) \left( 2 n + 1 \right)}{6}==8(2n3+3n2+n)6n3\displaystyle \frac{8 \left( 2 n^{3} + 3 n^{2} + n \right)}{6 n^{3}}
Multiply out the brackets: n(n+1)(2n+1)=2n3+3n2+nn \left( n + 1 \right) \left( 2 n + 1 \right) = 2 n^{3} + 3 n^{2} + n. Then write everything as one fraction. checked
==83+4n+43n2\displaystyle \frac{8}{3} + \frac{4}{n} + \frac{4}{3 n^{2}}
Divide each term on top by 6n36 n^{3} separately. For example n3n3=1\frac{n^{3}}{n^{3}} = 1 and n2n3=1n\frac{n^{2}}{n^{3}} = \frac{1}{n}. checked
U(Pn,f)=83+4n+43n2U(P_n, f) = \frac{8}{3} + \frac{4}{n} + \frac{4}{3 n^{2}}
Add the pieces, collecting the plain numbers, the 1n\frac{1}{n} parts and so on. This is U(Pn,f)U(P_n, f), exactly, for every nn. checked
6

Let n grow, and trap the integral

Why this step

The integral JJ is at least every lower sum and at most every upper sum. If both sums head to the same number as nn grows, JJ has nowhere else to be. This is the squeeze lemma: a quantity held between two sequences with a common limit must equal that limit.

L(Pn,f)\displaystyle L(P_n, f)==U(Pn,f)−(U(Pn,f)−L(Pn,f))\displaystyle U(P_n, f) - \left( U(P_n, f) - L(P_n, f) \right)
The lower sum is the upper sum minus the gap between them. checked
==83+4n+43n2−8n\displaystyle \frac{8}{3} + \frac{4}{n} + \frac{4}{3 n^{2}} - \frac{8}{n}
Put in the upper sum just found, and the gap 8n\frac{8}{n} found earlier. checked
==83−4n+43n2\displaystyle \frac{8}{3} - \frac{4}{n} + \frac{4}{3 n^{2}}
Combine the two 1n\frac{1}{n} parts. This is L(Pn,f)L(P_n, f), exactly, for every nn. checked
L(Pn,f)  ≤  J  ≤  U(Pn,f)for every nL(P_n, f) \; \le \; J \; \le \; U(P_n, f) \qquad \text{for every } n
JJ stands for ∫02x2 dx\int_{0}^{2} x^{2} \, dx. This is what the definition of the integral says.

As nn grows, 1n\frac{1}{n}, 1n2\frac{1}{n^2} and 1n3\frac{1}{n^3} all shrink toward 00 (a fixed number divided by something growing without limit; the problem type "Limit of a sequence from the definition" proves statements like this). So both L(Pn,f)L(P_n, f) and U(Pn,f)U(P_n, f) converge to the plain number in their formulas, 83\frac{8}{3}. The number JJ does not move with nn, yet it is pinned between two sequences that both converge to 83\frac{8}{3}. By the squeeze lemma, J=83J = \frac{8}{3}.

7

Watch the vice close

Why this step

A formula for every nn is convincing on paper; seeing the two sums march toward each other makes it real. Every number in this table is exact before it is rounded for display.

nnL(Pn,f)L(P_n, f)U(Pn,f)U(P_n, f)gap
11008888
22115544
441.751.753.753.7522
10102.282.283.083.080.80.8
1001002.62682.62682.70682.70680.080.08
100010002.6626682.6626682.6706682.6706680.0080.008
Lower and upper sums over n equal pieces. The integral, 8/3, lies between them every time.