The following model describes response of a system with inertia, dissipation, storage under excitation
especially with (periodic forcing).
In[6]:=
rhs = m y”[t] + c y'[t] + k y[t]; r[t_] = F
Cos[omega t];
hODE = rhs == 0;
hsol[t_,m_,c_,k_] = y[t] /. DSolve[hODE,y[t],t][[1,1]]
In[2]:=
psol[t_] = a Cos[omega t] + b Sin[omega t]
In[3]:=
uCoef = Simplify[Evaluate[rhs /. y->psol] - r[t]]
In[4]:=
sys = {Coefficient[uCoef,Cos[omega
t],1],Coefficient[uCoef,Sin[omega t],1]}=={0,0}
In[5]:=
yp[t_,m_,c_,k_] = psol[t] /. Solve[sys,{a,b}][[1]]
In[6]:=