We study the center-of-mass motion in systems of trapped interacting particles with space- and velocity-dependent friction and anharmonic traps. Our approach, based on a dynamical ansatz assuming a fixed density profile, allows us to obtain information at once for a wide range of binary interactions and interaction strengths, at linear and nonlinear levels. Our findings are first tested on different simple models by comparison with direct numerical simulations. Then, we apply the method to characterize the motion of the center of mass of a magneto-optical trap and its dependence on the number of trapped atoms. Our predictions are compared with experiments performed on a large Rb85 magneto-optical trap.