## Sunday, March 19, 2017

### Portland to New York Using only Gravity (Part 3)

Portland to New York Using only Gravity (Part 3) Here we are at part 3 of a series of posts relating to an "underground brachistochone" where we wish to build a tunnel for a train propelled only by gravity from Portland, Oregon to New York, New York.

We left off in part 2 with the computation of the time to traverse the tunnel equal to $$\Delta t = \pi \sqrt{\frac{R^2 - r_0^2}{gR}}$$ Of course, this requires us to know the depth of the tunnel but we were able to compute the time as a function of a fraction of the earth's radius, $$R$$. What we want is a way to compute the depth of the tunnel, $$r$$ as a function of the angle we're at or vice versa.

To start this process, we recall, from part 2 $$$$\theta' = \frac{1}{r}\sqrt{\frac{\frac{k^2g}{R}(R^2-r^2)}{r^2-\frac{k^2g}{R}(R^2-r^2)}} \label{eq:tp}$$$$ and recalling our definition of $$r_0$$ stemming from solving for the conditions at the curve minimum $$$$\frac{k^2g}{R} = \frac{r_0^2}{R^2-r_0^2} \label{eq:r0}$$$$ Substuting \ref{eq:r0} into \ref{eq:tp} gives us, after a little bit of algebra, $$$$d\theta = \frac{1}{r}\sqrt{\frac {r_0^2(R^2-r^2)} {R^2(r^2-r_0^2)} }dr \label{eq:dt}$$$$ Moving some constants out of the way helps, sometimes, so lets do $$$$\frac{R}{r_0}d\theta = \frac{1}{r}\sqrt{\frac {R^2-r^2} {r^2-r_0^2} }dr \label{eq:dt2}$$$$ If you were to enter \ref{eq:dt2} into Wolfram-Alpha you would get a hot mess in return. Wolfram-Alpha is really, really smart but sometimes a little trickery is required to bend the integrand into something that it finds more recognizable. To that end, let $$u^2 = \frac{r^2-r_0^2}{R^2-r^2}$$ This is kind of strange but making $$u$$ equal to the upside-down-integrand kind of makes sense as the derivative of a square root is 1-over-the-square-root (multiplied by the derivative of the ... radicand ... it's been a while, is that right)? Solving for $$r^2$$, $$r^2 = \frac{u^2R^2 + r_0^2}{1+u^2}$$ Now we find $$dr$$ but instead of taking the square root and differentiating, we will differentiate implicitly. \eqalign { 2rdr &= {{2R^2u(1+u^2) - 2u(u^2R^2+r_0^2)} \over {(1+u^2)^2}}du \cr &= {{2u(R^2+r_0^2)} \over {(1+u^2)^2}}du \cr dr &= \frac{u}{r}{{(R^2+r_0^2)} \over {(1+u^2)^2}}du } This will get a little messy but hang in there. First off, notice that $$u=\sqrt{\frac{r^2 - r_0^2}{R^2-r^2}}$$ so $$\frac{1}{u}=\sqrt{\frac{R^2-r^2}{r^2 - r_0^2}}$$ which is the most of the original integrand. Working our way through this \eqalign { \frac{R}{r_0}\theta = \int\frac{1}{r}\sqrt{\frac {R^2-r^2} {r^2-r_0^2} }dr &= \int\frac{1}{r}\frac{1}{u}\frac{u}{r}\frac{R^2-r_0^2}{(1+u^2)^2}du \cr &= \int\frac{1}{r^2}\frac{R^2-r_0^2}{(1+u^2)^2}du \cr \text{(substituting for } r^2 \text{)} &= \int\frac{1+u^2}{(u^2R^2+r_0^2)}\frac{R^2-r_0^2}{(1+u^2)^2}du \cr &= \int\frac{R^2-r_0^2}{(u^2R^2+r_0^2)(1+u^2)}du \cr } That last integrand looks like a job for partial fractions. \eqalign { \frac{R^2-r_0^2}{(u^2R^2+r_0^2)(1+u^2)} &= \frac{A}{u^2R^2+r_0^2} + \frac{B}{1+u^2} \cr R^2-r_0^2 &= A(1+u^2) + B(u^2R^2+r_0^2) \cr &= u^2(A+BR^2) + A + Br_0^2 \cr \therefore A=R^2, B=-1 } Putting this back into the integral \eqalign{ \frac{R}{r_0}\theta &= \int\frac{R^2-r_0^2}{(u^2R^2+r_0^2)(1+u^2)}du = R^2\int\frac{du}{u^2R^2+r_0^2} - \int\frac{du}{1+u^2} \cr &= \frac{R}{r_0}\tan^{-1}\left(\frac{Ru}{r_0}\right) - \tan^{-1}u + C \cr \theta &= \tan^{-1}\left(\frac{R}{r_0} \sqrt{\frac{r^2 - r_0^2}{R^2-r^2}} \right) - \frac{r_0}{R}\tan^{-1}\sqrt{\frac{r^2 - r_0^2}{R^2-r^2}} + C\cr } Here we let $$\theta(r_0) = 0 \rightarrow C = 0$$. At the surface, when $$r = R$$, we can compute that $$\theta = \frac{\pi}{2} - \frac{r_0}{R}\frac{\pi}{2}$$ $$$$\theta = \frac{\pi}{2} (1 - \frac{r_0}{R}) \label{eq:thetaR}$$$$ The angle $$\theta(R)$$ in \ref{eq:thetaR} is the angle from where the curve is the deepest to the surface. So, given that the tunnel will travel from the surface down to the minimum then back up again, the total span, $$\Psi$$, of the tunnel is $$\Psi = 2\theta = \pi (1 - \frac{r_0}{R})$$ And solving for $$r_0$$ $$$$r_0 = R(1 - \frac{\Psi}{\pi}) \label{eq:r0x}$$$$ The earth's radius in kilometers is $$R=6371\text{km}$$. The flight distance from PDX to JFK is $$d=3949\text{km}$$. Since $$d=R\Psi$$ the required angle spanned by this distance is $$\Psi = \frac{d}{R} = \frac{3949}{6371} = 0.62$$. \eqalign { \Psi &= 0.62 \cr r_0 &= R(1 - \frac{\Psi}{\pi}) = 6371(1 - \frac{0.62}{\pi}) = 5114\text{ km} \cr } And from part 2 of this series, the time $$\Delta t$$ is given by (remember to adjust the units!) \eqalign { \Delta t &= \pi \sqrt{\frac{R^2 - r_0^2}{gR}} \cr &= \pi \sqrt{\frac{6371000^2 - 5114000^2}{(9.8)(6371000)}} \cr &\approx 25 \text{ minutes} } We can also ask about the maximum speed attained. Since we've declared that the sum of the kinetic and potential energy are zero and that this is true for the entire traversal of the path, we can deduce that the kinetic energy is at a maximum where the potential energy is at a minimum. This happens at $$r=r_0$$. We saw from part one of this series that \eqalign { |v| &= \sqrt{\frac{g}{R}(R^2-r^2)} \cr &= \sqrt{\frac{9.8}{6371000}(6371000^2 - 5114000^2)} \cr &\approx 4713 \frac{\text{m}}{\text{s}} \cr &\approx 16970 \frac{\text{km}}{\text{hr}} } So there you have it... How long is the tunnel? How many Gs are being generated at $$r=r_0$$. I'll leave those for the reader.

## Friday, March 10, 2017

### Underground from Portland to New York (Part 2)

Underground from Portland to New York (Part 2) This post is part two of what will be a three part series on the derivation of the equations of an underground tunnel that minimizes travel time when only gravity is used for propulsion. We left our subterranean tunnel problem with the following equation we wished to minimize. \eqalign{ I &= \int_a^b\frac{\sqrt{(dr)^2+(rd\theta)^2}}{\sqrt{\frac{g}{R}(R^2-r^2)}} } Our first issue is figuring out what to do with $$\sqrt{(dr)^2+(rd\theta)^2}$$ so that we can integrate it. We could choose to factor out either the $$dr$$ or the $$d\theta$$ and could solve the problem either way. We'll choose to factor out the $$dr$$ because that leaves us an integrand that is not a function of the path variable (in this case $$\theta$$) which means that $$\pard{F}{\theta} = 0$$ and $$\pard{F}{\theta'} = constant$$. So, we have the Euler-Lagrange equation for this problem (remember that $$r$$ is our variable of integration): \eqalign{ \frac{d}{dr}\pard{F}{\theta'} - \pard{F}{\theta} = 0 \cr \text{but}\enspace \pard{F}{\theta} = 0 \cr \text{therefore}\enspace \frac{d}{dr}\pard{F}{\theta'} = 0 \cr \text{so}\enspace \pard{F}{\theta'} = k } $$\pard{}{\theta'} \left(\frac{\sqrt{1+(r\theta')^2}}{\sqrt{\frac{g}{R}(R^2-r^2)}}\right) = k$$ Performing the differentiation we have $$\frac{1}{\sqrt{\frac{g}{R}(R^2-r^2)}}\cdot\frac{r^2\theta'}{\sqrt{1+(r\theta')^2}} = k$$ Squaring both sides and solving for $$(r\theta')^2$$ first $$\frac{1}{\frac{g}{R}(R^2-r^2)}\cdot\frac{(r^2\theta')^2}{1+(r\theta')^2} = k^2$$ $$$$\frac{\frac{k^2g}{R}(R^2-r^2)}{r^2-\frac{k^2g}{R}(R^2-r^2)} = (r\theta')^2 \label{eq:rt2}$$$$ We solve for $$(r\theta')^2$$ and mark that equation because in the end, our original integral for the minimum time is a function of $$(r\theta')^2$$ and we don't want to have to recompute it. Going the final step to solve for $$\theta'$$ we have $$$$\theta' = \frac{1}{r}\sqrt{\frac{\frac{k^2g}{R}(R^2-r^2)}{r^2-\frac{k^2g}{R}(R^2-r^2)}} \label{eq:tp}$$$$ At this point we pause to consider the variable and limits of integration. If you look at the figure below, we can see that to traverse the curve, $$r$$ goes from $$R$$ to $$R$$. That doesn't help us much because the definite integral would end up being 0.
We do notice, however, that the curve must be symmetric (the path shouldn't matter on which side you start) and so the deepest part of the curve is in the middle at $$r_0$$. At this value of $$r=r_0$$, we can see that $$\frac{dr}{d\theta} = 0$$ since $$r(\theta)$$ is mimimized. Conversely, this means that $$\theta' = \frac{d\theta}{dr} \rightarrow \infty$$. This happens when the denominator of equation \ref{eq:tp} becomes zero. So, solving for the constants in this case when $$r=r_0$$ $$r_0^2 - \frac{k^2g}{R}(R^2-r_0^2) = 0$$ yields $$\frac{k^2g}{R} = \frac{r_0^2}{R^2-r_0^2}$$ Before we find the path, we'll find the time it takes to traverse the curve. Of course, this time will be a function of $$r_0$$ so we will still have some work to do. Rewriting equation \ref{eq:rt2} with the above substitution and then cleaning up some of the fractions yields $$(r\theta')^2 = \frac{\frac{r_0^2}{R^2-r_0^2}(R^2-r^2)}{r^2-\frac{r_0^2}{R^2-r_0^2}(R^2-r^2)}$$ yields $$$$(r\theta')^2 = \frac{r_0^2(R^2-r^2)}{r^2(R^2-r_0^2)-r_0^2(R^2-r^2)} \label{eq:rt2r0}$$$$ Now, going back to our original functional we factor out the $$dr$$ and put in the actual limits of integration, multiplying the whole thing by 2 because we're only going halfway in the integral. $$\Delta t = 2\int_{R}^{r_0}\frac{\sqrt{1+(r\theta')^2}}{\sqrt{\frac{g}{R}(R^2-r^2)}}dr$$ Substituting \ref{eq:rt2r0} into the above and moving some constants over to the left hand side $$\frac{1}{2}\sqrt{\frac{g}{R}}\Delta t = \int_{R}^{r_0}\frac{1}{\sqrt{(R^2-r^2)}}\cdot\frac{r\sqrt{R^2-r_0^2}}{\sqrt{r^2(R^2-r_0^2) - r_0^2(R^2-r^2)}}dr$$ And after a little more algebra, factoring out the $$(R^2-r_0^2)$$ $$\frac{1}{2}\sqrt{\frac{g}{R}}\Delta t = \int_{R}^{r_0}\frac{r}{\sqrt{(R^2-r^2)(r^2 - \frac{r_0^2}{R^2-r_0^2}(R^2-r^2))}}dr$$ Sometimes at points like this it helps to look at the units to make sure we at least have a sanity check. On the left hand side we have $$\sqrt{\frac{m}{s^2}\cdot\frac{1}{m}}\cdot s$$ which is unitless. On the right, we have $$\frac{m\cdot m}{\sqrt{m^4}}$$ which is also unitless. So we at least have that going for us. We're almost home for this part. We now have a relatively straightforward integration. We let $$u=R^2-r^2$$, $$du = -2rdr$$ and $$r^2 = R^2 - u$$. These substitutions result in $$\frac{1}{2}\sqrt{\frac{g}{R}}\Delta t = -\frac{1}{2}\int_{R}^{r_0}\frac{1}{\sqrt{u((R^2-u) - \frac{r_0^2}{R^2-r_0^2}u)}}dr$$ Simplifying the denominator $$\frac{1}{2}\sqrt{\frac{g}{R}}\Delta t = -\frac{1}{2}\int_{R}^{r_0}\frac{1}{\sqrt{u(R^2-(1+\frac{r_0^2}{R^2-r_0^2})u)}}dr$$ A little more $$\frac{1}{2}\sqrt{\frac{g}{R}}\Delta t = -\frac{1}{2}\int_{R}^{r_0}\frac{1}{\sqrt{u(R^2-\frac{R^2}{R^2-r_0^2}u)}}dr$$ A little more algebra by factoring out an $$R^2$$ from the to get the integral into a more recognizable form $$\frac{1}{2}\sqrt{\frac{gR^2}{R}}\Delta t = -\frac{1}{2}\int_{R}^{r_0}\frac{1}{\sqrt{u(1 - \frac{1}{R^2-r_0^2}u)}}dr$$ Simplifying the left a little and with a little help from Wolfram-Alpha we have (putting back the $$u=R^2-r^2$$) \eqalign { \frac{1}{2}\sqrt{gR}\Delta t &= 2\sqrt{(R^2-r_0^2)}\sin^{-1}\left(\sqrt{\frac{R^2-r^2}{R^2-r_0^2}}\right) \Bigg \bracevert_R^{r_0} \cr \frac{1}{2}\sqrt{gR}\Delta t &= 2\sqrt{(R^2-r_0^2)}(\frac{\pi}{2} - 0) \cr \frac{1}{2}\sqrt{gR}\Delta t &= \pi\sqrt{R^2-r_0^2} } And finally solving for $$\Delta t$$ $$\Delta t = 2 \pi \sqrt{\frac{R^2 - r_0^2}{gR}}$$ Here, we can ask the question of how long will it take to go from one side of the earth to the other, straight through the core. At that point, $$r_0 = 0$$ so $$\Delta t = 2\pi\sqrt{\frac{R}{g}}$$. With $$g=9.8\frac{\text{m}}{\text{s}^2}$$ and the radius of the earth $$R=6.4\cdot10^6 \text{m}$$ $$\Delta t = 2\pi\sqrt{\frac{6.4\cdot 10^6}{9.8}} \approx 5078 \text{s} \approx 85 \text{min}$$ Here is a graph of the transit time in minutes versus the depth as a fraction of $$R$$.
Solving for the path is coming in part 3.

## Saturday, March 4, 2017

### Underground from Portland to New York (Part 1)

Portland to New York Using only Gravity (Part 1)

### The Brachistochrone

The brachistochrone is a classic problem put forth by Johann Bernoulli and solved by some of the mathematical heavyweights of the day. The basic premise of the problem is that given two points connected by a curve, find the shape of the curve such that a particle moving only under the influence of gravity would travel along the curve in the minimum time. Somewhat surprisingly, this curve is not a straight line. Even Galileo figured this out in 1638 though mistakenly thought the curve was a circular arc. It turns out that the curve is a cycloid but that's not what we're going to prove here.

### Going Underground

Lets say we want to build a transportation tunnel from Portland, Oregon to New York, New York. We've invented a frictionless surface and we can evacuate the tunnel so there won't be any air resistance. We want to go completely green and only use gravity for travel. Oh, and to add to our perfectly realistic assumptions, we live on an earth of uniform density and of perfectly spherical shape.

What is the shape of the tunnel that will get us across in the shortest amount of time?

In similar fashion to solving the Brachistochrone problem, we must minimize the functional $$I=\int_{t0}^{t1}dt = \int_a^b \frac{ds}{v}$$

To get started we'll employ some basic physics. Because there is no energy added to the system, the sum of kinetic and potential energies will be a constant throughout the trip. The kinetic energy, $$T$$, is familiar and we can write it directly as $$T = \frac{1}{2}m_Tv^2$$ where $$m_T$$ is the mass of the train. The potential energy, $$V$$, is not quite as straightforward as it is not the familiar $$V=mgh$$ we've seen in our entry level physics class. To derive it we first need to find the forces involved. The force of gravity is $$\vec{F} = -G\frac{m_Em_T}{r^2} \uvec{r}$$ where $$m_E$$ is the effective mass of the earth when we are somewhere inside of it at a distance $$r$$ from the center. This mass is all the mass that is located less than or equal to a distance $$r$$ from the center. So $$m_E = \frac{4}{3}\rho\pi r^3$$ where $$\rho$$ is the (uniform!) density of the earth. Plugging that back into our force equation gives $$\vec{F} = -G\frac{\left(\frac{4}{3}\rho\pi r^3\right)m_T}{r^2} \uvec{r} = -\frac{4}{3}G\rho\pi m_T r \uvec{r}$$ (Note the negative sign since the force is directed opposite the radial direction.) Since we know the acceleration due to gravity is $$g = 9.8 \frac{m}{s^2}$$ at the surface, $$r = R$$ we make the substutition of \eqalign{ g &= \frac{4}{3}G\pi\rho R \cr \vec{F} &= -\frac{m_T g}{R}r\uvec{r} } As an aside, here it is interesting to note that inside the earth, the force actually increases linearly with the distance $$r$$. This is because the mass increases as $$r^3$$ even though the gravity is an inverse-square law.

Now to compute the integral for potential energy, we will choose our reference ($$V=0$$) point to be $$r = R$$. The line integral is along the radius to a distance $$r$$ from the center. $$V = -\int_R^r -\frac{m_T g}{R} x dx = \frac{m_Tg}{2R}(r^2 - R^2)$$ Since the total energy $$T+V=0$$ at the start and no energy is added to the system we can set the total energy to 0 and solve for the speed as a function of $$r$$. \eqalign{ T+V &= \frac{1}{2}m_Tv^2 + \frac{m_Tg}{2R}(r^2 - R^2) = 0 \cr v &= \sqrt{\frac{g}{R}(R^2-r^2)} } We are now at a point where we can write the functional we wish to minimize as \eqalign{ I &= \int_{t0}^{t1}dt = \int_a^b \frac{ds}{v} \cr &= \int_a^b\frac{\sqrt{(dr)^2+(rd\theta)^2}}{\sqrt{\frac{g}{R}(R^2-r^2)}} } To be continued in part deux.