{VERSION 2 3 "SGI IRIS UNIX" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 890 "whereHit:= proc(the ta0) \n local x,y,v,t,s,theta,X,Y,V,S,R,\n Theta,Xdot,Ydot,Vdo t,Tdot,Sdot,v0,\n sol,xhit,hittime;\n R:=0.2;\n v0:=2;\n \n Theta:=theta(t): Tdot:=diff(theta(t),t):\n V:=v(t): Vdot: =diff(v(t),t):\n X:=x(t): Xdot:=diff(x(t),t):\n Y:=y(t): \+ Ydot:=diff(y(t),t):\n S:=s(t): Sdot:=diff(s(t),t):\n \n sol:=dsolve(\n [Tdot= piecewise(Y>0,V*(V^2 - cos(Theta))/V ,0),\n Vdot= piecewise(Y>0,V*(-sin(Theta) -R*V^2),0),\n \+ Xdot= piecewise(Y>0,V*V*cos(Theta),0),\n Ydot= piecewise( Y>0,V*V*sin(Theta),0),\n Sdot= piecewise(Y>0,V,0),\n \+ x(0)=0, y(0)=2, v(0)=v0, theta(0)=theta0, s(0)=0],\n [x(t),y( t),theta(t),v(t),s(t)],numeric);\n \n hittime := 10;\n while ((subs (sol(hittime)[3],y(t)) > 0)) do\n hittime:= evalf(hittime + 10);\n \+ od;\n\n xhit:=rhs(sol(hittime)[2]);\n RETURN(xhit);\nend:\n" }}}} {MARK "0 0 0" 890 }{VIEWOPTS 1 1 0 1 1 1803 }