An oscillator with a switch in forcing

Plot[HeavisideTheta[t],{t,-1,1}]

x'' + x' + 3 x = H(t - 10) cos(2t)
x(0) = 0
x’(0) = 1

xh[t_]=2 E^(-t/2) Sin[Sqrt[11] t/2]/Sqrt[11]

Plot[xh[t],{t,0,20},PlotRange->All]

x[t_]=xh[t]+HeavisideTheta[t-10] (E^((10-t)/2) ( (Cos[20]-2 Sin[20]) Cos[Sqrt[11] (t-10)/2]-(7 Cos[20]
+6 Sin[20]) Sin[Sqrt[11] (t-10)/2]/Sqrt[11] ) -(Cos[20]-2 Sin[20]) Cos[2 (t-10)] + (2 Cos[20]+Sin[20]) Sin[2 (t-10)])/5;

Plot[x[t],{t,0,20}]

Plot[x[t],{t,0,50}]

Plot[{x[t],HeavisideTheta[t-10] Cos[2 t]},{t,9.5,10.5},PlotStyle->{Black,Red},PlotRange->All]

Plot[x[t],{t,9.9,10.1},PlotStyle->Black,PlotRange->All,AxesOrigin->{0,0}]

Plot[x[t],{t,9.9,10.1},PlotStyle->Black,PlotRange->All]