The magnus expansion for the damped harmonic oscillator