  We study free particles in a one-dimensional box with combinations of two
types of boundary conditions: the Dirichlet condition and a one-parameter
family of quasi-Neumann conditions at the two walls. We calculate energy
spectra approximately and obtain equations of state having the same
(one-dimensional) volume dependence as van der Waals equations of state. The
dependence of the equations of state is examined for particles obeying
Maxwell-Boltzmann, Bose-Einstein, or Fermi-Dirac statistics. Our results
suggest that the deviation from ideal gas may also be realized as finite size
effects due to the interaction between the particles and the walls.
