Extremum problems for mass-distributions in a finite interval