# Analogy for nested loops/integrals

In teaching students how to do iterated integrals, I would like to find some analogy using a finite task nested inside another finite task. It would be especially nice if it satisfied the following criteria:

1. natural to visualize as a 2-dimensional grid

2. involves familiar objects

3. doesn't involve a sum (for initial simplicity), but can easily be altered so as to involve a sum

An example that isn't naturally grid-able would be: Go to the library and find all the books by your favorite author. For each book, open the book, read all the pages, and close the book.

Another possibility would be something like building a wall out of legos. This seems almost optimal except that you would normally stagger the brick pattern.

• I assume your students don't knit? – Jessica B Feb 5 '19 at 6:46
• @JessicaB: Thanks! To me knitting actually seems better than the example you used in your answer. It's easy to illustrate, and you don't need to be a knitter to understand how it works. – Ben Crowell Feb 5 '19 at 23:24
• @BenCrowell I'm not sure how many of your students would agree on that, and it might be too uncool, depending on the current culture. – Jessica B Feb 6 '19 at 6:59

Working in a factory packing boxes: fill a pallet with a pile of boxes, where for each box you need to fill it with packets of biscuits.

• @PeterTaylor Thanks, corrected. – Jessica B Feb 5 '19 at 19:26

Eating all the chocolates in a multi-layered chocolate box. Each layer has a tray containing several rows of chocolates, and each one you eat is just a tiny increment that only makes an infinitesimal contribution to your calorie intake . . .

• For single integrals: painting the vertical cables that support the road on a suspension bridge. The amount of paint needed for each cable depends on the height of the chain the cables hang from at that point, and the bridge is conveniently graph-shaped. – timtfj Feb 6 '19 at 3:52

I like stressing the connection between rates of change and integrals, and I carry this into multiple integrals as well. As an example, you could talk about a row of apple trees producing (on average) $$f(t,x)$$ apples per day per meter at time $$t$$ and location $$x$$ along the row. Probably $$f(t,x)$$ is roughly periodic in $$t$$ with a period of $$365$$, and has substantial variation along the row (different trees produce different amounts of fruit at different times). You might be interested in the total number of apples produced in one year by the entire row.

I like to talk about how if you have rate data that looks like $$\frac{\left(\frac{\textrm{apples}}{\textrm{day}}\right)}{\textrm{meter}}$$, then you will need to do a double integral in $$(\textrm{day},\textrm{meter})$$-space to find total apples.

However, if you have rate data like $$\frac{\textrm{pressure change}}{\textrm{temperature change}}$$ and $$\frac{\textrm{pressure change}}{\textrm{volume change}}$$, and these rates are variable depending on current temperature and volume, then you will need to do a line integral over the curve through $$\textrm{temperature} - \textrm{volume}$$ space which your beaker is being exposed to to find the total change in pressure.

Everything makes sense when you pay attention to the units!

Developing a shale oil field? There will be some overall grid of sections (usually 1 by 1 or 1 by 2 miles). This grid has limits to it's size. Tyically several parallel wells are needed to develop a unit. However, the number of wells will vary (in general "richer" rock getting more wells per unit, because the economics drive more effort to be spent). Total oil (EUR, estimated ultimate return) will be the sum of the oil from all the sections. You can even make it 3D if you look at multibench formations.

Sales across territories for a company?

Population? Voting?

Sales across time for a company--4 quarters in the year?

Rebuilding an engine cylinder, by cylinder (and valve by valve within that)?

Just brainstorming...