Free-body diagram

In the equilibrium position the spring is unstretched and the mass at rest. There is therefore no force from the viscous damper as there is no velocity. Using the equilibrium position as the reference will again remove gravity effects from the equation of motion.

When the mass is displaced x(t) from this position the spring is stretched an amount x(t). Thus there are equal and opposite forces (F) at the ends of the spring. The force F is given by F = kx(t). There are also equal and opposite forces at the ends of the viscous damper given by P = cx'(t).

Newton's third law states that for every force there is an equal and opposite reaction. Thus there are also forces F and P acting on the mass as shown.

The free body diagram of the mass is thus,

If we now apply Newton's second law we obtain the equation of motion of the mass as,

x''(t) is the acceleration in the positive downwards direction defined by x(t). The force on the mass is upwards and thus [-kx(t) - cx'(t)].