Critically Damped Motion 

> dsol := dsolve({deq2, init}, x(t)); -1
 

> lhs(dsol) = limit(rhs(dsol), d = 0)
 

x(t) = `/`(`*`(`+`(`*`(2, `*`(k, `*`(t, `*`(x[0])))), `*`(r, `*`(x[0])))), `*`(`^`(exp(`/`(`*`(k, `*`(t)), `*`(r))), 2), `*`(r)))
 

The solution consists of one exponential term when r = sqrt(`+`(`*`(4, `*`(m, `*`(k))))) 

r = `+`(`*`(2, `*`(`^`(`*`(m, `*`(k)), `/`(1, 2)))))
 

> subs(r = sqrt(`+`(`*`(4, `*`(m, `*`(k))))), %)
 

x(t) = `+`(`/`(`*`(`/`(1, 2), `*`(`+`(`*`(2, `*`(x[0], `*`(k, `*`(t)))), `*`(2, `*`(x[0], `*`(`^`(`*`(m, `*`(k)), `/`(1, 2)))))))), `*`(`^`(exp(`+`(`/`(`*`(`/`(1, 2), `*`(k, `*`(t))), `*`(`^`(`*`(m, `...
 

> xc := unapply(rhs(%), m, k, x[0], t); -1
 

> plot(xc(1, 1, 2, t), t = 0 .. 10, labels = [t, x(t)], labelfont = [TIMES, BOLD, 12])
 

Plot_2d
 

> mass_spring(1, 2, 1, 0, 5, 2, 0, 14, 0, 60, scaling = constrained)
 

 

 

`+`(diff(diff(x(t), t), t), `*`(2, `*`(diff(x(t), t))), x(t)) = 0
x(t) = `*`(`+`(2, `*`(2, `*`(t))), `*`(exp(`+`(`-`(t)))))
Plot_2d
 

Animation