Dušeno nihanje

Privzemimo, da je točka z maso m pripeta na vzmet s koeficientom k, njeno gibanje pa duši blažilec s koeficientom c. Njeno gibanje je določeno z diferencialno
enačbo drugega reda s konstantnimi koeficienti

                                                                                                      mx''+cx'+kx = 0.
                                                                                                      
Če označimo (Subscript[ω, 0]) = (k/m), ločimo naslednje primere dušenja:
1) c = 0 ........... prosto nihanje,
2) c < 2(Subscript[mω, 0]) ... podkritično dušenje,
3) c = 2(Subscript[mω, 0]) ... kritično dušenje,
4) c > 2(Subscript[mω, 0]) ... nadkritično dušenje.

DSolve[{m*y''[t]+c*y'[t]+k*y[t]==0,y[0]==-1,y'[0]==0},y[t],t]

y[t_,A_,c_,k_,m_]:=(1/(2 (Sqrt[(c^2)-4 k m])))A (-c (E^(((-c-(Sqrt[(c^2)-4 k m])) t)/(2 m)))+c (E^(((-c+(Sqrt[(c^2)-4 k m]))t)/(2 m)))+(E^(((-c-(Sqrt[(c^2)-4 k m])) t)/(2 m))) (Sqrt[(c^2)-4 k m])+(E^(((-c+(Sqrt[(c^2)-4 k m])) t)/(2 m))) (Sqrt[(c^2)-4 k m]))

Manipulate[a=Plot[y[x,x0,c,k,m],{x,-0.001,t},PlotStyle->Blue];b=Graphics[{ParametricPlot[{-1+0.3Sin[8x],-5+(x/(2π))(5+y[t,x0,c,k,m])},{x,0,2π},Axes->None,PlotStyle->Blue,AspectRatio->Automatic][[1]],PointSize[0.02],Black,Point[{-1,y[t,x0,c,k,m]}],Black,Rectangle[{-1.8,-5.2},{-0.2,-4.8}],Black,Rectangle[{-1.05,-4.8},{-0.95,-0.15+y[t,x0,c,k,m]}]}];Show[a,b,PlotRange->{{-2,15},{-5,5}},ImageSize->{700,450},AxesOrigin->{0,0}],{{x0,-2,"Začetni odmik (cm)"},-4,0,Appearance->"Labeled",AnimationRunning->False},
{{k,900,"Togost vzmeti (N/m)"},900,10000,Appearance->"Labeled",AnimationRunning->False},
{{m,400,"Masa (kg)"},200,400,Appearance->"Labeled",AnimationRunning->False},{{c,0,"Koeficient dušenja (kg/s)"},0,2000,Appearance->"Labeled",AnimationRunning->False},
{{t,0,"Čas (s)"},0,15,ControlType->Trigger,AnimationRate->1}]