The double integral is built from rectangles and step functions by squeezing, exactly as the one-variable integral was. Continuous functions are integrable, Fubini's theorem turns a double integral into two single ones, regions bounded by curves are handled by extending the function by zero, and the same ideas give areas, volumes, masses, moments and triple integrals.
Taught in 375/376Apostol, not taughtBeyond the courseApostol Vol. 2, 11.1 to 11.18MATH 376 Weeks 3 and 4: worksheets 6 to 10, 15 and 27, homework 3 and 4, Midterm 1 problems 2 and 4, practice Midterm 1, Final problems 2, 5(a) and 6(a), practice Final problem 5Fubini, Sugli integrali multipli (1907); Jordan, Remarques sur les integrales definies (1892)
How much sand is in a heap whose height at the point (x,y) is f(x,y)? In one variable (1.5) the answer to ‘area under a curve’ was a squeeze between rectangles. Here the rectangles become boxes standing on a grid, the squeeze is the same, and the new questions are real ones: which functions can be integrated at all, how to evaluate by two integrals one after the other, how to integrate over a disc or a triangle rather than a rectangle, and what changes in three dimensions.
Before you start
1.1: the supremum and infimum. 1.5: step functions and the one-variable integral. 4.3: a continuous function on a compact set is uniformly continuous. 1.6: pointwise and uniform convergence.
Quick checkL is the supremum (least upper bound) of a set A of numbers and ε>0. Which statement is true?
If no element exceeded L−ε, then L−ε would be a smaller upper bound, contradicting that L is the least. The supremum need not be attained (so the last option is false) and most elements can be far below L.Review: the supremum
Quick checkA function on [0,1] equals 1 at rational points and 0 at irrational points. Is it integrable?
Every interval, however short, contains a rational and an irrational number, so on every piece the infimum is 0 and the supremum is 1. The lower integral is 0, the upper is 1, and they differ. Bounded is not enough.Review: the integral in one variable
Quick checkA continuous function on a closed rectangle is uniformly continuous. Why does this need 'closed and bounded'?
Uniform continuity gives one δ for all points. Near the edge of the open square 1/(xy) changes arbitrarily fast, so no single δ works. A closed rectangle is compact, which is what the proof uses.Review: continuous on a compact set
The picture: boxes over a region
Pick the unit disc and f=1, and slide n up. The green cells lie completely inside the region; the orange cells are the ones the boundary passes through. The lower sum counts only the green boxes, the upper sum also counts the orange ones. Their difference is the orange area, which shrinks as the grid gets finer, because the boundary is a curve and a curve has no area. That is the whole idea of the chapter, with the pictures still on the table.
The idea, in words
To integrate f over a rectangle Q, cut Q into a grid. On each cell, put the lowest box that fits under f and the highest box that fits over it. Add the volumes of all the boxes. If lower boxes and upper boxes can be made to differ by as little as we please, there is exactly one number between all lower totals and all upper totals, and that number is the integral. The rest is about three questions. Which functions pass this test? How do we compute? And how do we deal with a region that is not a rectangle?
Why· Why the same idea works for regions that are not rectangles
If S is a disc, put it inside a rectangle and define f to be 0 outside S. The only cells where the extended function can jump from its value to 0 are the cells the boundary passes through. If the boundary can be covered by finitely many rectangles of total area as small as we like, those cells cost almost nothing, and the integral over S exists. A set with that property has content zero, and every graph of a continuous function does. This is the green-and-orange picture above.
Where this came from· Cauchy, Riemann, Jordan and Fubini
Cauchy, in his lectures of 1823, defined the integral of a continuous function as a limit of sums over partitions of an interval. Riemann, in his habilitation essay of 1854 (published after his death, through Dedekind), allowed the sample point in each piece to be arbitrary and asked exactly which functions have an integral. For several variables, Camille Jordan in 1892 (‘Remarques sur les integrales definies’) introduced a class of sets, now said to have Jordan content, over which the Riemann integral makes sense; his definition covers a set by finitely many rectangles from outside and from inside, which is the content-zero idea of this chapter. And the rule that a double integral can be computed as two single ones, in either order, is named after Guido Fubini, who proved it in 1907 (Sugli integrali multipli) for Lebesgue integrable functions; Leonida Tonelli proved the version for non-negative functions in 1909. Special cases, such as Cavalieri’s principle (slice a solid and add the slices) were known centuries earlier. Euler (1769) was the first to study how a double integral changes under a change of variables, a story taken up in 6.4.
Step functions on a rectangle
A rectangle is Q=[a,b]×[c,d]. A partition of Q is a pair of partitions of the sides (1.5), a=x0<⋯<xr=b and c=y0<⋯<ys=d; the grid lines cut Q into rs closed cells, and the open subrectangles are (xi,xi+1)×(yj,yj+1) with the edges left out. Two partitions have a common refinement: use all the cut points of both.
Definition T
Step function on a rectangle
A function s:Q→R is a step function if there is a partition of Q such that s equals a constant cij on the open subrectangle (xi,xi+1)×(yj,yj+1). The values on the grid lines are not constrained. Its integral is
∬Qs=i,j∑cij(xi+1−xi)(yj+1−yj).
In words: for each piece, value times area, then add. Geometrically it is the volume of a stack of boxes.
In one lineA function s:Q→R for which some partition of Q makes s constant on every open subrectangle; its integral is the sum of (value) times (area) over the pieces.
Why it existsStep functions are the stacks of boxes whose volume nobody doubts, so every other integral is defined by squeezing between them.
The integral of a step function does not depend on the partition
If two partitions of Q both make the step function s constant on every open subrectangle, they give the same value of ∑cijareaij.
In one lineTwo partitions that both make s constant on every open piece give the same sum.
Why it is trueWithout it, 'the integral of a step function' would depend on the choice of grid, and nothing built on it would make sense.
ProofMATH 376 lecture Remark 4.3
The idea: Adding one cut line does not change the sum, because a piece with value c and width w split into widths w1 and w2 gives c w1 h plus c w2 h, which is c w h. Both partitions reach their common refinement by adding cuts.
The piece contributes cwh.
This is the definition of the integral, for one piece of width w and height h with value c.
Cut the piece at an inner point of its width into widths w1 and w2 with w1+w2=w. Both new pieces still have value c.
A step function stays constant, with the same value c, on a smaller open piece inside a piece where it was constant.
The two new terms are cw1h+cw2h=c(w1+w2)h=cwh: the sum did not change.
Factor out ch and use w1+w2=w.
So adding any single cut line leaves the sum unchanged, and adding many cuts one at a time leaves it unchanged.
A cut in the height direction works the same way, with h1+h2=h.
Each of the two given partitions reaches the common refinement by adding cuts, so each gives the sum for the common refinement, and so they give the same sum. ■
The common refinement contains every cut of both partitions.
Theorem TMATH 376 homework 3 problem 2; Apostol 11.3
Linearity, additivity and monotonicity of step integrals
Let s and t be step functions on the same rectangle Q. (a) For real numbers c1,c2, the function c1s+c2t is a step function and ∬Q(c1s+c2t)=c1∬Qs+c2∬Qt. (b) If a vertical or horizontal line cuts Q into rectangles Q1 and Q2, then ∬Qs=∬Q1s+∬Q2s. (c) If s≤t at every point, then ∬Qs≤∬Qt.
In one lineFor step functions s,t on the same Q: ∬(c1s+c2t)=c1∬s+c2∬t; ∬Qs=∬Q1s+∬Q2s if a line cuts Q into Q1 and Q2; and s≤t implies ∬s≤∬t.
Why it is trueThese are the three properties used in every sandwich argument: combine two step functions, split a rectangle, and compare.
ProofMATH 376 homework 3 problem 2
The idea: Take the common refinement of the two partitions. On each open piece both functions are constants, so everything becomes a statement about finite sums.
Let P be the common refinement of partitions for s and t, with pieces Rij of area Aij, and values sij,tij.
By the proposition above, we may compute both integrals with the same partition.
(a) On Rij the function c1s+c2t is the constant c1sij+c2tij, so it is a step function.
A linear combination of constants is a constant, so the same partition works.
Split one sum into two, and pull the constants out of the sums.
(b) Add the cut line to P. The sum over all pieces splits into the sum over pieces in Q1, which is ∬Q1s, plus the sum over pieces in Q2.
Adding the cut line to the partition does not change the integral (the proposition), and then every piece lies in Q1 or Q2.
(c) If s≤t everywhere, then sij≤tij and sijAij≤tijAij for every piece; adding gives ∬s≤∬t. ■
On a piece both functions are constant, so s≤t at one point of the piece gives sij≤tij. Areas are non-negative.
Worked example MATH 376 worksheet 6, partitioned rectangles
Let R=[0,2]2. A function f equals 3 on [0,1)×[0,2), equals 5 on [1,2]×[0,1) and equals 1 on [1,2]×[1,2]. Compute ∬Rf.
Solution.
Recognize a step function. The grid lines x=0,1,2 and y=0,1,2 make f constant on each piece. The values on the cut lines do not matter.
Left strip. Value 3, area (1−0)(2−0)=2, term 6.
Bottom right. Value 5, area 1, term 5.
Top right. Value 1, area 1, term 1.
Add.6+5+1=12. Value times area, summed over the pieces.
Answer.12.
Worked example MATH 376 worksheet 6, indicator sums
Let R1=[0,2]×[1,3], R2=[1,3]×[0,2], and g=4IR1−2IR2 on [0,3]2, where IR is 1 on R and 0 off it. Compute ∬g by linearity and again as one step function.
Solution.
By linearity. Each indicator is a step function and ∬IR is the area of R. Both rectangles have sides 2 and 2, so area 4. So ∬g=4⋅4−2⋅4=8.
As one step function. The rectangles overlap in [1,2]×[1,2]. There both indicators are 1, so the values add: g=4−2=2. The trap is overlap: letting the last rectangle win instead of adding the values gives a different number.
List the pieces.R1 only: [0,1]×[1,3] (value 4, area 2, term 8) and [1,2]×[2,3] (value 4, area 1, term 4). Both: [1,2]×[1,2] (value 2, area 1, term 2). R2 only: [1,3]×[0,1] (value −2, area 2, term −4) and [2,3]×[1,2] (value −2, area 1, term −2).
Add.8+4+2−4−2=8.
Answer.8 both ways.
Worked example MATH 376 worksheet 6, floor function
Compute ∬[0,2]2(⌊x⌋+⌊y⌋)dA, where ⌊u⌋ is the largest integer not above u.
Solution.
Find the pieces. The floor is constant on each interval [n,n+1), so ⌊x⌋+⌊y⌋ is constant on each unit square of the grid with cuts at 0,1,2. It is a step function.
Values. On (0,1)×(0,1): 0+0=0. On (1,2)×(0,1): 1+0=1. On (0,1)×(1,2): 0+1=1. On (1,2)×(1,2): 1+1=2. Read ⌊x⌋+⌊y⌋, not ⌊x+y⌋.
Add the terms. Each piece has area 1, so the integral is 0+1+1+2=4. The jumps on the lines x=1 and y=1 do not matter: those lines have no area.
Answer.4.
Integrable functions
Definition T
Double integral
Let f:Q→R be bounded, so ∣f∣<C for some C. Then the constant step functions −C and C lie below and above f, so both of the following sets are non-empty:
I(f)=sup{∬Qs:s a step function,s≤f},I(f)=inf{∬Qt:t a step function,t≥f}.
By monotonicity, if s≤f≤t then ∬s≤∬t, so I(f)≤I(f) always. The function f is integrable on Q if I(f)=I(f); the common value is the double integral∬Qf (or ∬QfdA, or ∬Qf(x,y)dxdy). For f≥0 it is the volume of the solid under the graph.
In one lineFor a bounded f on a rectangle Q, the lower integral is the supremum of ∬s over step functions s≤f, the upper integral is the infimum of ∬t over step functions t≥f; if they are equal, f is integrable and the common value is ∬Qf.
Why it existsIt defines the volume under a graph as the only number that no stack of boxes below can exceed and no stack of boxes above can undercut.
Integrable means one equation between two numbers. It does not say that some step function equals f, nor that a best lower step function and a best upper step function exist.
Quick checkA function f:[0,1]2→R is bounded. Which statement is correct?
Boundedness only makes the two sets of step integrals non-empty. The function that is 1 when both coordinates are rational and 0 otherwise takes only the values 0 and 1 and is not integrable.
Worked example MATH 376 Final problem 6(a), lost 1 point; see [A.4](/vol2/a4-final/) and [A.1](/vol2/a1-what-you-lost-points-on/)
True or false: every bounded function f:[0,1]2→R is integrable. If false, give a counterexample.
Solution.
State the answer. False. ‘The volume under a bounded function is finite so its integral is defined’ is not an argument: finiteness of the bounds is not equality of the lower and upper integrals.
Define the function.f(x,y)=1 if both x and y are rational, and f(x,y)=0 otherwise. It satisfies 0≤f≤1, so it is bounded.
Every open piece has both kinds of points. Between any two real numbers there is a rational and an irrational number, so every open subrectangle contains a point with both coordinates rational and a point with an irrational coordinate.
Lower integral. If s≤f has value sij on a piece, evaluating at a point of the piece with an irrational coordinate gives sij≤0. So ∬s=∑sijAij≤0. The zero function is below f, so I(f)=0.
Upper integral. If t≥f has value tij on a piece, evaluating at a point with both coordinates rational gives tij≥1. So ∬t≥∑Aij=area(Q)=1. The constant function 1 is above f, so I(f)=1.
Compare.0=1.
Answer.f is bounded and not integrable: I(f)=0=1=I(f).
The epsilon-sandwich
The definition uses a supremum and an infimum, which are hard to compute with. The working form is the following.
Theorem TMATH 376 lecture 4.2; Apostol 11.5
Epsilon-sandwich criterion for the double integral
Let f:Q→R be bounded. Then f is integrable if and only if for every ε>0 there exist step functions s≤f≤t on Q with ∬Q(t−s)<ε. The pair (s,t) may change with ε.
In one lineA bounded f on Q is integrable if and only if for every ε>0 there are step functions s≤f≤t with ∬Q(t−s)<ε.
Why it is trueIt replaces 'sup equals inf' by a statement you can check by building two step functions, and it is the first line of almost every integrability proof.
ProofMATH 376 lecture 4.2
The idea: Forward: use the definition of sup and inf to get a lower step function almost as large as the integral and an upper one almost as small. Backward: the gap between the upper and lower integrals is trapped inside a gap smaller than every positive number.
(⇒) Suppose f is integrable, with common value I, and fix ε>0.
We must produce s and t for this one ε: we choose ε first and the step functions second.
Some step function s≤f has ∬s>I−ε/2.
I is the supremum of the lower set, so I−ε/2 is not an upper bound of it (quiz at the start of the chapter).
Some step function t≥f has ∬t<I+ε/2.
I is the infimum of the upper set, so I+ε/2 is not a lower bound of it.
∬(t−s)=∬t−∬s<(I+ε/2)−(I−ε/2)=ε.
Linearity of the step integral (t−s is a step function), then replace each integral by its bound.
(⇐) For any ε and its pair, ∬s≤I(f)≤I(f)≤∬t.
Suppose a pair exists for every ε. A sup is at least every member of its set, and an inf is at most every member of its set.
So 0≤I(f)−I(f)≤∬t−∬s<ε.
Subtract: the gap between the two integrals is trapped inside the gap between the two step integrals.
The non-negative number I(f)−I(f) is below every ε>0, so it is 0 and f is integrable. ■
Only 0 is below every positive number.
Proof workshopGive the reason for each line: the epsilon-sandwich criterion, forward directionMATH 376 lecture 4.2
Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.
Let I=I(f)=I(f) and fix ε>0.
Choose a step function s≤f with ∬s>I−ε/2.
Choose a step function t≥f with ∬t<I+ε/2.
∬(t−s)=∬t−∬s.
∬t−∬s<ε.
Worked example MATH 376 Midterm 1 problem 4(b), lost 1 point of 3; see [A.2](/vol2/a2-midterm-1/) and [A.1](/vol2/a1-what-you-lost-points-on/)
Let Q=[a,b]×[c,d] and f:Q→[0,1] be integrable. Prove that for every ε>0 there are step functions s≤f≤t with t(x,y)≤2 for all (x,y) and ∬Q(t−s)<ε.
Solution.
Fix ε>0 first.The claim is ‘for every ε there exist’, so ε is chosen first and the functions are built afterwards. They may depend on ε.
Get a pair from integrability.f is bounded (its values lie in [0,1]) and integrable, so by the criterion there are step functions s≤f≤T with ∬(T−s)<ε. T is the upper function that integrability gives. Nothing says T≤2, so we are not finished.
Repair the upper function. Define t=min(2,T). T with every value above 2 replaced by 2.
t is a step function. Take a partition on which T is constant on each open piece; there t=min(2,that constant) is also constant. The minimum of two constants is a constant, so the same partition works.
t≥f. We have f≤T by the choice of T and f≤1≤2 by the range of f, so f≤min(2,T)=t. A number below two numbers is below their minimum.
t≤2 and t≤T. A minimum is at most each of its arguments.
The gap.t−s≤T−s pointwise, and both are step functions, so by monotonicity ∬(t−s)≤∬(T−s)<ε.
Answer. The step functions s and t=min(2,T) satisfy s≤f≤t≤2 and ∬(t−s)<ε.
Watch out· Why 'the biggest step function below f' does not exist
On the 376 midterm, a student wrote that if f is integrable, then ‘the biggest of all the step functions smaller than it is equal to the smallest of all the step functions greater than it’, called them s and t, and concluded t=s≤f≤1. That is wrong twice. First, such extreme step functions need not exist: integrable says that two numbers (a sup and an inf) are equal, and a supremum does not have to be attained by any step function. Second, equal numbers do not make equal functions. Take f(x,y)=x on [0,1]2: on any piece a step function below f is at most the left edge of the piece and one above is at least the right edge, so t−s≥ the width of the piece on every piece, and ∬(t−s)>0 for every pair. Only the infimum of those integrals is 0. The integral of the gap gets small and is never zero. Hence the habit: write the quantifiers first, ‘Fix ε>0. I must produce s and t’, then produce them, then check each required property on its own line.
Proof workshopRebuild the solution of Midterm 1 problem 4(b)MATH 376 Midterm 1 problem 4(b)
Tap the lines in the order a proof would write them. Each line can only use what is already above it.
The claim is for every epsilon, so epsilon comes first and the functions may depend on it.
The epsilon-sandwich criterion, which applies because f is bounded and integrable.
You need epsilon fixed before you can ask for a pair of step functions.
T may exceed 2 somewhere, so we clip it; on each piece the minimum of two constants is a constant.
You need T from the criterion before you can clip it.
A number that is at most each of two numbers is at most their minimum.
The function t must be defined before you check its properties.
A minimum is at most each of its arguments.
This uses the definition of t as a minimum.
Monotonicity of the step integral, since both differences are step functions and one is below the other.
You need t minus s to be below T minus s first.
Worked example MATH 376 practice Midterm 1 problem 4(b); see [A.5](/vol2/a5-practice-exams/)
Let f,g:Q→R be integrable. Prove that h=f+g is integrable.
Solution.
Bounded. If ∣f∣<Cf and ∣g∣<Cg then ∣f+g∣<Cf+Cg. The criterion applies only to bounded functions.
Fix ε>0. Choose step functions sf≤f≤tf with ∬(tf−sf)<ε/2 and sg≤g≤tg with ∬(tg−sg)<ε/2. We use ε/2 so that the two errors add up to ε.
Add.sh=sf+sg and th=tf+tg are step functions (use the common refinement), and adding the inequalities gives sh≤h≤th.
The gap. By linearity ∬(th−sh)=∬(tf−sf)+∬(tg−sg)<ε/2+ε/2=ε.
Answer. Since ε was arbitrary, h is integrable by the criterion.
Which functions are integrable?
Theorem TMATH 376 lecture Thm 4.8; Apostol 11.10
Continuous functions on a rectangle are integrable
If f:Q→R is continuous on the closed rectangle Q, then f is integrable on Q.
In one lineIf f is continuous on a closed rectangle Q, then f is integrable on Q.
Why it is trueIt covers almost every function you will ever integrate by writing a formula, and its proof is the first use of uniform continuity.
ProofMATH 376 lecture Thm 4.8
The idea: Cut Q into cells so small that f hardly changes on a cell, by uniform continuity. Use the least and greatest value on each cell as the lower and upper step functions.
Let η>0 and put ε=η/area(Q).
We want the final gap to be below η; it will be at most ε times the area. (If the area is 0, every step integral is 0 and there is nothing to prove.)
There is δ>0 with ∣f(x)−f(y)∣<ε whenever ∥x−y∥∞<δ.
Q is closed and bounded, hence compact, so a continuous f is uniformly continuous on it (4.3). One δ works for the whole of Q; this step fails for continuous functions on open sets, such as 1/(xy) on (0,1)2.
Choose a partition of Q into cells with width and height less than δ.
Any two points of one cell are less than δ apart in the maximum norm.
On each closed cell Rk let mk and Mk be the least and greatest values of f; then Mk−mk<ε.
Extreme value theorem (4.3): a continuous function on a compact cell attains its least and greatest values at two points of the cell.
Put s=mk and t=Mk on the open cell inside Rk, and s=−C, t=C on the grid lines. Then s≤f≤t.
These are step functions for the partition. The values on cut lines are free, so we make them harmless: ∣f∣<C and ∓C lie below and above.
∬(t−s)=∑k(Mk−mk)area(Rk)<εarea(Q)=η.
The cut lines add nothing, and the cell areas add up to the area of Q.
A sandwich with gap below η exists for every η>0, so f is integrable. ■
The criterion with η in place of ε.
Continuous is too strong: we want to integrate a function that is 1 on a disc and 0 outside, which jumps along a circle. The tool is a way to say that a set has no area.
Definition T
Content zero
A set S⊂R2 has content zero if for every ε>0 there are finitely many open rectangles R1,…,RK with S⊂R1∪⋯∪RK and area(R1)+⋯+area(RK)≤ε.
In one lineA set S⊂R2 has content zero if for every ε>0 it can be covered by finitely many open rectangles of total area at most ε.
Why it existsIt is the right notion of 'too small to matter' for the Riemann integral: a function that is bounded and discontinuous only on a set of content zero is integrable.
A single point has content zero (cover it by a square of side ε/2), and a finite union of sets of content zero has content zero (use ε/m for each of m sets). The word finite is needed: the set of rational points of [0,1]2 is a countable union of points, yet it cannot be covered by finitely many rectangles of small total area, because a point of the square outside all the rectangles and off their edges would have a small disc around it missing the rectangles, and that disc contains a rational point.
Lemma TMATH 376 worksheet 7 problem 6; Apostol 11.9
The graph of a continuous function has content zero
Let φ:[a,b]→R be continuous with a<b. Then the graph of φ has content zero. The same holds for a graph x=ψ(y).
In one lineIf φ:[a,b]→R is continuous, its graph {(x,φ(x))} has content zero.
Why it is trueIt shows that regions bounded by graphs of continuous functions have boundaries that cost nothing, which is why they have an area.
ProofMATH 376 worksheet 7 problem 6
The idea: Uniform continuity: over a short interval the function barely moves, so the graph over that interval sits in a thin box. Add up the thin boxes.
Let ε>0 and κ=ε/(2(b−a)).
Each box will have height below κ and the total width is b−a, so the total area is below κ(b−a)=ε/2. The other ε/2 pays for making the boxes open.
Pick δ>0 with ∣x−y∣<δ⇒∣φ(x)−φ(y)∣<κ/2.
φ is continuous on the closed interval [a,b], hence uniformly continuous.
Cut [a,b] into n intervals I1,…,In of width Δ=(b−a)/n<δ.
Equal widths make the area count easy.
The graph over Ij lies in a rectangle of width about Δ and height less than κ.
Any two points of Ij are within Δ<δ, so any two values of φ on Ij differ by less than κ/2. Enlarging slightly makes the box open.
The total area is at most nΔκ=ε/2, plus at most ε/2 for the enlargements. So the graph has content zero. ■
nΔ=b−a; the enlargement can be made as small as we like.
Theorem TMATH 376 lecture Thm 4.15; Apostol 11.11
Bounded with discontinuities of content zero is integrable
Let f:Q→R be bounded and let D be the set of points of Q where f is not continuous. If D has content zero, then f is integrable on Q.
In one lineIf f is bounded on a rectangle Q and the set of points where f is not continuous has content zero, then f is integrable on Q.
Why it is trueIt is the theorem that makes the integral over a disc, a triangle or a region between curves exist.
ProofMATH 376 lecture Thm 4.15
The idea: Cover D by thin rectangles and use the crude bounds plus or minus C on them. Outside the rectangles f is continuous on closed cells, so the previous theorem gives a good sandwich there.
Let ∣f∣<C and fix ε>0.
f is bounded; fix the target ε first.
Cover D by open rectangles R1,…,RK of total area at most ε.
Definition of content zero.
Extend the edges to cut Q into finitely many closed cells, say m of the second kind below. Each cell is either inside the closure of some Rk (first kind) or misses every Rk (second kind).
Extending all edges of all Rk across Q gives a finite grid, so a partition of Q. The open inside of a cell lies wholly inside or wholly outside each Rk, because no edge of any Rk cuts through it.
The cells of the first kind have total area at most ε.
These cells sit inside the closures of the Rk.
On each second-kind cell there are step functions sG≤f≤tG with ∬G(tG−sG)<ε/m.
A cell G of the second kind misses every Rk, hence misses D⊂⋃Rk (a point of G lying in an open Rk would put points of the interior of G in Rk as well, so G would not be of the second kind); then f is continuous at every point of G. The theorem for continuous functions applies to f on G; we ask for ε/m so the m errors add up to ε.
Put s=sG, t=tG on the open second-kind cells, and s=−C, t=C on first-kind cells and on all cut lines. Then s≤f≤t.
Lines have no area, so the choice on them costs nothing.
∬(t−s)<m⋅ε/m+2Cε=(1+2C)ε. By the criterion f is integrable. ■
Second-kind cells contribute less than ε/m each; first-kind cells have height difference 2C and total area at most ε. C is fixed in advance, so ε can be chosen to make (1+2C)ε small.
What fails without each hypothesis. Without boundedness the lower and upper integrals do not exist. Without content zero, the function above that is 1 at rational points and 0 elsewhere is discontinuous everywhere and not integrable. Content zero is the right size: small enough not to matter.
Quick checkOn [0,1]2 let h(x,y)=1 if x=y and h(x,y)=0 otherwise. Which statement is correct?
Infinitely many discontinuities are allowed as long as they fit in a set of content zero, and the diagonal is the graph of y=x. Cover it by n squares of side 1/n with total area 1/n: the upper step function that is 1 on them has integral 1/n, and the lower integral is 0. A line has length but no area, so the integral is 0. The same argument shows a function that is 1 at one point and 0 elsewhere has integral 0.
Iterated integrals: Fubini
Definition T
Iterated integral
An iterated integral is two ordinary integrals, one inside the other. ∫cd(∫abf(x,y)dx)dy means: for each fixed y compute A(y)=∫abf(x,y)dx (treating y as a constant), then integrate A(y) over y from c to d. The inner variable is the one whose d appears first.
In one line∫cd(∫abf(x,y)dx)dy: for each fixed y integrate in x from a to b to get a number A(y), then integrate A(y) in y from c to d.
Why it existsIt reduces a double integral to two single integrals, each of which can be computed with the antiderivatives of first-year calculus.
Fubini's theorem for continuous functions on a rectangle
If f is continuous on Q=[a,b]×[c,d], then f is integrable and
∬Qf=∫cd∫abf(x,y)dxdy=∫ab∫cdf(x,y)dydx.
More generally, the first equality holds whenever f is integrable on Q and the inner integral ∫abf(x,y)dx exists for every y (this is what Steps 1 to 4 of the proof show); the second holds when f is integrable and the other inner integrals exist.
In one lineIf f is continuous on Q=[a,b]×[c,d], then ∬Qf=∫cd∫abfdxdy=∫ab∫cdfdydx.
Why it is trueIt lets you compute a double integral with two antiderivatives, in whichever order is easier.
ProofMATH 376 lectures 4.6, 4.7
The idea: Do it for step functions (a constant piece checks by hand). For a general integrable f, the iterated integral is squeezed between the iterated integrals of step functions below and above. For continuous f, uniform continuity shows the inner integral is a continuous function of y, so the outer integral exists.
Step 1: let s≤f≤t be step functions with s=−C and t=C on all grid lines.
The values of a step function on the grid lines are free. If ∣f∣<C, lowering s to −C and raising t to C on the grid lines keeps s≤f≤t and changes neither ∬s nor ∬t (lines have no area). We do this so that every slice is a step function of one variable.
Then y↦∫absdx is a step function of y whose integral is ∬Qs, and the same holds for t.
For y strictly between two grid lines, x↦s(x,y) equals the constant cij on the open interval (xi,xi+1), so its integral is ∑icij(xi+1−xi); for y on a grid line it is −C(b−a). Multiplying by the heights yj+1−yj and adding gives exactly the step-function term.
Step 2: suppose f is integrable and the inner integral A(y)=∫abf(x,y)dx exists for every y. Then ∫absdx≤A(y)≤∫abtdx for every y.
One-variable integrals preserve inequalities: s(x,y)≤f(x,y)≤t(x,y) for each fixed y, and the middle integral exists by assumption.
Hence A is integrable on [c,d] and ∬s≤∫cdA≤∬t for all such s,t.
So A is squeezed between two step functions of y, and the one-variable sandwich criterion (1.5) says A is integrable, with ∫cdA between their integrals, which are ∬s and ∬t.
Hence I(f)≤∫cdA≤I(f), and since f is integrable both bounds equal ∬Qf.
A number above every member of the lower set is above its supremum; a number below every member of the upper set is below its infimum.
Now let f be continuous.
Step 3: a continuous f is integrable by the previous theorem, and each x↦f(x,y) is continuous, so A(y) exists.
A is continuous: ∣A(y)−A(y′)∣≤∫ab∣f(x,y)−f(x,y′)∣dx≤ε(b−a).
Uniform continuity on the closed rectangle: given ε there is one δ with ∣f(x,y)−f(x,y′)∣<ε for all x whenever ∣y−y′∣<δ. This is exactly where it is needed.
So ∫cdA exists, and by Step 2 it equals ∬Qf. ■
A continuous function on [c,d] is integrable, so the last hypothesis of Step 2 holds. The other order follows by swapping the letters x and y.
What fails without each hypothesis. The proof only treats rectangles; other regions are handled below by extending with zero. And ‘continuous’ can be weakened to ‘integrable and every inner integral exists’, not further: take f(x,y)=1 if y=21 and x is rational, and f=0 otherwise, on [0,1]2. It is integrable by the theorem above, because its discontinuities lie on the segment y=21, a graph of content zero, and its double integral is 0; but for y=21 the inner integral is the integral of the Dirichlet function, which does not exist, so A(21) is undefined.
Quick checkYou must compute ∬[0,1]×[0,1]xexydA. Which order is easier?
In y the inner antiderivative is exy at once, because ∂y∂exy=xexy. In x it would need integration by parts. Fubini says both orders give the same number, so pick the easier one.
Separable integrands. If f(x,y)=g(x)h(y) with g,h continuous and the region is a rectangle, then ∬f=(∫abg)(∫cdh), because the inner integral treats h(y) as a constant. Both hypotheses are needed: over a triangle the limits of one integral depend on the other variable, and for f=xy+1, which is not a product, the factored formula fails.
Worked example MATH 376 Midterm 1 problem 2, 6 points; see [A.2](/vol2/a2-midterm-1/). The sibling on the practice exam, $3yx^2$ on $[1, 2] \times [0, 1]$, gives $\frac72$.
Justify why F(x,y)=ycos(xy) is integrable on R=[0,2π]×[0,21] and compute ∬RF.
Solution.
Integrable.F is a product and composition of continuous functions, so it is continuous on the closed rectangle R; by the theorem, F is integrable. Name the theorem: a continuous function on a closed rectangle is integrable.
Fubini.∬RF=∫01/2∫02πycos(xy)dxdy. For a continuous function on a rectangle. We integrate in x first because dxdsin(xy)=ycos(xy).
Inner integral.∫02πycos(xy)dx=[sin(xy)]x=0x=2π=sin(2πy). y is held constant.
Outer integral.∫01/2sin(2πy)dy=[−2πcos(2πy)]01/2=2π1+2π1=π1. cosπ=−1 and cos0=1.
Answer.π1.
Worked example MATH 376 worksheet 7 problems 1 to 3
(a) Fubini. The integrand is a polynomial, so continuous. Inner (in x, y constant): ∫01(6x2y+4y3)dx=[2x3y+4y3x]01=2y+4y3. Treat y as a number.
(a) Outer.∫02(2y+4y3)dy=[y2+y4]02=4+16=20.
(b) Separable. The integrand is g(x)h(y) on a rectangle with g=sin, h=exp continuous, so the integral factors: ∫0πsinxdx⋅∫01eydy=2⋅(e−1).
(c) Choose the order. The integrand is continuous since 1+xy≥1. Integrate in y first: ∫011+xyxdy=[ln(1+xy)]y=0y=1=ln(1+x). dydln(1+xy)=1+xyx. In x first the antiderivative would be harder.
(c) Outer.∫12ln(1+x)dx=∫23lnudu=[ulnu−u]23=(3ln3−3)−(2ln2−2)=3ln3−2ln2−1. Substitute u=1+x; an antiderivative of lnu is ulnu−u (differentiate it to check).
Answer. (a) 20; (b) 2(e−1); (c) 3ln3−2ln2−1≈0.9095. (Homework 3 problem 4, ∬[0,1]×[0,2π](xsiny+xexy)dA=2πe2π−1−1, and problem 5, ∬[1,2]2(yx+xy)dA=3ln2, are in the ladder.)
Regions that are not rectangles
Definition T
Type I region
A set S⊂R2 is a type I region if S={(x,y):a≤x≤b,φ1(x)≤y≤φ2(x)} with φ1,φ2:[a,b]→R continuous and φ1≤φ2. A vertical line meets it in one segment.
In one lineA region S={(x,y):a≤x≤b,φ1(x)≤y≤φ2(x)} with φ1≤φ2 continuous: between a lower curve and an upper curve.
Why it existsEvery vertical line meets it in one segment, which is what lets the inner integral run in y with limits that depend on x.
Definition T
Type II region
A set is a type II region if S={(x,y):c≤y≤d,ψ1(y)≤x≤ψ2(y)} with ψ1,ψ2 continuous on [c,d] and ψ1≤ψ2. A horizontal line meets it in one segment. A region of both types, such as a disc or a triangle, can be integrated in either order, which is what makes reversing the order possible.
In one lineA region S={(x,y):c≤y≤d,ψ1(y)≤x≤ψ2(y)} with ψ1≤ψ2 continuous: between a left curve and a right curve.
Why it existsThe same idea with the roles of x and y exchanged; a region of both types can be integrated in either order.
For a bounded S⊂Q and f:S→R, the extension by zero is f~=f on S and 0 on Q∖S, and ∬Sf is defined to be ∬Qf~.
Theorem TMATH 376 lecture Thm 4.18; Apostol 11.12
Integral over a type I region
If S is a type I region and f:S→R is continuous, then f is integrable on S and ∬Sf=∫ab∫φ1(x)φ2(x)f(x,y)dydx. For type II: ∬Sf=∫cd∫ψ1(y)ψ2(y)fdxdy.
In one lineIf S is type I and f is continuous on S, then f is integrable on S and ∬Sf=∫ab∫φ1(x)φ2(x)f(x,y)dydx.
Why it is trueIt is the formula used for almost every double integral over a region between curves; the type II version is the same with the letters exchanged.
ProofMATH 376 lecture Thm 4.18
The idea: Extend f by zero to a rectangle. The extension is continuous except on the boundary of S, which is made of two graphs and two vertical segments, all of content zero. So it is integrable, and Fubini reads off the formula.
Put S inside Q=[a,b]×[c,d] with c≤minφ1 and d≥maxφ2, and let f~ be the extension by zero.
The continuous functions φi are bounded on [a,b], so a rectangle containing S exists.
f~ is continuous at every point not on the boundary of S.
Near an interior point of S, f~=f, which is continuous; near a point outside S, f~ is the constant 0.
The boundary lies in the union of two graphs and two vertical segments, which has content zero.
The graph lemma, applied to φ1, φ2 and the two vertical segments x=a, x=b (graphs x=ψ(y)); a finite union of sets of content zero has content zero.
So f~ is bounded with discontinuities of content zero and is integrable on Q.
f is continuous on the compact set S, hence bounded; then the theorem on bounded functions with discontinuities of content zero applies.
Fubini (Step 2 of its proof) with x outer and y inner; the inner integral exists, and f~(x,⋅) is zero outside [φ1(x),φ2(x)] and equals f on it.
Quick checkWhich iterated integral is the double integral over the triangle with vertices (0,0), (1,0), (1,1)?
The triangle is 0≤x≤1, 0≤y≤x: the outer limits are constants and the inner limit depends on the outer variable. The second integral has an outer limit that contains x, which is meaningless. The third is the whole square.
Three rules follow. The limits of the outer integral are constants. The limits of the inner integral may depend on the outer variable only. Writing ∫0y∫0x…dydx is meaningless.
Worked example MATH 376 worksheet 8 problem 1
Compute ∬D(x+2y)dA where D is the region between y=2x2 and y=1+x2.
Solution.
Find where the curves cross.2x2=1+x2 gives x=±1. Do this before anything else; it gives the limits of the outer integral.
Decide which is on top. For ∣x∣≤1, 2x2≤1+x2, so the lower curve is y=2x2 and the upper is y=1+x2. The region is type I: −1≤x≤1, 2x2≤y≤1+x2.
Outer integral by symmetry. The odd terms x−x3 integrate to 0 over [−1,1], and the even part gives twice the integral over [0,1]: 2∫01(1+2x2−3x4)dx=2(1+32−53)=1532.
Answer.1532.
Worked example MATH 376 worksheet 27 problem 5
Compute ∬T(x+y)dA where T is the triangle with vertices (0,0), (1,0), (1,2), in both orders.
Solution.
Sketch and find the sides. From (0,0) to (1,2): y=2x. From (0,0) to (1,0): y=0. From (1,0) to (1,2): x=1.
Order dydx (type I).0≤x≤1, 0≤y≤2x. Inner: ∫02x(x+y)dy=[xy+2y2]02x=2x2+2x2=4x2. Outer: ∫014x2dx=34.
Order dxdy (type II).0≤y≤2, 2y≤x≤1. Inner: [2x2+xy]y/21=(21+y)−(8y2+2y2)=21+y−85y2. Outer: [2y+2y2−245y3]02=1+2−35=34.
Answer.34 in both orders.
Reversing the order of integration
When an inner integral has no elementary antiderivative (ex2, xsinx, lnx1), switch the order. The recipe with its reasons:
Write the limits as inequalities, for example 0≤y≤1 and y≤x≤1. The region is the set of points satisfying all of them.
Sketch the region. The sketch is where mistakes are caught.
Read it the other way: fix the new outer variable on a constant range and find the segment of the new inner variable.
Integrate with the new inner variable first.
Worked example MATH 376 worksheet 8 problem 4; worksheet 9 problem 1 ($\int_0^\pi\int_y^\pi\frac{\sin x}{x}\,dx\,dy = 2$) and worksheet 7 problem 4 are the same type
Compute ∫01∫y1ex2dxdy by reversing the order.
Solution.
Limits as inequalities.0≤y≤1 and y≤x≤1, that is 0≤y≤x≤1: the triangle with vertices (0,0), (1,0), (1,1). ex2 has no elementary antiderivative in x, so the written order cannot be done.
Read the other way.0≤x≤1 and, for each x, 0≤y≤x. The region is type I and the integrand is continuous, so ∬=∫01∫0xex2dydx.
Inner.∫0xex2dy=xex2. ex2 does not depend on y.
Outer.∫01xex2dx=[21ex2]01=2e−1. The derivative of ex2 is 2xex2.
Answer.2e−1.
Worked example MATH 376 worksheet 10 problems 3 and 4
Reverse the order and compute ∫1e∫0lnxydydx, then check in the written order; and compute ∫0ln2∫ey2lnxdxdy.
Solution.
Limits.1≤x≤e and 0≤y≤lnx. Since y≤lnx is the same as x≥ey, and x≤e forces y≤1, the reversed region is 0≤y≤1, ey≤x≤e.
Integrate.∫01∫eyeydxdy=∫01y(e−ey)dy=2e−∫01yeydy=2e−1. By parts, ∫01yeydy=[yey−ey]01=0−(−1)=1.
Check in the written order. The inner integral is 2(lnx)2, and ∫1e2(lnx)2dx=21[x(lnx)2−2xlnx+2x]1e=21(e−2)=2e−1. Both orders agree.
The second integral.ey≤x≤2 means y≤lnx and 1≤x≤2, so the region is 1≤x≤2, 0≤y≤lnx (the bound y≤ln2 then holds automatically).
Integrate.∫12∫0lnxlnx1dydx=∫12lnxlnxdx=∫121dx=1. The integrand blows up at x=1, but the length lnx of the inner interval cancels it. Strictly the original iterated integral is improper (at y=0 the inner integral ∫12lnxdx diverges), so the equality of the two orders is a statement about this improper integral; the worksheet does not mention it.
Answer.2e−1 and 1.
Your answerCompute ∫01∫y1cos(x2)dxdy by reversing the order.
Sketch the triangle, then let y run from 0 to x.
The region is 0≤y≤x≤1. Reversed: ∫01∫0xcos(x2)dydx=∫01xcos(x2)dx=[21sin(x2)]01=2sin1≈0.4207.
Area, volume and polar coordinates
The area of a region S is ∬S1dA; the volume of the solid between S and a graph z=f(x,y)≥0 is ∬SfdA.
Polar coordinates. Use (r,θ) with x=rcosθ, y=rsinθ, r≥0. A small piece drdθ of the (r,θ) plane becomes a piece of area rdrdθ of the xy-plane, so dA=rdrdθ (proved in 6.4 as the Jacobian determinant of the map). Use polar coordinates when the region is a disc, a sector or a ring, or when the integrand depends on x2+y2. Do not forget the extra factor r.
Worked example MATH 376 worksheet 9 problem 2; worksheet 7 problem 5 (the ball) and worksheet 10 problem 5 (the quarter disc) are the same type
Find the volume above the xy-plane and below z=9−x2−y2, inside the cylinder x2+y2=4.
Solution.
Check the surface is above the plane. On the disc x2+y2≤4, 9−x2−y2≥5>0. So the volume is ∬D(9−x2−y2)dA.
Polar coordinates. The region is a disc and the integrand is 9−r2: 0≤r≤2, 0≤θ≤2π, so V=∫02π∫02(9−r2)rdrdθ. The factor r comes from dA=rdrdθ.
Evaluate. Nothing depends on θ, so the θ integral gives 2π. An antiderivative of 9r−r3 is 29r2−4r4, equal to 18−4=14 at r=2 and 0 at r=0. So V=2π⋅14=28π.
Answer.28π. (The ball of radius R: V=2∫02π∫0RR2−r2rdrdθ=4π⋅3R3=34πR3, with u=R2−r2. The first-quadrant quarter disc of radius 2: ∬(x2+y2)dA=2π∫02r3dr=2π.)
Your answerFind the volume above the xy-plane and below z=4−x2−y2.
The region is the disc of radius 2; the integrand is 4−r2 and the area element rdrdθ.
The surface meets the plane where x2+y2=4. In polar coordinates V=∫02π∫02(4−r2)rdrdθ=2π[2r2−4r4]02=2π(8−4)=8π.
Worked example MATH 376 Final problem 2, lost 1 point; see [A.4](/vol2/a4-final/) and [A.1](/vol2/a1-what-you-lost-points-on/)
The surface S is defined by max(∣x∣,∣y∣,∣z∣)=1. Describe S and find the volume of the solid E it bounds by a triple integral.
Solution.
Read the set aloud.max(∣x∣,∣y∣,∣z∣)=1 means every coordinate satisfies ∣x∣≤1, ∣y∣≤1, ∣z∣≤1, and at least one has absolute value exactly 1. The maximum is 1 when no coordinate exceeds 1 in absolute value and some coordinate reaches 1.
Name the surface. Each coordinate ranges over [−1,1], not [0,1]. So S is the surface of the cube [−1,1]3, with six faces such as x=1, −1≤y,z≤1 (area 2⋅2=4). Test one point of each kind: (−1,0.5,0.2) is on S. On the exam the absolute values were dropped and the set was read as a unit cube in the first octant.
The solid.E=[−1,1]3={max(∣x∣,∣y∣,∣z∣)≤1}.
Volume.∭E1dV=∫−11∫−11∫−11dzdydx=2⋅2⋅2=8.
Answer.S is the surface of the cube [−1,1]3 and Vol(E)=8, not 1. In the divergence theorem question with divF=1, the flux is this volume, 8.
Worked example MATH 376 Final problem 5(a), lost 1 point; practice Final problem 5; see [A.1](/vol2/a1-what-you-lost-points-on/)
Let Vn(t)={x∈[0,1]n:x1+⋯+xn≤t} for t∈[0,1]. Compute its volume by induction. (The case n=3, t=1 is the practice final problem: the volume of the simplex x+y+z≤1 in the unit cube, 61.)
Solution.
Small cases.n=1: V1(t)=[0,t] has length t. n=2: the slice at x2=s is [0,t−s], of length t−s, so Vol(V2(t))=∫0t(t−s)ds=2t2. Discover the pattern; do not assume the answer. Guess Vol(Vn(t))=tn/n!.
State the claim for all t at once.P(n): for every t∈[0,1], Vol(Vn(t))=tn/n!. The induction will use P(n−1) at the different value t−s.
Slice. Assume P(n−1). If x∈Vn(t) then xn∈[0,t], and for xn=s the other coordinates lie in [0,1] with x1+⋯+xn−1≤t−s. So the slice at xn=s is Vn−1(t−s). This is the step that was wrong on the final: the slice is Vn−1(t−s), not Vn−1(t), and the integration variable s is not the parameter t.
Fubini.Vol(Vn(t))=∫0tVol(Vn−1(t−s))ds=∫0t(n−1)!(t−s)n−1ds=[−n!(t−s)n]s=0s=t=n!tn. The volume is the integral of the indicator function of Vn(t), which is bounded and discontinuous only on the boundary of the set (made of pieces of planes, of content zero), so it is integrable and Fubini lets us integrate the slices. For s>t the slice is empty. Check the antiderivative by differentiating in s.
Conclude.P(1) holds and P(n−1) implies P(n), so P(n) holds for all n.
Answer.Vol(Vn(t))=n!tn; for n=3 and t=1 this is 61, which the iterated integral ∫01∫01−x∫01−x−ydzdydx=∫012(1−x)2dx=61 confirms.
Mass, centre of mass and moments
For a flat plate S with density φ(x,y) (mass per unit area) the mass is ∬SφdA, the centre of mass has coordinates xˉm=∬SxφdA and yˉm=∬SyφdA (Apostol 11.16, label A), and the moment of inertia about a line L is IL=∬Sδ2φdA, with δ the distance to L. These are the definitions of 6.1 for wires, with ∬dA in place of ∫ds. The polar moment of inertia about the origin is I0=Ix+Iy=∬(x2+y2)φdA. For constant density the centre of mass is the centroid; an axis of symmetry contains it.
Worked example Apostol 11.16, examples 1 and 2
A thin plate of constant density c is the ring between circles of radii b<a centred at the origin. Find its polar moment of inertia. Then find the centroid of the region under one arch y=sinx, 0≤x≤π.
In terms of the mass. The mass is m=cπ(a2−b2), and a4−b4=(a2−b2)(a2+b2), so I0=2m(a2+b2).
Arch, symmetry. The region is symmetric about x=2π, so xˉ=2π.
Arch, height.yˉ=∬dA∬ydA=∫0πsinxdx∫0π2sin2xdx=2π/4=8π. ∫0sinxydy=2sin2x, and ∫0πsin2xdx=2π.
Answer.I0=2πc(a4−b4)=2m(a2+b2); the centroid of the arch is (2π,8π). A centroid of a triangle by a different route is in 6.4.
Your answerFind yˉ for the region under one arch of y=sinx, 0≤x≤π.
The inner integral of y from 0 to sinx is 2sin2x.
∬ydA=∫0π2sin2xdx=4π and the area is ∫0πsinxdx=2, so yˉ=2π/4=8π≈0.393.
Beyond the course: for understanding· Pappus (label A)
Apostol 11.17 proves two theorems of Pappus: the volume of a solid of revolution is the area of the generating region times the length of the path of its centroid (2πyˉ around the x-axis), and the lateral surface area is the arc length times the path of the centroid of the curve. The semicircle’s centroid at height 2a/π (6.1) recovers the area 4πa2 of a sphere: 2π⋅π2a⋅πa=4πa2.
Triple integrals
Definition T
Triple integral
A box is [a,b]×[c,d]×[e,g]. Partitions, step functions (constant on the open sub-boxes), the step integral (value times volume), lower and upper integrals, the epsilon-sandwich criterion, content zero (with boxes), the integrability of continuous functions and Fubini in any of the six orders all carry over word for word. The triple integral of f over a region E is ∭EfdV, defined by extension by zero. A region between two surfaces, E={(x,y,z):(x,y)∈D,ζ1(x,y)≤z≤ζ2(x,y)} with D type I or II, is integrated as ∬D∫ζ1ζ2fdzdA. The volume of E is ∭E1dV.
In one lineThe triple integral ∭EfdV is defined exactly as the double integral, with boxes [a,b]×[c,d]×[e,g], step functions constant on open sub-boxes, and volume in place of area.
Why it existsNothing in the definition of the double integral used the number of dimensions, so everything carries over to Rn word for word.
Cylindrical coordinates(r,θ,z) use polar coordinates in the xy-plane and keep z: dV=rdzdrdθ. Spherical coordinates(ρ,φ,θ) use x=ρsinφcosθ, y=ρsinφsinθ, z=ρcosφ, with ρ the distance to the origin and φ the angle from the positive z-axis, and dV=ρ2sinφdρdφdθ. Both factors are Jacobian determinants, computed in 6.4.
Worked example MATH 376 worksheet 10 problem 6
Find the volume of the solid in the first octant under the plane x+2y+z=4.
Solution.
The solid.x≥0, y≥0, 0≤z≤4−x−2y. The upper surface is a graph over the xy-plane.
The shadow. The height is non-negative where x+2y≤4: the triangle 0≤x≤4, 0≤y≤24−x.
The integral.V=∫04∫0(4−x)/2∫04−x−2ydzdydx=∫04∫0(4−x)/2(4−x−2y)dydx.
Inner. An antiderivative in y is (4−x)y−y2, which at y=24−x equals 2(4−x)2−4(4−x)2=4(4−x)2.
Outer.∫044(4−x)2dx=[−12(4−x)3]04=1264=316.
Answer.316. Check: the solid is a tetrahedron with legs 4,2,4, volume 61⋅4⋅2⋅4=316.
Worked example MATH 376 worksheet 27 problem 7 (the printed answer lost its factor of $\pi$)
Compute ∭EzdV where E={(x,y,z):0≤z≤4−x2−y2} (the part above the xy-plane under the paraboloid).
Solution.
The base.E is non-empty only where 4−x2−y2≥0: the disc x2+y2≤4. Use cylindrical coordinates: 0≤r≤2, 0≤θ≤2π, 0≤z≤4−r2, dV=rdzdrdθ.
Innermost.∫04−r2zdz=2(4−r2)2.
The rest. Nothing depends on θ, giving 2π: 2π⋅21∫02r(4−r2)2dr. Substitute u=4−r2, du=−2rdr: ∫02r(4−r2)2dr=21∫04u2du=332.
Combine.2π⋅21⋅332=332π.
Answer.332π.
Your answerFind the volume of the tetrahedron in the first octant bounded by the coordinate planes and the plane x+2y+3z=6.
The height at (x,y) is (6−x−2y)/3; the shadow is the triangle with legs 6 and 3.
The intercepts are 6, 3, 2. V=∫06∫0(6−x)/236−x−2ydydx=∫0612(6−x)2dx=36216=6, which is 61⋅6⋅3⋅2.
Worked example new (spherical coordinates; compare Apostol 10.8 for wires)
Find the moment of inertia of a solid ball of radius R and constant density about a diameter, in terms of its mass M.
Solution.
Set up. Take the z-axis as the diameter. The distance to it is x2+y2=ρsinφ, so with density c: Iz=c∭(ρsinφ)2ρ2sinφdρdφdθ. δ2=x2+y2 and dV=ρ2sinφdρdφdθ.
Separate the variables.Iz=c∫0Rρ4dρ∫0πsin3φdφ∫02πdθ=c⋅5R5⋅34⋅2π=158πcR5. ∫0πsin3φdφ=34.
Use the mass.M=c⋅34πR3, so Iz=158πcR5=52MR2.
Answer.I=52MR2.
Limits and integrals
Can you swap a limit and an integral? Not always: it works for uniform convergence (1.6 in one variable), and fails for pointwise convergence.
Theorem TMATH 376 homework 4 problem 2
Integrals commute with uniform limits on a rectangle
Let fn be integrable on Q and fn→f uniformly on Q, that is ∥fn−f∥∞=supQ∣fn−f∣→0. Then f is integrable and ∬Qfn→∬Qf.
In one lineIf fn are integrable on Q and fn→f uniformly, then f is integrable and ∬fn→∬f; in fact ∣∬fn−∬f∣≤∥fn−f∥∞area(Q).
Why it is trueIt says that when a sequence of functions settles down everywhere at the same rate, their integrals settle down to the integral of the limit.
ProofMATH 376 homework 4 problem 2
The idea: Squeeze f between f_n minus eta and f_n plus eta, where eta is the uniform distance, and use a step sandwich for f_n. The constants plus or minus eta are step functions with integral eta times area.
Pick n with ∥fn−f∥∞<η=ε/(3A).
Let A=area(Q)>0 and fix ε>0. Uniform convergence gives n with ∥fn−f∥∞<η:=ε/(3A).
Choose step functions s≤fn≤t with ∬(t−s)<ε/3.
fn is integrable: the criterion gives step functions s≤fn≤t with ∬(t−s)<ε/3.
Then s−η≤f≤t+η and f is bounded.
fn−η<f<fn+η everywhere; adding a constant to a step function gives a step function.
∬((t+η)−(s−η))=∬(t−s)+2ηA<ε/3+2ε/3=ε, so f is integrable by the criterion.
The constants contribute 2ηA=2ε/3.
Then ∬fn−∬f≤ηnA=∥fn−f∥∞A→0. ■
Now f is known to be integrable. Put ηn=∥fn−f∥∞, so fn−ηn≤f≤fn+ηn at every point. Integrals of integrable functions respect order, and a constant ηn has integral ηnA.
Worked example MATH 376 worksheet 15 problem 3
Show that pointwise convergence is not enough: let fn(x)=nxe−nx2 on [0,1]. Find the pointwise limit, the limit of the integrals, and the sup norm of fn.
Solution.
Pointwise limit.fn(0)=0 for all n, and for fixed x>0, nxe−nx2→0 because the exponential enx2 beats the multiple n. So fn→0 pointwise, and ∫010=0.
Sup norm.fn′(x)=ne−nx2(1−2nx2) is zero at x=1/2n, where fn=n/(2e). So ∥fn−0∥∞≥n/(2e)→∞.
Answer. The limit of the integrals is 21, the integral of the limit is 0, and the sup norm tends to infinity: the convergence is not uniform, so the theorem does not apply.
Where it is used
Used inside maths· Inside maths: expectation, Lebesgue measure and counting problems
A joint density of two random variables is a function f(x,y)≥0 with ∬f=1, and probabilities of events are double integrals over the event’s region (see 10.1). The independence of X and Y is the statement that the density factors as g(x)h(y), which is the separable case of Fubini. In analysis, the exact class of Riemann integrable functions is the bounded functions whose discontinuities have Lebesgue measure zero (a stronger statement than content zero, proved in 521), and the Lebesgue integral’s version of Fubini (Fubini and Tonelli) is the tool used to interchange sums and integrals. The volume of a unit ball in Rn is πn/2/Γ(2n+1), which tends to 0 as n grows, one of the first surprises of high-dimensional geometry; the Final’s computation of Vol(Vn(t))=tn/n! is the same kind of slicing argument.
Used in the real world· Used in the real world: probability in two variables, and Monte Carlo integration
Two components of a machine fail at times X and Y (in years, scaled to [0,1]), and the joint density is f(x,y)=8xy on the triangle 0≤x≤y≤1 (the first component fails first). It integrates to 1: ∫01∫0y8xydxdy=∫014y3dy=1. The chance that the two failure times add up to at most 1, that is X+Y≤1, is the integral over the region x≤y≤1−x, 0≤x≤21: ∫01/2∫x1−x8xydydx=∫01/24x(1−2x)dx=61. And the expected time of the first failure is E[X]=∬xf=∫01∫0y8x2ydxdy=158.
When the integral is over a region in 10 or 100 variables, a grid with 10 points per axis has 1010 or 10100 cells, and no computer can sum them. Monte Carlo integration replaces the grid by random points: to compute the integral of f over a region S inside a box of volume V, pick N random points in the box and average f⋅1S; the estimate is V⋅(average), and its error is about 1/N whatever the dimension. The method was developed at Los Alamos in the late 1940s: Stanislaw Ulam had the idea in 1946 while thinking about the chance of winning a game of solitaire, von Neumann took it up for neutron diffusion, and Metropolis suggested the name; Metropolis and Ulam published the first paper in 1949. Today it prices financial derivatives and renders films. Run the lab below.
Python labMonte Carlo against a grid, as the dimension grows
import numpy as npfrom math import gamma, pirng = np.random.default_rng(7)def exact(d): return pi ** (d / 2) / gamma(d / 2 + 1) # volume of the unit ball in R^ddef monte_carlo(d, N): x = rng.uniform(-1, 1, size=(N, d)) # N random points in the cube [-1, 1]^d return 2 ** d * np.mean((x ** 2).sum(axis=1) <= 1) # cube volume times the fraction insidedef grid(d, N): n = max(1, int(round(N ** (1 / d)))) # n midpoints per axis, n^d points in all m = -1 + (2 * np.arange(n) + 1) / n G = np.stack(np.meshgrid(*([m] * d), indexing="ij"), axis=-1).reshape(-1, d) return 2 ** d * np.mean((G ** 2).sum(axis=1) <= 1), n ** dprint(f"{'dim':>3} {'exact':>9} | {'Monte Carlo':>11} {'error':>8} | {'grid':>9} {'error':>8} {'points':>8}")for d in (2, 4, 6, 8): mc = monte_carlo(d, 100000); g, used = grid(d, 100000) print(f"{d:3d} {exact(d):9.4f} | {mc:11.4f} {abs(mc - exact(d)):8.4f} | {g:9.4f} {abs(g - exact(d)):8.4f} {used:8d}")print("\nMonte Carlo error in 2D (mean of 20 runs):")for N in (100, 10000, 1000000): e = np.mean([abs(monte_carlo(2, N) - pi) for _ in range(20)]) print(f" N = {N:8d} error {e:.5f} error * sqrt(N) = {e * N ** 0.5:.3f}")
Try this.Run it. The program estimates the volume of the unit ball in 2, 4, 6 and 8 dimensions two ways with about 100,000 points each: random points in the cube (Monte Carlo) and a regular grid of midpoints. In 2 dimensions the grid is better: its error is of order 0.001 and the Monte Carlo error is of order 0.01. By 4 dimensions the situation has reversed and the Monte Carlo error stays near 0.01 while the grid error is about 0.1. In 8 dimensions 100,000 points allow only 4 grid points per axis, and the grid answer is useless, while Monte Carlo is still within about 0.2 of the true value. The second table shows the Monte Carlo error in 2 dimensions at N = 100, 10,000 and 1,000,000 points: the last column (error times the square root of N) stays near 1.3, which is the statement that the error shrinks like 1 over the square root of N. Try changing the seed, or replace the ball by another region.
Your answerThe joint density of two failure times is f(x,y)=8xy on 0≤x≤y≤1. What is P(X+Y≤1)?
Inner integral over y from x to 1−x: 4x[(1−x)2−x2].
The event is x≤y≤1−x for 0≤x≤21. ∫01/2∫x1−x8xydydx=∫01/24x[(1−x)2−x2]dx=∫01/24x(1−2x)dx=4(81−121)=61.
Traps
Watch out· Integrable is not 'bounded', and not 'a best step function exists'
On the 376 final, a student wrote, in problem 6(a), that a bounded function on the square is integrable because the volume under it is finite, and the verdict was the wrong way round (the rubric gave 2 of 3). Boundedness only makes the lower and upper integrals finite numbers. Integrable asks that they are equal, and the counterexample is the function that is 1 at points with both coordinates rational and 0 elsewhere. On the midterm, in problem 4(b), the rubric took a point (2 of 3) because their argument used ‘the biggest step function below f’ and ‘the smallest above f’, which need not exist and are not equal. The working form is the epsilon-sandwich: for every ε there is a pair, and the pair changes with ε.
Watch out· Read a set definition aloud and sketch it before you compute
On the 376 final, a student read the set max(∣x∣,∣y∣,∣z∣)=1 of problem 2 as a unit cube in the first octant, because they dropped the absolute values, and lost 1 of 5 points (‘partially correct, with minor computational mistake’). The condition says every coordinate lies in [−1,1] and at least one has absolute value exactly 1: the surface of the cube [−1,1]3, with volume 8 for the solid inside it. Their regrade request (‘I didn’t notice the absolute value’) was declined.
Watch out· Slice with the right variable, and keep parameters apart from integration variables
On the 376 final, a student started the induction for the volume of Vn(t) (problem 5(a), 3 of 4 points) from the formula tn/n! given in the problem, and in the step they integrated the constant volume of the slice over s. The slice at xn=s is Vn−1(t−s), not Vn−1(t), and an antiderivative that treats s as if it were t is wrong. Say in words what the slice is before they write the integral, and write the integrand as a function of the integration variable. Do not work backwards from the answer given in the problem.
Watch out· Inner limits depend on the outer variable only
The limits of the outermost integral are constants. The inner limits may contain the outer variable, never the inner one. Reversing an order without sketching the region is how limits go wrong. Find where curves cross before you fix the outer limits.
Watch out· Polar coordinates: the factor r, and the shape of the region
dA=rdrdθ, not drdθ. Polar limits are constants only for a disc, a sector or a ring centred at the origin; for other regions rewrite the limits. And a product formula ∫g∫h needs both a rectangle and a product integrand.
Watch out· Pick the order that has an antiderivative
Fubini says both orders give the same number, so choose the one in which the inner antiderivative exists. ∫ex2dx, ∫xsinxdx and ∫lnxdx have no elementary antiderivative. Use the continuity of the integrand to justify swapping: where it is not continuous at one point (such as xsinx at 0), say that it extends continuously.
Problems
checknew (MATH 376 worksheet 6 style)
Let s=2 on [0,1)×[0,3] and s=−1 on [1,4]×[0,3]. Compute ∬s over [0,4]×[0,3].
Solution
Left piece: value 2, area 1⋅3=3, term 6. Right piece: value −1, area 3⋅3=9, term −9. Total −3.
check
Which of these is a type I region, a type II region, or both: (a) the triangle 0≤y≤x≤1; (b) the unit disc; (c) the ring 1≤x2+y2≤4?
Solution
(a) Both: 0≤x≤1, 0≤y≤x; or 0≤y≤1, y≤x≤1. (b) Both: −1≤x≤1, ∣y∣≤1−x2, and the same with x,y swapped. (c) Neither as written: a vertical line through the hole meets the ring in two segments. Cut it into pieces, or use polar coordinates (1≤r≤2).
checkMATH 376 homework 3 problem 5
Compute ∬[1,2]2(yx+xy)dA.
Solution
Each term is separable on a rectangle. ∫12xdx⋅∫12ydy=23ln2, and ∫12ydy⋅∫12xdx=23ln2. The sum is 3ln2.
checkMATH 376 homework 3 problem 4
Compute ∬[0,1]×[0,2π](xsiny+xexy)dA.
Solution
By linearity. ∬xsiny=∫01xdx∫02πsinydy=21⋅0=0. For the second, integrate in y first: ∫02πxexydy=e2πx−1, then ∫01(e2πx−1)dx=2πe2π−1−1. Total 2πe2π−1−1.
useMATH 376 worksheet 9 problem 1 and worksheet 7 problem 4
Compute (a) ∫0π∫yπxsinxdxdy and (b) ∫01∫y11+x3dxdy.
Solution
(a) The region is 0≤y≤x≤π. Reversed: ∫0π∫0xxsinxdydx=∫0πsinxdx=2 (the integrand xsinx extends continuously to x=0 with value 1). (b) y≤x≤1 means y≤x2, so the region is 0≤y≤x2, 0≤x≤1. Reversed: ∫01x21+x3dx=31∫12u1/2du=92(22−1), with u=1+x3.
use
Find the volume of the solid bounded by the paraboloid z=x2+y2 and the plane z=4.
Solution
The solid is x2+y2≤z≤4 over the disc x2+y2≤4. In polar coordinates V=∫02π∫02(4−r2)rdrdθ=2π[2r2−4r4]02=2π⋅4=8π.
usenew (compare Apostol 11.16)
A plate is the triangle with vertices (0,0), (2,0), (0,2) with density φ(x,y)=x+y. Find its mass and centre of mass.
Solution
The region is 0≤x≤2, 0≤y≤2−x. Mass: ∫02∫02−x(x+y)dydx=∫02[x(2−x)+2(2−x)2]dx=∫02(2−2x2)dx=4−34=38. Moment ∬xφdA=∫02[x2(2−x)+2x(2−x)2]dx. The bracket is 2x2−x3+2x−2x2+2x3=2x−2x3, and ∫02(2x−2x3)dx=4−2=2. So xˉ=8/32=43, and by symmetry yˉ=43.
useMATH 376 worksheet 7 problem 5
Compute the volume of the ball of radius R in spherical coordinates, and check against the polar computation.
Solution
V=∫02π∫0π∫0Rρ2sinφdρdφdθ=2π⋅2⋅3R3=34πR3, since ∫0πsinφdφ=2. It agrees with 2∫02π∫0RR2−r2rdrdθ=34πR3.
proveMATH 376 homework 3 problem 2, part (a) only
Prove that if s and t are step functions on Q and c1,c2 are real numbers, then c1s+c2t is a step function and ∬(c1s+c2t)=c1∬s+c2∬t.
Solution
Let P be the common refinement of partitions for which s and t are constant on open pieces. On the open piece Rij of area Aij the function c1s+c2t equals the constant c1sij+c2tij, so it is a step function for P, and ∬(c1s+c2t)=∑(c1sij+c2tij)Aij. Split the sum into two and pull out the constants: c1∑sijAij+c2∑tijAij=c1∬s+c2∬t, where the integrals of s and t may be computed with the common refinement because the step integral does not depend on the partition.
proveMATH 376 Midterm 1 problem 4(b) style
Let g:Q→[0,1] be integrable. Prove that for every ε>0 there are step functions s≤g≤t with 0≤s, t≤1 and ∬(t−s)<ε. (Both ends must be repaired.)
Solution
Fix ε>0. By the criterion choose step functions S≤g≤T with ∬(T−S)<ε. Put s=max(0,S) and t=min(1,T). On each piece of a common refinement S,T are constants, so s,t are constants: step functions. s≤g because S≤g and 0≤g; g≤t because g≤T and g≤1. Also 0≤s and t≤1 by definition. Finally s≥S and t≤T give t−s≤T−S pointwise, so by monotonicity ∬(t−s)≤∬(T−S)<ε.
proveMATH 376 homework 4 problem 1
Suppose fn are continuous on Q and fn→f uniformly. Prove that f is continuous.
Solution
Fix p∈Q and ε>0. Pick N with ∣fN(z)−f(z)∣<ε/3 for all z∈Q (uniform convergence). Since fN is continuous at p, pick δ with ∣fN(q)−fN(p)∣<ε/3 whenever ∥q−p∥∞<δ. For such q, ∣f(q)−f(p)∣≤∣f(q)−fN(q)∣+∣fN(q)−fN(p)∣+∣fN(p)−f(p)∣<ε. The first and third bounds use that the same N works at every point: that is uniformity.
proveMATH 376 homework 4 problem 2 / Apostol 11.5
Prove that a finite union of sets of content zero has content zero, and that a single point has content zero.
Solution
A point p: cover it by the open square of side ε/2 centred at p, of area ε/4≤ε. A union S1∪⋯∪Sm: for each i cover Si by finitely many open rectangles of total area at most ε/m; all the rectangles together are finitely many and cover the union, with total area at most m⋅ε/m=ε.
stretchMATH 376 Final problem 5(a) style
For s>0 let Un(s)={x∈Rn:0≤x1≤x2≤⋯≤xn≤s}. Prove by induction that Vol(Un(s))=sn/n!.
Solution
n=1: U1(s)=[0,s] has length s. Assume the claim for n−1 and fix s>0. If x∈Un(s) then xn∈[0,s]; for xn=r the other coordinates satisfy 0≤x1≤⋯≤xn−1≤r, so the slice is Un−1(r), of volume rn−1/(n−1)!. By Fubini, Vol(Un(s))=∫0s(n−1)!rn−1dr=n!sn. (Consequence: the n! orderings of n coordinates fill the cube [0,s]n, so n!⋅n!sn=sn.)
stretchnew (Fubini counterexample check)
Let f(x,y)=(x2+y2)2x2−y2 on (0,1]2. Compute ∫01∫01fdydx and ∫01∫01fdxdy. What does this say about Fubini’s theorem?
Solution
For fixed x>0, ∫01(x2+y2)2x2−y2dy=[x2+y2y]01=1+x21 (since dydx2+y2y=(x2+y2)2x2−y2), and ∫011+x2dx=4π. By antisymmetry, f(y,x)=−f(x,y), so the other order gives −4π. The two iterated integrals differ. Fubini does not apply, because f is not bounded near the origin, so it is not integrable on the square in the sense of this chapter. The hypothesis ‘continuous (or at least bounded and integrable) on the rectangle’ cannot be dropped.
Summary
A step function on a rectangle is constant on the open pieces of a grid; its integral is the sum of value times area, independent of the grid, and it is linear, additive and monotone.
A bounded f is integrable when its lower integral (sup of step integrals below) equals its upper integral (inf of step integrals above). Bounded alone is not enough. The working form: for every ε there are step functions s≤f≤t with ∬(t−s)<ε; the pair changes with ε and no ‘best’ pair need exist.
Continuous functions on a closed rectangle are integrable (uniform continuity), and so are bounded functions whose discontinuities have content zero; graphs of continuous functions have content zero, so regions between curves are fine.
Fubini: for continuous f on a rectangle, ∬f equals either iterated integral. Choose the order with an elementary antiderivative; sketch the region and reverse the order when the written order cannot be done.
Over a type I region a≤x≤b, φ1(x)≤y≤φ2(x), ∬f=∫ab∫φ1φ2fdydx (extend by zero). Outer limits are constants; inner limits may depend on the outer variable.
Areas, volumes, masses, centres of mass and moments of inertia are double and triple integrals; in polar coordinates dA=rdrdθ, in cylindrical dV=rdzdrdθ, in spherical dV=ρ2sinφdρdφdθ.
Uniform convergence lets you swap a limit and an integral: ∣∬fn−∬f∣≤∥fn−f∥∞area(Q); pointwise convergence does not (nxe−nx2).
Monte Carlo integration estimates integrals by random sampling; its error is of order 1/N in every dimension, which is why it wins in high dimension.
Watch and read
The same ideas explained by someone else. Use these when an explanation here does not land.
MATH 376: Weeks 3 and 4, Apostol 11.1 to 11.14. Midterm 1 problems 2 and 4 are here (the sandwich argument lost a point), Final problem 2 (reading a set definition), Final problem 5(a) (volume of a simplex by induction) and Final problem 6(a) (bounded does not mean integrable, which lost a point). Every worksheet and homework problem of the unit is worked below: worksheets 6 to 10 and 27, homework 3 and 4.
MATH 521: 521 builds the Riemann integral in R^n the same way, then replaces content zero by Lebesgue measure zero (the exact set of discontinuities a Riemann integrable function can have) and replaces Fubini by the Fubini-Tonelli theorems for the Lebesgue integral.
MATH 431 and STAT 309: A joint density $f(x, y)$ is a function integrated over regions of the plane; probabilities of events like $X + Y \le 1$ are double integrals over type I or II regions, and independence is the statement that the density factors, which is the separable case of Fubini.
Physics and engineering: Centre of mass, moment of inertia of a plate or solid, and the volume of a solid are the integrals of this chapter. Monte Carlo integration (the lab below) is how integrals in dozens of variables are done in practice.