Square wave response

ODE = y''[t] + 3y'[t] + 2 y[t] == UnitStep[t-1] - UnitStep[t-2]

y1[t_]=Simplify[DSolveValue[{ODE,y[0]==0,y'[0]==0},y[t],t]]

f[t_]=(1/2) -Exp[-t]+(1/2) Exp[-2t]

y2[t]=f[t-1] UnitStep[t-1] - f[t-2] UnitStep[t-2]

sqwplt=Plot[{y1[t],y2[t]},{t,0,7}]

Hammerblow response

ODE = y''[t] + 3y'[t] + 2 y[t] == DiracDelta[t-1]

y1[t_]=Simplify[DSolveValue[{ODE,y[0]==0,y'[0]==0},y[t],t]]

f[t_]=Exp[-t]- Exp[-2t]

y2[t]=f[t-1] UnitStep[t-1]

hmrplt = Plot[{y1[t],y2[t]},{t,0,7}]

Compare square wave to hammerblow

sqwODE = y''[t] + 3y'[t] + 2 y[t] == UnitStep[t-1] - UnitStep[t-1-a]

y1[t_,a_]=Simplify[DSolveValue[{sqwODE,y[0]==0,y'[0]==0},y[t],t],a>0]

hmrODE = y''[t] + 3y'[t] + 2 y[t] == DiracDelta[t-1]

y2[t_]=Simplify[DSolveValue[{hmrODE,y[0]==0,y'[0]==0},y[t],t]]

Manipulate[Plot[{y1[t,a],y2[t]},{t,0,10},PlotRange->All],{a,0.001,1.}]