The projectile problem

(*Air resistance is negligible*)

θ = Pi/6;
v0={20 Cos[θ], 20 Sin[θ]};
Clear[x,y,vx,vy];
velocity=DSolve[{vx'[t]==0 t,vy'[t]==-9.8 ,vx[0]==v0[[1]],vy[0]==v0[[2]]},{vx,vy},{t,0,10}][[1]];
vel1[t_]={vx[t]/.velocity,vy[t]/.velocity};

position=DSolve[{x''[t]==0,y''[t]== -9.8,x[0]==0,y[0]==0,x'[0]== v0[[1]],y'[0]== v0[[2]]},{x,y},t][[1]];
r1[t_]= {x[t]/.position,y[t]/.position};
tmax1=t/.FindRoot[y[t]==0/.position,{t,2}];

animation1=Manipulate[Quiet[
T[t_]:= r1'[t]/Sqrt[r1'[t][[1]]^2+r1'[t][[2]]^2]; (*unit tangent vector*)
n[t_]:= T'[t]/Sqrt[T'[t][[1]]^2+T'[t][[2]]^2]; (*unit normal vector*)
κ[t_]:= Norm[T'[t],2]/Norm[r1'[t],2]; (*curvature*)
speed[t_]:= Sqrt[vel1[t][[1]]^2+vel1[t][[2]]^2];
Show[
ParametricPlot[r1[t],{t,0,tmax1}],
Graphics[{Arrow[{r1[t],r1[t]+r1'[t]}],
{Red,Arrow[{r1[t],r1[t]+speed'[t] T[t]}]},
{Red,Arrow[{r1[t],r1[t]+κ[t] speed[t]^2 n[t]}]},
{Green,Arrow[{r1[t],r1[t]+vel1'[t]}]}
}],
ListPlot[{r1[t]},PlotMarkers-> ],
PlotRange-> {{-5,40},{-20,20}},PlotLabel->t]],
{t,0,tmax1,0.05}]

(*With air resistance*)

Clear[x,y,vx,vy];
m=0.2;
θ = Pi/6;
v0={20 Cos[θ], 20 Sin[θ]};

velocity=NDSolve[{vx'[t]==0-0.01 Sqrt[vx[t]^2+vx[t]^2]/m vx[t],
vy'[t]==-9.81-0.01 Sqrt[vx[t]^2+vy[t]^2]/m vy[t],vx[0]== v0[[1]],vy[0]==v0 [[2]]},{vx,vy},{t,0,10}];
vel2[t_]= {vx[t]/. velocity[[1]],vy[t]/.velocity[[1]]};

position =NDSolve[{x''[t]==0-0.01 Sqrt[x'[t]^2+y'[t]^2]/m x'[t],
y''[t]==-9.81-0.01 Sqrt[x'[t]^2+y'[t]^2]/m y'[t],
x'[0]== v0[[1]],y'[0]==v0 [[2]],x[0]== 0,y[0]==0},{x,y},{t,0,10}];
r2[t_]= {x[t]/.position[[1]],y[t]/.position[[1]]};

tmax2=t/.FindRoot[y[t]==0/.position[[1]],{t,2}];

animation2=Manipulate[Quiet[
T[t_]:= r2'[t]/Sqrt[r2'[t][[1]]^2+r2'[t][[2]]^2];
n[t_]:= T'[t]/Sqrt[T'[t][[1]]^2+T'[t][[2]]^2];
κ[t_]:= Norm[T'[t],2]/Norm[r2'[t],2];
speed[t_]:= Sqrt[vel2[t][[1]]^2+vel2[t][[2]]^2];
Show[
ParametricPlot[r2[t],{t,0,tmax2}],
Graphics[{Arrow[{r2[t],r2[t]+r2'[t]}],
{Red,Arrow[{r2[t],r2[t]+speed'[t] T[t]}]},
{Red,Arrow[{r2[t],r2[t]+κ[t] speed[t]^2 n[t]}]},
{Green,Arrow[{r2[t],r2[t]+vel2'[t]}]}
}],
ListPlot[{r2[t]},PlotMarkers-> ],
PlotRange-> {{-15,30},{-20,20}},PlotLabel->t]],
{t,0,tmax2,0.05}]

The spring problem

m=0.06; k=14; g=9.8;
Clear[x];
spring = DSolve[{x''[t]== g-((k x[t])/m),x[0]==0.07,x'[0]== 0},x[t],t];
x[t_]=x[t]/.spring;
Plot[x[t],{t,0,10},PlotRange->All,AxesLabel->{"Time t","Position x"}]

Animate[
Show[ListPlot[{{0,x[t][[1]]}},PlotStyle->Red,ScalingFunctions->{Identity,"Reverse"}],AxesOrigin-> {0,0},
PlotRange->{{-0.5,0.5},{0,-0.1}},PlotLabel->t]
,{t,0,10},
AnimationRate->1,AnimationRunning->False
]

(*start from equilibrium point*)

Clear[x];
equilibrium=x/.Solve[g-((k x)/m)==0,x];
spring = DSolve[{x''[t]== g-((k x[t])/m),x[0]==equilibrium[[1]],x'[0]== 0},x,t];
x[t_]=x[t]/.spring;

Animate[
Show[ListPlot[{{0,x[t][[1]]}},PlotStyle->Red,ScalingFunctions->{Identity,"Reverse"}],AxesOrigin-> {0,0},
PlotRange->{{-0.5,0.5},{0,-0.1}},PlotLabel->t]
,{t,0,10},
AnimationRate->1,AnimationRunning->False
]