The Grain-Gathering Problem (1)

In the countryside, July is a busy month. Farmers are busy harvesting rice, and after the harvest they have to dry the grain out in the sun, while also getting ready to "transplant seedlings" for a new round of farming. BoJone's family is naturally no exception. However, my family's field is quite small (about one mu, roughly 1/6 acre), so the harvester finishes in a few minutes, and it only takes two or three days to dry the grain. But while drying the grain, BoJone got to thinking about a "grain-gathering" problem:

When drying grain, you first have to spread the piled-up grain out, laying it thinly and evenly on flat ground. Then, in the evening, or right before it's about to rain (the worst-case scenario — if you're not careful the grain gets soaked), you have to gather it back up. That's where the problem comes from: generally we spread the grain evenly into a rectangular shape. To which point, inside or outside the rectangle, should we push all the grain so that the work we do is minimized?

This problem can also be generalized. For example, for a patch of grain of arbitrary shape (say, a triangle), to which point is it "easiest" to gather it? Or: given a fixed mass of grain, into what shape should it be spread so that gathering it later requires the least "effort"? Of course, the solution to this problem isn't only useful for "gathering grain" — it also has applications in many planning and construction contexts. For instance, if we want to build a service center in a city with a roughly uniform population distribution, where should that service center be located? This is somewhat similar to the Fermat point problem we discussed before, except that the Fermat point problem only considers the distances to three points, whereas this problem requires considering the distances to all points. More below.

Without further ado, let's look at the first problem: to which point, inside or outside the rectangle, should all the grain be pushed so that the work done is minimized? By symmetry, it's easy to prove that this point is the geometric center of the rectangle (why not try proving it yourself?). But BoJone isn't satisfied with just a qualitative analysis — I want to work out the quantitative calculation as well.

Rectangular grain fieldRectangular grain field

Let's first consider the case of piling all the grain toward one corner (the origin). Suppose the grain has areal density 1. The work done in gathering the grain should be proportional to both mass and distance, so the work required to move a small rectangular patch of grain with side lengths dx, dy back to the origin is $\sqrt{x^2+y^2} dxdy$. The total work required to move the entire grain field back to the origin is then given by the double integral:

$$W=\int\int \sqrt{x^2+y^2}dxdy$$

(where the region of integration is a rectangle with side lengths a and b)

Here's a brief introduction for readers who haven't yet encountered double integrals. A double integral can be computed by converting it into an iterated integral: first treat y as a fixed constant and carry out a definite integral with respect to x; once that's done, treat y as the variable and perform a definite integral with respect to y. A single integral (i.e., the ordinary definite integral we're used to) is taken over a region that is a line segment (for example, the region of integration for $\int_a^b f(x)dx$ is the segment on the x-axis from a to b), whereas the region of integration for a double integral is a two-dimensional area — which is why double integrals are considerably more complicated than single integrals. For instance, in the step where we "treat y as a known quantity and integrate over x," we need to write down the expression for x in terms of y over the region of integration; that is, the difference between the upper and lower limits of the definite integral is itself an expression in terms of y.

The double integral W can be computed directly, but to simplify things, I'd like to transform it using polar coordinates:

$$W=\int\int r^2 dr d\theta$$

Doesn't that look a lot simpler? Let's treat $\theta$ as fixed and carry out the definite integral over r. But how do we write down the limits of integration here? Looking at the figure, we can see that in the lower-right triangular region, we have $r=\frac{a}{cos\theta}$ (the equation of the rightmost side of the rectangle), so the integration interval can be written as $[0,\frac{a}{cos\theta}]$, giving us

$$W_1=\int(\int_0^{a//\cos\theta} r^2 dr)d\theta=\int(1/3 r^3|_0^{a//\cos\theta})d\theta=\int\frac{a^3}{\cos^3\theta} d\theta$$

According to this , we have

$$W_1=\frac{a^3}{4}(\frac{2\sin \theta}{\cos^2 \theta}+ln|\frac{1+\sin \theta}{1-\sin \theta}|)$$

where $\theta=arctg(b/a)$.

But that's only half of it. Integrating over the upper-left side gives:

$$\begin{aligned}W_2=\int(\int_0^{b//\cos\theta} r^2 dr)d\theta=\int(1/3 r^3|_0^{b//\cos\theta})d\theta=\int\frac{b^3}{\cos^3\theta} d\theta \\ =\frac{b^3}{4}(\frac{2\sin \theta}{\cos^2 \theta}+ln|\frac{1+\sin \theta}{1-\sin \theta}|)\end{aligned}$$

where $\theta=arctg(a/b)$

Is your head spinning yet? Because BoJone's certainly is — but let's push on anyway. W can be written as:

$$\begin{aligned}\frac{a^3}{4}(\frac{2b\sqrt{a^2+b^2}}{a^2}+2ln|\frac{\sqrt{a^2+b^2}+b}{a}|)+\frac{b^3}{4}(\frac{2a\sqrt{a^2+b^2}}{b^2}+2ln|\frac{\sqrt{a^2+b^2}+a}{b}|) \\ =ab\sqrt{a^2+b^2}+1/2 a^3 ln|\frac{\sqrt{a^2+b^2}+b}{a}|+1/2 b^3 ln|\frac{\sqrt{a^2+b^2}+a}{b}|\end{aligned}$$

We've technically worked it out, but such a cumbersome expression makes us want to throw up our hands. This forces us to look for another way... (to be continued)

English translation of a post from 科学空间 | Scientific Spaces by 苏剑林. Original: https://kexue.fm/archives/1439
Translated automatically with claude-sonnet-5; all equations are reproduced verbatim from the source. Copyright remains with the original author.