  We solve the mean-field $\phi^4$ model in an external magnetic field in the
microcanonical ensemble using two different methods. The first one is based on
Rugh's microcanonical formalism and leads to express macroscopic observables,
such as temperature, specific heat, magnetization and susceptibility, as time
averages of convenient functions of the phase-space. The approach is applicable
for any finite number of particles $N$. The second method uses large deviation
techniques and allows us to derive explicit expressions for microcanonical
entropy and for macroscopic observables in the $N \to\infty$ limit. Assuming
ergodicity, we evaluate time averages in molecular dynamics simulations and,
using Rugh's approach, we determine the value of macroscopic observables at
finite $N$. These averages are affected by a slow time evolution, often
observed in systems with long-range interactions. We then show how the finite
$N$ time averages of macroscopic observables converge to their corresponding
$N\to\infty$ values as $N$ is increased. As expected, finite size effects scale
as $N^{-1}$.
