Oscilador armonico sin friccion

k=1;m=2.5;

sol2=DSolve[
{m x''[t]+k x[t]==0,x[0]==5,x'[0]==0},
x[t],t]

Plot[{x[t]/.sol[[1]],x[t]/.sol2[[1]]},{t,0,50}]

Oscilador armonico con friccion

m=5;k=1;b=8;

solb1=DSolve[
{m x''[t]+b x'[t]+k x[t]==0,x[0]==5,x'[0]==0},
x[t],t]

Plot[x[t]/.solb1[[1]],{t,0,50},PlotRange->All]

Pulsaciones

m=5;k=1;b=0;fo=20;γ=(Sqrt[k/m]);

solγ1=DSolve[
{m x''[t]+b x'[t]+k x[t]==fo Cos[γ t],x[0]==0.1,x'[0]==0},
x[t],t]//Simplify//Chop

Plot[{x[t]/.solγ1[[1]]},{t,0,50000}]

Resonancia con friccion

m=5;k=1;b=4;fo=20;γ=(Sqrt[k/m]);

solγ1=DSolve[
{m x''[t]+b x'[t]+k x[t]==fo Cos[γ t],x[0]==0.1,x'[0]==0},
x[t],t]//Simplify//Chop

Plot[{x[t]/.solγ1[[1]]},{t,0,200},PlotRange->All]