The lateral stability of a rail vehicle is optimized using a combination of multibody dynamics, sequential quadratic programming, and a genetic algorithm. Several steps are taken to validate this integrated approach and to show its effectiveness. First, a hand-derived solution to a 17 degree of freedom linear rail vehicle model is compared to the simulation results from the A'GEM multibody dynamics software. Second, the calculation of the 'critical speed' (above which a rail vehicle response becomes unstable) using sequential quadratic programming is validated for a specific example. In the process, the existence of sharply-discontinuous 'cliffs' in the plots of critical speed versus suspension stiffnesses are identified. These cliffs, which are due to switching of the least-damped mode in the system, greatly hinder the application of gradientbased optimization methods. Two methods that do not require gradient information, a genetic algorithm and the Nelder-Mead's Simplex algorithm, are used to optimize the critical speed. The two algorithms and their results are compared. In recognition of the cliff phenomenon, the definition of critical speed is generalized to make it a more practical measure of lateral stability.