# Distance to Cross a City Diagonally

If I had to cross from the southwest corner of a city to the northeast corner of a rectangular city and I could do so by helicopter, the distance would be $\sqrt{x^2 + y^2}$, which is less than $x + y$.

If I chose to cross that same city by foot, and I chose to travel diagonally, I would have to go by city blocks and the distance would be $x + y$. As I make the blocks smaller, the distance is still $x + y$.

It seems like this must be able to be expressed as a limit that evaluates to $\sqrt{x^2 + y^2}$ as the block sizes approach $0$.

-
This may come in handy: en.wikipedia.org/wiki/Taxicab_geometry –  Fernando Martin May 24 '11 at 18:49
To make a long answer short, not any approximation is a good approximation. When we aproximate a quantity by a limit sums, there are a lot of technical mathematical computations (which every non-mathematician finds dull and stupid) to make sure that that is a good approximation. Whenever you see in Calculus that a certain area/volume/arclength is reduced to an integral, we always use an approximation by a Riemann sum, but unless one really checks carefully all the details behind that approximation, one misses a very important point: there is a reason why we use that particular one. –  N. S. May 24 '11 at 21:09
To address now this particular question, you use a zig-zag path to approximate a direct path. This is just an approximation, how good is it... In this particular case the errorr in your estimation can be calculated effectively at each step: $x+y-\sqrt{x^2+y^2}$, same for all $n$. When $n$ tends to infinity, the error doesn't go to zero which is contrary to what your intuition tells you... Basically, using limits, you only get that $\sqrt{x^2+y^2} \sim x+y$ with an error of about $x+y-\sqrt{x^2+y^2}$, hmm, nothing wrong with it, is it? –  N. S. May 24 '11 at 21:17
The problem is that even though you make the step size smaller, you're still not taking any diagonal steps. The steps are all still either horizontal or vertical. You're not looking for a limit as step size $\downarrow 0$ but rather a limit as the paths are turned to point more directly toward the goal. –  isomorphismes May 24 '11 at 21:42

Arc length is inherently much more complicated than area. Let us recall a couple of formulas. Suppose that $f(x)\ge 0$ on the interval $[a,b]$, and that $f(x)$ is continuous on that interval.

Then the area of the region below the curve $y=f(x)$, above the $x$ axis, from the vertical line $x=a$ to the line $x=b$ is given by

$$\int_a^b f(x)dx$$

If we have a curve $y=g(x)$, which under medium magnification, is visually indistinguishable from $y=f(x)$, then the area under $y=g(x)$, above the $x$-axis, from $x=a$ to $x=b$, will be almost exactly the same as the corresponding area for $y=f(x)$. So if we approximate the curve $y=f(x)$ more and more closely with a sequence of functions $g_n(x)$, we will have $$\lim_{n \to\infty}\int_a^b g_n(x)dx =\int_a^bf(x)dx$$

Thus area, under limits, behaves nicely.

Now, let us look at the length of the curve $y=f(x)$ from $x=a$ to $x=b$. You may recall from a calculus course the following "formula" for arc length.

$$\int_a^b \sqrt{1+(f'(x))^2}dx$$

There are serious problems with this formula, that did not show up with the corresponding formula for area. Suppose that the curve $y=g(x)$ is, under medium magnification, visually indistinguishable from $y=f(x)$. It could be that $y=f(x)$ is very smooth, but that under high magnification $y=g(x)$ is very jagged. So though the curves look much the same, and the areas under them are much the same, their arc lengths can be strikingly different. Indeed, in extreme cases, it may be that the only reasonable arc length to assign to $y=g(x)$ is "infinity." The problem is that even if $f(x)$ is very close to $g(x)$ for all $x$, $f'(x)$ may be very different from $g'(x)$.

The phenomenon has been much discussed in the popular literature on fractals. Look at the length of the coast line of Florida. The answer that you get if you try to measure things on a map is highly dependent on the scale of the map. More and more magnification will reveal more and more detailed indentations, so the length will grow substantially. By way of contrast, the area of Florida as computed using different-scaled maps will not change very much.

For smooth functions, you can come up with a well-behaved limiting process for arc length as follows. Take a large number of closely spaced points on the curve, and join neighbouring points by straight line segments. As the number of such line segments gets very large, the combined length of these segments will approach the arc length of the curve.

You will note that the "shorter and shorter blocks" approach of your post is not obtained by taking a large number of points on the curve and joining them by straight line segments.

-
Thank you for the easy to understand and technically complete answer with real-world examples :) –  Eric May 24 '11 at 21:33

This post will give you some ideas.

-
a pertinent post, but the question isn't really answered there either. –  Eric May 24 '11 at 19:47
@Eric: You didn't ask an explicit question. –  Shai Covo May 24 '11 at 20:11
Anyway, you can also consider the following, for some distinct constants $a$ and $b$: $\sum\nolimits_{k = 1}^n {\frac{a}{n}} = a$, $\sum\nolimits_{k = 1}^n {\frac{b}{n}} = b$, but $\frac{b}{n} - \frac{a}{n} \to 0$ as $n \to \infty$. –  Shai Covo May 24 '11 at 20:58
Letting $a=\sqrt{2}$, $b=2$ above corresponds to the problem with the unit square. –  Shai Covo May 24 '11 at 21:10

You see that the distance of the travel by foot is contant ($d_F = x+y$) whatever the block size is. Hence, it cannot happen that the limit when the block size tends to cero is different ($d_D = \sqrt{x^2 +y^2}$).

This can be seen as a paradox. The false conclusion comes from two assumptions, that intuitively seem true:

• Curve F (travel by foot) tends to curve D (diagonal path) when block size tends to zero.

• If a curve F tends to curve D, then the length of curve F must tend to that of curve D.

• Ergo...

But we must state precisely what we mean when we say that "a curve tends to another". And then, if we formalize that notion, in a way that fits with the intuitive "fact" that curve F indeed tends to D (it can be done), then we'll find that the second assumption does not hold. And that's it. The post by Shai Covo gives another nice counterexample, and more detailed explanations.

-

Let $f(x)$ be defined periodically on the real line with period $1$ defined on $[0,1/2]$ as $f(x)=x/\sqrt{2}$ and on $[1/2,1]$ as $f(x)=(1-x)/\sqrt{2}$.

So the graph of $f(x)$ is just a simple zig-zag.

Then the path of your traversal through the city, rotated by $45$ degrees, with blocks of size $1/2^n$, is the graph of the function: $f_n(x) = f(2^nx)/2^n$ for $x\in[0,1]$.

Now, from calculus, we recall that the length of the graph of $f_n$ depends not on the values of $f_n$, but on the values of $|f_n'|$. And $|f_n'|=1/\sqrt{2}$ for all $n$, so the length of the graph does not change as $n\rightarrow \infty$.

So the fundamental result is that just because $f_n\rightarrow 0$, even uniformly, doesn't mean that $f_n'\rightarrow 0$.

-
This is an answer that does not use calculus. For any given rectangle the sum of the lengths of adjacent sides is a constant. Let's say you have a path that goes from the southwest corner to the northeast corner. Whenever the path follows two sides of a rectangle alter the path, if necessary, so that you travel the east-west side prior to the north-south side. This does not change the length of the path. Keep on doing this until all of the east-west sides come before any of the north-south sides. This path follows two edges of the larger rectangle. In the terms of you question the length of this path is $x + y$.