  Recently [J. Haro and E. Elizalde, Phys. Rev. Lett. {\bf 97}, 130401 (2006)],
a Hamiltonian formulation has been introduced in order to address some
longstanding severe problems associated with the physical description of the
dynamical Casimir effect at all times while the mirrors are moving. Here we
present the complete calculation providing precise details, in particular, of
the regularization procedure, which is decisive for the correct derivation of
physically meaningful quantities. A basic difference when comparing with the
results previously obtained by other authors is the fact that the motion force
derived in our approach contains a reactive term --proportional to the mirrors'
acceleration. This is of the essence in order to obtain particles with a
positive energy all the time during the oscillation of the mirrors --while
always satisfying the energy conservation law. A careful analysis of the
interrelations among the different results previously obtained in the
literature is then carried out. For simplicity, the specific case of a neutral
scalar field in one dimension, with one or two partially transmitting mirrors
(a fundamental proviso for the regularization issue) is considered in more
detail, but our general method is shown to be generalizable, without essential
problems (Sect. 2 of this paper), to fields of any kind in two and higher
dimensions.
