Let us consider the Dirichlet problem
where is a bounded smooth domain in and the nonlinearity is assumed to be a Caratheodory function with subcritical growth. Then, it is well known that the weak solutions of (P) are the critical points of the functional
where . In this variational setting, the literature usually distinguishes between two situations for problem (P): the subquadratic situation, where the potential satisfies , and the superquadratic situation, where satisfies . The main goal of this paper is to present a unified approach to both situations by means of a condition of nonquadraticity at infinity on .