The problem of lateral vibration of a beam subjected to an eccentric compressive force and a harmonically varying transverse concentrated moving force is analyzed within the framework of the Bernoulli-Euler beam theory. The Lagrange equations are used to examine the free vibration characteristics of an axially loaded beam and the dynamic response of a beam subjected to an eccentric compressive force and a moving harmonic concentrated force. The constraint conditions of supports are taken into account by using the Lagrange multipliers. In the study, trial function denoting the deflection of the beam is expressed in a polynomial form. By using the Lagrange equations, the problem is reduced to the solution of a system of algebraic equations. Results of numerical simulations are presented for various combinations of the value of the eccentricity, the eccentric compressive force, excitation frequency and the constant velocity of the transverse moving harmonic force. Convergence studies are made. The validity of the obtained results is demonstrated by comparing them with exact solutions based on the Bernoulli-Euler beam theory obtained for the special cases of the investigated problem. (c) 2005 Elsevier Ltd. All rights reserved.