Applied Project: Where Should Pilot Start Descent?

My solution to the first applied project.

You may have drawn some things by hand to help you solve this problem, and that would have been perfectly fine. I am going to use Mathematica to do everything, just to show some of Mathematica's power.

Clear[el,h,k,v,a,b,c,d]

Problem 1

Here is the formula for the path the plane travels (cubic):

P[x_]=a (x^3)+b (x^2)+c x + d

If the plane is flying level at a height of h ft and starts its descent a distance of l miles from the airport, we can determine some of the constants a,b,c,d. We should also require that the descent is smooth: the derivative should be zero at x=0 and x=l so the passangers do not get a bumby ride!

values=Solve[{P[el]==h,P'[el]==0,P[0]==0,P'[0]==0},{a,b,c,d}]

P[x_]=P[x]/.Flatten[values]

Check we have the correct values:

P[el]
P'[el]
P[0]
P'[0]

We are good to go.

Problem 2

If the pilot maintains a constant horizontal speed, that means dx/dt=-v (negative since x is decreasing as the plane approaches the airport). The vertical acceleration is given by (d^( 2))P(x)/(dt^2).

vacc=D[P[x[t]],{t,2}]

Simplify using what we know about x'(t)=v (basically, we know x''(t)=0):

vacc=Simplify[vacc/.x'[t]->-v/.x''[t]->0]

OK, we need to think a bit about the x(t). If we think of t=0 as the time the pilot starts the descent, then x(0)=l.Since the instantaneous rate of change of the horizontal position is constant, dx/dt=-v, the equation of x(t) must be a straight line (the slope of the tangent is the same everywhere). This leads us to x(t)=l-v t. At t=0, the plane begins its descent. At t=l/v the plane touches down (this is where x(t)=0). So the time domain for the landing is from t=0 to t=l/v.

vacc=Simplify[vacc/.x[t]->el-v t]

OK, so the vertical acceleration has the above form. Where is it a maximum? It is a linear function of t, with positive slope, so the maximum will be at the endpoint  t=l/v, where the plane lands.

vacc=Simplify[vacc/.t->el/v]

Since we want the absolute value, the condition becomes:

condition=vacc≤k

Note: If you introduced an absolute value earlier in the analysis, you could also use t=0 to get the maximum absolute value of the vertical acceleration. See how they are the same, other than a sign difference?

-((6 h (v^2) (el-2 t v))/(el^3))/.t->0
-((6 h (v^2) (el-2 t v))/(el^3))/.t->el/v

This tells you the vertical acceleration is largest when the plane begins descent and the moment it lands.

Problem 3

Now, we get to use specify values and work some things out! Use the fact that there are 5280 ft in a mile to get units correct.

k=860;
h=35000/5280;
v=300;
Reduce[condition,el]

Let's get decimal answers to see if it makes sense.

N[%]

We can exclude the negative result as unphysical, so the pilot has to begin the descent at least 64.51 miles out.

Problem 4

Here is a graph of the trajectory of the plane:

el=64.51;

You should add some labelling to the sketch (easy to do by hand, but I will do it using Mathematica here).

flight[x_]=Piecewise[{{P[x],0<x<el},{h,x≥el},{0,x≤0}}]

plot1=Plot[flight[x],{x,-10,el+10},GridLines->{{0,el},{0,h}},Ticks->{{0,N[el]},{0,N[h]}},PlotStyle->{Thick,Red},PlotRange->{All,{-2,h+2}}]

We can even animate the landing, since we know x(t).

x[t_]:=el-v*t
position[x_]:=P[x]

Let's be supercool and load an image of a plane.

planeimage=Import["http://www.clipartguide.com/_named_clipart_images/0511-0906-2120-2656_Crop_Duster_Airplane_clipart_image.jpg"];
planeimage=Rasterize[planeimage,ImageSize->50];

Manipulate[
Show[plot1,Graphics[{{Inset[planeimage,{x[t],flight[x[t]]}]}}],ImageSize->{500,Automatic}]
,{t,0,el/v}]

Whew! Safe landing! Notice that the absolute value of the vertical acceleration is largest at the begininng of descent and just before landing. The time spent in descent is

el/v

%*60

about 13 minutes.