ρ := 1
m := 1
k := 1
ξ := 0.2
r[x_] := 
      0 /; 0 ≤ x ≤  
          2  π
r[x_] := (ρ ((E^((((2 π - x) (ξ + ρ))/(2 m)))) (-k + 
                        m) (Sqrt[-4 k m + (((ξ + ρ))^2)]) Cosh[(((2 π - x) (Sqrt[-4 k m + (((ξ + ρ))^2)]))/(2 m))] + (Sqrt[-4 k m + (((ξ + ρ))^2)]) ((k - m) Cos[x] + (ξ + ρ) Sin[
                            x]) + (E^((((2 π - x) (ξ + ρ))/(2 m)))) (k + 
                        m) (ξ + ρ) Sinh[(((2 π - x) (Sqrt[-4 k m + (((ξ + ρ))^2)]))/(2 m))]))/(((((k - m))^2) + (((ξ + ρ))^2)) (Sqrt[-4 k m + (((ξ + ρ))^2)])) /; 2  π < x ≤ 3  π
r[x_] := (ρ (-2 (Cosh[(((3 π - x) (ξ + ρ))/(2 m))] + 
                        Sinh[(((3 π - x) (ξ + ρ))/(2 m))]) ((k - 
                              m) (Sqrt[-4 k m + (((ξ + ρ))^2)]) Cosh[(((-3 π + x) (Sqrt[-4 k m + (((ξ + ρ))^2)]))/(2 m))] + (k + 
                              m) (ξ + ρ) Sinh[(((-3 π + x) (Sqrt[-4 k m + (((ξ + ρ))^2)]))/(2 m))]) - 
                  2 (E^((((2 π - x) (ξ + ρ))/(2 m)))) ((k - 
                              m) (Sqrt[-4 k m + (((ξ + ρ))^2)]) Cosh[(((-2 π + x) (Sqrt[-4 k m + (((ξ + ρ))^2)]))/(2 m))] + (k + 
                              m) (ξ + ρ) Sinh[(((-2 π + x) (Sqrt[-4 k m + (((ξ + ρ))^2)]))/(2 m))])))/(2 ((((k - m))^2) + (((ξ + ρ))^2)) (Sqrt[-4 k m + (((ξ + ρ))^2)])) /; 
        3  π < x
Plot[r[x], {x, 0, 20}, PlotRange ->  All]