function dydt = fd2(t, y, M, B, C, Fhat, Omega)

x = y(1:2);
v = y(3:4);

dx = v;
dv = inv(M)*(Fhat*cos(Omega*t) - B*v - C*x);
dydt = [dx; dv];