Firm behavior and market equilibrium