The method of spherical harmonics in the nuclear collective model