Math 2280-2 Example 2.3.1--2.3.3. A crossbow bolt is shot upwards with velocity v0 from the earth. What is the maximum height it reaches? How long does it stay aloft? Define some constants (initial position, velocity and gravitational acceleration y0:=0: v0:=49: g:=9.8: Case 1: Without air resistance (drag)
<Text-field style="Heading 1" layout="Heading 1"></Text-field> Define the velocity and position v1:=t->-g*t+v0; y1:=t->-g/2*t^2+v0*t+y0; Max height is when v1(t)=0 t1max:=v0/g; y1max:=y1(t1max); The object lands when y1(t)=0 t1landsols:=solve(y1(t)=0,{t}); t1land:=subs(t1landsols[2],t); # here we select and extract the second sol
Case 2: With linear air resistance (drag proportional to velocity)
<Text-field style="Heading 1" layout="Heading 1"></Text-field> Here we assume we know the terminal velocity is vt:=-245; Thus the drag coefficient is: rho:=g/(-vt); The velocity and position are given by v2:=t->vt+(v0-vt)*exp(-rho*t); y2:=t->y0+vt*t + (1/rho)*(v0-vt)*(1-exp(-rho*t)); Max height is when v2(t)=0 t2maxsols:=solve(v2(t)=0,{t}); tmax:=subs(t2maxsols,t); y2max:=y2(tmax); The bolt lands when y2(t)=0 t2landsols:=solve(y2(t)=0,{t}); t2land:=subs(t2landsols[1],t); # here we select and extract the first sol And the landing velocity is v2land:=v2(t2land);
Now let us compare both trajectories plot({y1(t),y2(t)},t=0..10,color=black); Case 3: With quadratic air resistance
<Text-field style="Heading 1" layout="Heading 1"></Text-field> Here we follow the discussion in pp103-105 of book. It is natural to define a different drag coefficient: rho2:=0.0011; The velocity is a piecewise constant function (depends on whether we go up or down) C1:=arctan(v0*sqrt(rho2/g)); C2:=arctanh(v0*sqrt(rho2/g)); tmax1:=C1/sqrt(rho2*g); tmax2:=C2/sqrt(rho2*g); v3:=t->piecewise(t<tmax1,sqrt(g/rho2)*tan(C1-t*sqrt(rho2*g)),t>=tmax1,sqrt(g/rho2)*tanh(C2-(tmax2+t-tmax1)*sqrt(rho2*g))); y3:=t->int(v3(s),s=0..t); Now we compare all three drag models. Notice that the linear and quadratic drags give almost identical results! plot(v3(t),t=0..10,color=black,title="velocity"); plot({y1(t),y2(t),y3(t)},t=0..10,color=black,title="comparison of position for three drag models");