This is a forced vibration problem with one degree of freedom.
xp=Ccos(ot)+Dsin(ot), xp'=-C*o*sin(ot)+D*o*cos(ot), xp''=-C*o^2*cos(ot)-D*o^2*sin(ot).
k/m=o1^2 angular frequency.
Substitution of xp and xp'' into diff equation you can find constants and this can determine xp.
Using initial conditions - velocity and acceleration are both 0, you can find xh now. xh=A1*cos(o1*t)+B1*sin(o1*t), xh'=...,Substituting t=0 you can find xh