Analog of the rayleigh equation for the problem of bubble dynamics in a tube