{VERSION 4 0 "IBM INTEL NT" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Input" 2 19 "" 0 1 255 0 0 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 1 16 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 271 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT 258 11 "Cannon ball" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 173 "We consider the p roblem of firing cannon balls: this involves two-dimensional motion in a gravitational field including air resistance. We set up Newton's eq uations for the " }{TEXT 256 1 "x" }{TEXT -1 5 " and " }{TEXT 257 1 "y " }{TEXT -1 26 " components of the motion." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 259 1 "g" }{TEXT -1 40 " is the gravit ational acceleration, and " }{TEXT 260 1 "b" }{TEXT -1 27 " the air dr ag coefficient. " }{TEXT 263 1 "m" }{TEXT -1 80 " is the mass of the b all. We assume the drag to be proportional to the velocity." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 145 "We set up Newt on's equations as first-order differential equations for the momentum \+ and position vector components (Hamilton's equation). In the " }{TEXT 262 1 "x" }{TEXT -1 56 " direction we have drag as the only force, whi le in the " }{TEXT 261 1 "y" }{TEXT -1 32 " direction gravity acts as \+ well." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "Momx:=m*diff(vx(t),t)=-b*vx( t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "Momy:=m*diff(vy(t),t )=-m*g-b*vy(t);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 60 "The initial co nditions are specified through the parameters:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 44 "IC:=vx(0)=v0*cos(theta),vy(0)=v0*sin(theta);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "sol:=dsolve(\{Momx,Momy,I C\},\{vx(t),vy(t)\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "as sign(sol);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 81 "We can verify that \+ the found solutions indeed satisfy the differential equations:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "simplify(Momx);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalb(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "simplify(Momy);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalb(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "It i s of interest to Taylor expand the solutions around " }{TEXT 264 1 "t " }{TEXT -1 76 "=0. This shows how the velocities begin to deviate fro m their inital values:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "t aylor(vx(t),t=0,3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "tayl or(vy(t),t=0,3);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 215 "The change i s linear in time, and depends in the drag part on the initial velocity components, while the contributions from gravity are obvious in the l inear term. Note that the quadratic terms are more complicated." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 192 "It is of interest to investigate various aspects of the solution. The most com mon problem concerns the dependence of the trajectory on the inclinati on of the cannon for fixed drag coefficient " }{TEXT 265 1 "b" }{TEXT -1 99 ". Note that in real life one will include additional factors, s uch as the wind speed and direction." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 88 "In order to plot solutions we need to s pecify the parameters. In SI (MKSA) units we have" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 8 "g:=9.81;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "we pick a mass of 1 kg:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "m:=1;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "a drag coefficient (i n kg/s):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "b:=0.5;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "vx(t);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "simplify(vy(t));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 170 "Suppose we fix now the initial speed (by fixing the amount of pow der for the firing of the cannon). We can still vary the inclination a ngle. How can we achieve this goal?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 27 "Again in SI units (in m/s):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "v0:=50;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 52 "We can choose a parameter for the inclination angle:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "simplify(vy(t));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 74 "To generate functions rather than express ions we need the unapply command:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "Vx:=unapply(simplify(vx(t)),theta,t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "Vy:=unapply(simplify(vy(t)),theta,t );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 134 "We are ready to integrate \+ the equations for the position vector components. A dummy variable has to be used for the time integration (" }{TEXT 267 1 "s" }{TEXT -1 11 " replacing " }{TEXT 266 1 "t" }{TEXT -1 60 "). Again we use the unapp ly procedure to generate a mapping." }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "X:=unapply(int(Vx(theta,s) ,s=0..t),theta,t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "X(0.5, 1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "Y:=unapply(int(Vy(th eta,s),s=0..t),theta,t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 " Y(0.5,1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 108 "We have functions t hat generate the position vector for given inclination angle theta (in radians) and time " }{TEXT 268 1 "t" }{TEXT -1 78 " (in seconds). Thu s, we can plot the trajectory parametrically (the help page " }{TEXT 19 5 "?plot" }{TEXT -1 41 " includes an example for this plot mode):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "plot([X(0.5,t),Y(0.5,t),t =0..10],x=0..X(0.5,10),y=0..20);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 158 "The limits on the axes were adjusted by hand. If we wish to autom ate the process we can do this by finding the times at which the ball \+ intercepts the surface." }}{PARA 0 "" 0 "" {TEXT -1 19 "This is done b elow." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 114 "As an exercise the reader may want to play around with the amount of \+ friction. For a very small friction constant " }{TEXT 270 1 "b" } {TEXT -1 71 " the parabolic shape known from textbook solutions should be recovered." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 47 "The intercept with the surface is obtained from" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "t0:=solve(Y(0.5,t)=0,t);" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 19 "Note that we cross " }{TEXT 271 1 "y" }{TEXT -1 285 "=0 at the beginning of the motion as well. The or der in which the two solutions are found may vary. It does not matter \+ for the parametric plot which way the trajectory is traced out. We do \+ not need to specify the range on the axes, as they are automatically a djusted with the solution." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "plot([X(0.5,t),Y(0.5,t),t=t0[1]..t0[2]]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 183 "We graph a family of solutions in which the inclinati on of the cannon is changed. The objective is to determine the range, \+ and to observe the maximum height reached by the projectile." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "imax:=5;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "We set up a color table to be able to distinguish the sol utions." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "coltab:=[maroon, red,magenta,yellow,green,blue,violet,brown,gray,black];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "for i from 1 to imax do:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "theta:=evalf((i-0.5)/imax*Pi/2);" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "t0:=solve(Y(theta,t),t);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "P[i]:=plot([X(theta,t),Y(theta,t),t=t0[1] ..t0[2]],color=coltab[i]): od:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "display(seq(P[i],i=1..imax));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "We can also display the sequence of graphs as an animatio n:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "display(seq(P[i],i=1. .imax),insequence=true);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 292 "An i nteresting extension is to vary the air drag as a function of the heig ht. The air density falls off exponentially with increased height. The numerical solution of the generalized equation of motion which includ e a height-dependent air drag coefficient are discussed in N. Giordano 's book " }{TEXT 269 21 "Computational Physics" }{TEXT -1 22 " (Prenti ce-Hall 1997)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {MARK "48 1 0" 31 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }