A numerical study of galaxy mass density profiles