Equation of motion for mass spring and damper system