In[]:=
r[t_]={x[t],y[t]};v[t_]=r'[t];a[t_]=r''[t];
In[]:=
r0={0,Y};v0={vStart*Cos[α],vStart*Sin[α]};G={0,-g};
In[]:=
projectileA=DSolve[{a[t]G,v[0]v0,r[0]r0},{x[t],y[t]},t][[1]]
Out[]=
x[t]tvStartCos[α],y[t](-g+2Y+2tvStartSin[α])
1
2
2
t
In[]:=
Y=0;vStart=200;g=10;α=Pi/4;
In[]:=
projectileA
Out[]=
x[t]100(200)
2
t,y[t]1
2
2
t-102
t
In[]:=
{x[t],y[t]}/.projectileA
Out[]=
100(200)
2
t,1
2
2
t-102
t
In[]:=
x[t_]=x[t]/.projectileAy[t_]=y[t]/.projectileA
Out[]=
100
2
tOut[]=
1
2
2
t-102
t
In[]:=
y[x]
Out[]=
1
2
2
x-102
x
In[]:=
sEnd=Solve[y[x]0,x][[2]][[1]][[2]]
Out[]=
20
2
In[]:=
Plot[{y[x]},{x,0,sEnd}]
Out[]=
In[]:=
tEnd=Solve[y[t]0,t][[2]][[1]][[2]]
Out[]=
20
2
In[]:=
ParametricPlot[{x[t],y[t]},{t,0,tEnd}]
Out[]=
In[]:=
tHit=20;ParametricPlot[{x[t],y[t]},{t,0,tHit}]
Out[]=
In[]:=
rR[t]={xR[t],yR[t]};vR[t]=rR'[t];aR[t]=rR''[t];
In[]:=
rR0={Rx,0};rRHit={L,H};vR0={0,0};vRHit={vRxHit,vRyHit};aR0={aRr*Cos[β],aRr*Sin[β]};
In[]:=
projectileB=DSolve[{aR[t]aR0,vR[0]vR0,rR[0]rR0},{xR[t],yR[t]},t]
Out[]=
DSolve[{[t]{aRrCos[β],aRrSin[β]},vR[0]{0,0},rR[0]{Rx,0}},{xR[t],yR[t]},t]
′′
rR
