## The Expanding Rail Problem

Problem:

### A railroad track is a mile in length. On a really hot day, the track expanded so that, while its endpoints were fixed in place, the track bowed into a circular arc. If the track expanded by a foot, about how far did the track deviate from its original position?

Solution:

This problem is a classic illustration in how to do estimates and accurate computation.  I got it out of Forman Acton’s book, “Real Computing Made Real”.  This old chestnut is one that is simple to set up, but difficult to execute.

I take a different approach to Acton, who uses this to challenge the reader in his understanding of preserving significant figures.  His approach is entirely numerical.  I choose, rather, to illustrate the power of analysis to preserve the sig figs and to help feel my way around while doing so.

First, consider a crude estimate to help us gain some perspective.  Instead of the circular arc, imagine the track, originally of length $$a=5280$$ is stretched like a violin string at the center to a length $$a+\varepsilon=5281$$; it would then look the the straight line segments as in the dotted lines in the figure.  This is not the correct answer, but it puts us in the ballpark.  To find the deviation $$d$$, we simply use Pythagoras:

$$d^2+(\frac{a}{2})^2=[\frac{1}{2}(a+\varepsilon)]^2$$

We can then solve for $$d$$ as usual.  Nevertheless, note that, as stated, $$a$$ is 3 orders of magnitude larger than $$\varepsilon$$.  We can therefore neglect the term $$(\frac{\epsilon}{2})^2$$ and write, with great [numerical] accuracy:

$$d \approx \sqrt{\frac{a \varepsilon}{2}}=51.38093 \ldots$$

The take away here is that $$\varepsilon \ll d$$, while at the same time, $$d \ll a$$.  More accurately stated, $$d=O[\sqrt{a \varepsilon}]$$.  Those who guessed that $$d$$ would be about 1 ft would be very wrong.  The neat thing about this problem is that such a small change results in a big result.

That said, we have not solved the correct problem and now need to get on with it.  To do this, we write down the geometric relations algebraically:

$$\theta=\frac{a+\varepsilon}{r}$$,
$$\sin \frac{\theta}{2}=\frac{a}{2 r}$$,
and
$$(\frac{a}{2})^2+(r-d)^2=r^2$$.

Now that we are guided by orders of magnitude, we can scale our quantities appropriately. Let $$x=\frac{a}{2 r}$$, $$y=\frac{d}{r}$$, and $$\delta=\frac{\varepsilon}{a}$$. We can then rewrite the above equations in a more compact form, eliminating $$\theta$$:

$$\sin{x(1+\delta)}=x$$,
and
$$y^2-2 y+x^2=0$$.

We do not know a lot about the magnitude of the quantities $$x$$ and $$y$$, but we do know from the above analysis that $$y \ll x$$, so even though we could solve the second equation exactly in terms of $$x$$, we need not even do that. All we need to do is ignore the $$y^2$$ term and we get, in a first approximation,

$$y=\frac{x^2}{2}+O[x^4]$$.

The quantity $$x$$ is determined through the first equation and depends on the value of the small quantity $$\delta$$. If we think about what to expect as a solution, note that this equation is transcendental and we cannot expect an exact solution. However, if we look at the limiting equation at $$\delta=0$$, which is $$\sin{x}=x$$. The only solution to that equation lies at $$x=0$$. We then conclude that when $$\delta$$ is small, so is $$x$$.

This is very useful information, because it tells us how to go about approximating the solution to the first, transcendental equation. Because we now know that $$x$$ is small, we can Taylor expand the sine term about $$x=0$$ and get the following approximate equation:

$$x=x(1+\delta)-\frac{1}{6}x^3 (1+\delta)^3+O[x^5]$$

This can be solved easily for $$x$$:

$$x=\sqrt{\frac{6 \delta}{(1+\delta)^3}}(1+O[\delta])$$

[That last factor $$O[\delta]$$ comes from considering an expansion to a quadratic equation that would be solved if we considered the $$O[x^5]$$ term. More on this later.]

In fact, we can even neglect the factor of $$(1+\delta)^3$$ in the denominator because it, too, adds a factor of $$O[\delta]$$. Then we are simply left with

$$x=\sqrt{6 \delta}(1+O[\delta])$$.

If we substitute back into the above equation for $$y$$, and use the original definitions of the dimensionless parameters, we find, after a little rearrangement, the following first approximation for the desired deviation:

$$d=\frac{\sqrt{6}}{4}\sqrt{a \varepsilon}(1+O[\frac{\varepsilon}{a}])$$.

Using the numbers provided, the deviation resulting from a 1 ft addition in length to the track is about 44.49719 ft, to within some factor of a constant times 0.019% error.

Is this good enough? Acton provides an answer good to 7 significant figures: 44.49845, which means the approximation is good for an error of 0.0028%, or 4 sig figs. This is fine in most cases, but let’s assume we want to reproduce Acton’s result. How do we do this?

We go back to the transcendental equation and Taylor expand out an additional term:

$$x=x(1+\delta)-\frac{1}{6}x^3 (1+\delta)^3+\frac{1}{120}x^5 (1+\delta)^5+O[x^7]$$

Now we can write that $$x=\sqrt{6 \delta}(1+B \delta+O[\delta^2])$$ for some $$B$$, for which we will solve by plugging into the above equation. When we do this, we note that all terms in $$x$$ are of even powers, and terms of $$O[\delta]$$ all cancel, so we are left with a coefficient of $$\delta^2$$ equaling zero; this gives $$B=-\frac{27}{20}$$. This result gets put into the quadratic equation above, where we now assume that $$y$$ takes the form $$y=3 \delta (1+C \delta+O[\delta^2])$$. Note that we include the $$y^2$$ term now. Verifying that the terms of $$O[\delta]$$ cancel, and equating the coefficient of $$\delta^2$$ to zero, we get that $$C=-\frac{6}{5}$$. When we go back to the original parameters, we find that

$$d=y r$$,
$$\Rightarrow d=\frac{a}{2}\frac{3\delta(1+C\delta+O[\delta^2])}{\sqrt{6 \delta}(1+B\delta+O[\delta^2])}$$,
$$\Rightarrow d=\frac{\sqrt{6}}{4}a\sqrt{\delta}(1+(C-B)\delta+O[\delta^2])$$,

which gives us our correction:

$$d=\frac{\sqrt{6}}{4}\sqrt{a \varepsilon}(1+\frac{3}{20}\frac{\varepsilon}{a}+O[(\frac{\varepsilon}{a})^2])$$.

This gives us $$d=44.498455 \ldots$$, which is not too shabby.