Needs["VectorFieldPlots`"]

(*kreslenie vektorovych poli pre matematicke kyvadlo
x1-uhol odklonu od zvislej roviny
x2-uhlova rychlost pohybu
x1`=x2,x2`=-kx1, k=l/g

v:(x1,x2)->(x2,-kx1)*)

k:=1
VectorFieldPlot[{x2,-k*x1},{x1,-7,7},{x2,-7,7},
Axes->True, PlotPoints->20]

ParametricPlot[{Sin[t], Cos[t]},{t,0,2*Pi}]

(*matematicke kyvadlo, presnejsi model:x1`=x2,x2`=-ksin(x1),k=l/g v:(x1,x2)->(x2,-ksin(x1))*)

VectorFieldPlot[{x2,-k*Sin[x1]},{x1,-2*Pi,2*Pi,Pi/4},{x2,-2,2,0.5},Axes->True,Ticks->{{-2*Pi,-Pi,0,Pi,2*Pi},Automatic}]

(*matematicke kyvadlo- model uvazujuci trenie:{analogia ekon.modelov ISML}
x1`=x2,x21+-kx1-mx2,k+l/g v:(x1,x2)->(x2,-kx1-mx2)*)

m:=1
VectorFieldPlot[{x2,-k*x1-m*x2},{x1,-3,3},{x2,-3,3},Axes->True,PlotPoints->9]

m:=-6
VectorFieldPlot[{x2,-k*x1-m*x2},{x1,-3,3},{x2,-3,3},Axes->True,PlotPoints->20]

(*Riesenie diferencialnych rovnic*)

sol=DSolve[x'[t]==Cos[x[t]]^2,x[t],t]

Plot[{x[t]/.sol/.C[1]->0,x[t]/.sol/.C[1]->1,x[t]/.sol/.C[1]->2},
{t,-2*Pi,2*Pi}]

sol11=DSolve[{x'[t]==Sin[x[t]],x[1]==Pi/2},x[t],t]

sol1=NDSolve[{x'[t]==Sin[x[t]],x[1]==Pi/2},x,{t,0,2*Pi}]
Plot[{Pi,x[t]/.sol1},{t,0,2*Pi}]

sol1=NDSolve[{x'[t]==ArcTan[x[t]],x[1]==Pi/2},x,{t,0,2*Pi}]
Plot[{Pi,x[t]/.sol1},{t,0,2*Pi}]

sol1=DSolve[{x'[t]==ArcCos[x[t]],x[1]==Pi/2},x[t],t]
Plot[{Pi,x[t]/.sol1},{t,0,2*Pi}]

sol1=NDSolve[{x'[t]==Sin[x[t]],x[1]==Pi/2},x,{t,0,2*Pi}]
Plot[{Pi,x[t]/.sol1},{t,0,2*Pi},PlotRange->{{0,2*Pi},{-2*Pi-0.5,2*Pi+0.5}}]

(*Ekonomicky priklad
*)