Method of analysis of multiphonon and multiple-scattering effects in inelastic neutron scattering experiments