"Use NDSolve to numerically solve some commont first order differential equations encountered in elementary physics"

"NDSolve. Must provide boundary condition numerically"
g=9.81;
sol1=NDSolve[{vy'[t]==-g,vy[0]==0},vy[t],{t,0,1}]
vysol[t_]:=Evaluate[vy[t]/.sol1];
Plot[vysol[t],{t,0,1},PlotLabel->"vy vs t"]

g=9.81;
sol2=NDSolve[{y'[t]==-g*t,y[0]==0},y[t],{t,0,1}]
ysol[t_]:=Evaluate[y[t]/.sol2];
Plot[ysol[t],{t,0,1},PlotLabel->"y vs t"]

"Solving a free fall motion with drag force"
g=9.981;m=10;eta=1.0;
sol3=NDSolve[{m*vy'[t]==-m*g-eta*vy[t],vy[0]==0},vy[t],{t,0,50}]
vysol[t_]:=Evaluate[vy[t]/.sol3];
Plot[vysol[t],{t,0,50},PlotLabel->"vy(t) vs. t",PlotRange->All]

"Solving beta particle penetrating a slab "
lambda=1.0;n0=10^6;
sol4=NDSolve[{n'[x]==-lambda*n[x],n[0]==n0},n[x],{x,0,10lambda}]
nsol[x_]:=Evaluate[n[x]/.sol4];
 
Plot[nsol[x],{x,0,10lambda},PlotLabel->"n(x) vs. x",PlotRange->All]

"Solving radioactity remains in a sample as a function of time"
tau=10^6;n0=10^6;
sol5=NDSolve[{n'[t]==-n[t]/tau,n[0]==n0},n[t],{t,0,5tau}]
nsol[t_]:=Evaluate[n[t]/.sol5];
Plot[nsol[t],{t,0,5tau},PlotLabel->"n(t) vs. t",PlotRange->All]

"Solving the relation between speed and displacement in a SHM"
m=1.0;k=1.0;v0:=0.0;x0=1.0;
sol6=NDSolve[{m*v'[x]==-k x,v[x0]==v0},v[x],{x,-x0,x0}]
vsol[xdum_]:=v[x]/.sol6[[1]]/.{x->xdum}
 
Plot[vsol[x],{x,-x0,x0},PlotLabel->"v(x) vs. x",PlotRange->All]