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]
1
2
(-g
2
t
+2Y+2tvStartSin[α])
In[]:=
Y=0;​​vStart=200;​​g=10;​​α=Pi/4;​​
In[]:=
projectileA
Out[]=
x[t]100
2
t,y[t]
1
2
(200
2
t-10
2
t
)
In[]:=
{x[t],y[t]}/.projectileA
Out[]=
100
2
t,
1
2
(200
2
t-10
2
t
)
In[]:=
x[t_]=x[t]/.projectileA​​y[t_]=y[t]/.projectileA
Out[]=
100
2
t
Out[]=
1
2
(200
2
t-10
2
t
)
In[]:=
y[x]
Out[]=
1
2
(200
2
x-10
2
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[]=
1000
2000
3000
4000
200
400
600
800
1000
In[]:=
tHit=20;​​ParametricPlot[{x[t],y[t]},{t,0,tHit}]
Out[]=
500
1000
1500
2000
2500
200
400
600
800
1000
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]
DSolve
:Supplied equations are not differential or integral equations of the given functions.
Out[]=
DSolve[{
′′
rR
[t]{aRrCos[β],aRrSin[β]},vR[0]{0,0},rR[0]{Rx,0}},{xR[t],yR[t]},t]