m := 1
ρ := 1
r[x_] := 
      0 /; 0 ≤ x ≤  
          2  π
r[x_] := ((ρ ((E^((((2 π - x) ρ)/m))) m - m Cos[x] + ρ Sin[x]))/((m^2) + (ρ^2))) /; 
        2  π < x ≤ 3  π
r[x_] := (((E^((((2 π - x) ρ)/m))) (1 + (E^(((π ρ)/m)))) m ρ)/((m^2) + (ρ^2))) /; 3  π < x
Plot[r[t], {t, 0, 30}, PlotRange ->  All, 
      PlotStyle -> {RGBColor[1, 0.7, 0], Thickness[0.005]}]

ρ := 1
m := 1
k := 1
r[x_] := ((ρ (m Cos[x] - ρ Sin[x]) (UnitStep[-3 π + x] - UnitStep[-2 π + x]))/((m^2) + (ρ^2))) +  ((ρ (E^((((2 π - x) ρ)/m))) m ((E^(((π ρ)/m))) UnitStep[-3 π + x] + UnitStep[-2 π + x]))/((m^2) + (ρ^2)))
Plot[r[x], {x, 0, 30}, PlotRange ->  All, 
      PlotStyle -> {RGBColor[1, 0.7, 0], Thickness[0.005]}]