A modified theory of the Lin–Shu density waves, studied in connection with the problem of spiral pattern of rapidly and differentially rotating disc galaxies, is presented for both the axisymmetric and non-axisymmetric structures in highly flattened galaxies resulted from the classical Jeans instability of small gravity perturbations (e.g. those produced by a spontaneous disturbance). A new method is provided for the analytical solution of the self-consistent system of the gas-dynamic equations and the Poisson equation describing the stability of a three-dimensional galactic disc composed of stars or gaseous clouds. In order to apply the method, the modifications introduced for the properties of the gravitationally unstable, that is to say, amplitude-growing density waves are considered by removing the often used assumptions that the gravity perturbations are axisymmetric and the disc is infinitesimally thin. In contrast to previous studies, in this paper these two effects – the non-axial symmetry effect and the finite thickness effect – are simultaneously taken into account. We show that non-axisymmetric perturbations developing in a differentially rotating disc are more unstable than the axisymmetric ones. We also show that destabilizing self-gravity is far more ‘dangerous’ in thin discs than in thick discs. The primary effect of small but finite thickness is a reduction of the growth rate of the gravitational Jeans instability and a shift in the threshold of instability towards a longer wavelength (and larger wavelength will include more mass). The results of this paper are in qualitative agreement with previous analytical and numerical estimations of the effects. The extent to which our results on the disc’s stability can have a bearing on observable spiral galaxies, including the Milky Way, is also discussed.